how do I define a constant inside a function
eg.
class {
public test;
function tester{
const test = "abc";
}
}
You are doing fine but you need to put the const
at the class level not inside the function eg:
class {
const TEST = "abc";
public $test2;
function tester{
// code here
}
}
Also, you were missing $
in public variable test