Skip to content

Instantly share code, notes, and snippets.

@ezimuel
Created March 5, 2013 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ezimuel/5091208 to your computer and use it in GitHub Desktop.
Save ezimuel/5091208 to your computer and use it in GitHub Desktop.
class_alias experiment
// 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