3v4l.org

run code in 300+ PHP versions simultaneously
<?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/t6iSr 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/t6iSr on line 4
Process exited with code 255.

preferences:
177.16 ms | 1395 KiB | 55 Q