Does anyone know how to convert this code to be PHP 5.2 compatible?
$myClass = 'ValidClassName';
$instance = $myClass::factory(array('arg' => 'value));
I know in PHP 5.3
As of PHP 5.3.0, it’s possible to reference the class using a variable. The variable’s value can not be a keyword (e.g. self, parent and static).
And without realizing it, I was using it. Then on a Php 5.2 enviroment, I get the error
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM
So I am trying to figure out how to convert that code into something that will be at least 5.2 backwards compatible.
According to the documentation of
call_user_func():As of 5.2.3:
And I think this works on 5.2.0: