Welcome Guest, Not a member yet? Register   Sign In
Class Name is variable does NOT work
#2

This isn't any code specific to CI.. that's just plain vanilla PHP, so not sure what would be different between your configurations. I believe what you have should work, but alternatively you could try something like this.

PHP Code:
$reflector = new ReflectionClass($classname);
echo 
$reflector->getStaticPropertyValue($var2); 
Reply


Messages In This Thread
Class Name is variable does NOT work - by iot - 10-07-2020, 07:38 PM
RE: Class Name is variable does NOT work - by ojmichael - 10-08-2020, 12:11 AM
RE: Class Name is variable does NOT work - by iot - 10-11-2020, 07:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB