Created
March 5, 2013 15:45
-
-
Save ezimuel/5091208 to your computer and use it in GitHub Desktop.
class_alias experiment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// rename the Zend\Stdlib\ArrayObject in Zend\Stdlib\ArrayObjectPHPFuture | |
// and copy he Zend\Stdlib\compatibility\ArrayObject in Zend\Stdlib\ArrayObjectPHPLegacy | |
if (version_compare(PHP_VERSION, '5.3.4', 'lt') { | |
class_alias('Zend\Stdlib\ArrayObjectPHPLegacy', 'ArrayObject'); | |
} else { | |
class_alias('Zend\Stdlib\ArrayObjectPHPFuture', 'ArrayObject'); | |
} | |
$test = new ArrayObject(); | |
var_dump($test); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment