3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { public abstract function bar(); }
Output for 8.1.2
Fatal error: Interface method Foo::bar() must not be abstract in /in/otUKp on line 4
Process exited with code 255.
Output for 8.1.0 - 8.1.1
Fatal error: Access type for interface method Foo::bar() must be public in /in/otUKp on line 4
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.28, 8.0.0 - 8.0.16
Fatal error: Access type for interface method Foo::bar() must be omitted in /in/otUKp on line 4
Process exited with code 255.

preferences:
38.4 ms | 411 KiB | 5 Q