3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A { public function ok(){echo 'ok';} } class B implements A {} $x = new B(); $x->ok();
Output for 7.0.0 - 7.0.31, 7.1.0 - 7.1.21, 7.2.0 - 7.2.9
Fatal error: Interface function A::ok() cannot contain body in /in/k6dMg on line 4
Process exited with code 255.

preferences:
185.56 ms | 1395 KiB | 71 Q