3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php interface IFace{ function do(); } class Foo implements IFace { function do() { return 'OK'; } } class Bar { $face = null; function __construct(IFace $f) { $this->face = $f; } } $bar = new Bar(new Foo());
Output for 5.4.0 - 5.5.3
Parse error: syntax error, unexpected 'do' (T_DO), expecting identifier (T_STRING) in /in/vihFh on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_DO, expecting T_STRING in /in/vihFh on line 3
Process exited with code 255.