- Output for 5.6.0 - 5.6.24, 7.0.0 - 7.0.9
- Parse error: syntax error, unexpected 'static' (T_STATIC), expecting variable (T_VARIABLE) in /in/Auj2n on line 9
Process exited with code 255.
<?php
class Foo {
public function test(self $obj) {
}
public function testStatic(static $obj) {
}
}
class bar extends Foo{}
$foo = new foo();
$bar = new Bar();
$foo->test($foo);
$foo->test($bar);
$bar->testStatic($bar);
$bar->testStatic($foo);