Skip to content

Instantly share code, notes, and snippets.

@inez
Created October 19, 2012 04:16
Show Gist options
  • Save inez/3916197 to your computer and use it in GitHub Desktop.
Save inez/3916197 to your computer and use it in GitHub Desktop.
Inconsistency between HipHop Virtual Machine and Zend PHP
inez@ubuntu:/var/www/mw/tests/phpunit/aa$ sudo /home/inez/HH/dev/hiphop-php/src/hhvm/hhvm Autoload.php
Second loader!
object(A)#3 (0) {
}
inez@ubuntu:/var/www/mw/tests/phpunit/aa$ php Autoload.php
First loader!
object(A)#3 (0) {
}
inez@ubuntu:/var/www/mw/tests/phpunit/aa$
<?php
class A {
}
<?php
spl_autoload_register(function ($class) {
echo "First loader!\n";
include $class . '.class.php';
});
spl_autoload_register(function ($class) {
echo "Second loader!\n";
include $class . '.class.php';
});
var_dump(new A());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment