mirror of
https://github.com/php/php-src.git
synced 2024-10-17 22:42:38 +00:00
23 lines
254 B
Plaintext
23 lines
254 B
Plaintext
![]() |
--TEST--
|
||
|
Testing declaration of alias to 'static'
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
class bar {
|
||
|
}
|
||
|
|
||
|
class foo {
|
||
|
public function test() {
|
||
|
class_alias('bar', 'static');
|
||
|
return new static;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$a = new foo;
|
||
|
var_dump($a->test());
|
||
|
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
object(foo)#%d (0) {
|
||
|
}
|