mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
20 lines
241 B
PHP
20 lines
241 B
PHP
--TEST--
|
|
Testing class_alias() using autoload
|
|
--FILE--
|
|
<?php
|
|
|
|
spl_autoload_register(function ($a) {
|
|
class foo { }
|
|
});
|
|
|
|
class_alias('foo', 'bar', 1);
|
|
|
|
var_dump(new foo, new bar);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
object(foo)#%d (0) {
|
|
}
|
|
object(foo)#%d (0) {
|
|
}
|