3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php interface Comparable { function compare(static $compare); } class Foo implements Comparable { function compare(static $compare) {} } class Bar implements Comparable { function compare(static $compare) {} } $foo = new Foo(); $bar = new Bar(); $foo->compare($foo); $bar->compare($bar);
Output for 5.4.0 - 5.4.19
Parse error: syntax error, unexpected 'static' (T_STATIC), expecting '&' or variable (T_VARIABLE) in /in/4kZlC on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STATIC, expecting '&' or T_VARIABLE in /in/4kZlC on line 4
Process exited with code 255.