3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function x() { if (is_callable(array($this, "y"))) $this::y(); if (is_callable(static::y(...))) static::y(); } } class B extends A { public function y() {} } (new B())->x();
Output for 8.0.0 - 8.0.12
Parse error: syntax error, unexpected token ")" in /in/QnPHB on line 6
Process exited with code 255.
Output for 7.3.0 - 7.3.31, 7.4.0 - 7.4.25
Parse error: syntax error, unexpected ')' in /in/QnPHB on line 6
Process exited with code 255.

preferences:
25.57 ms | 410 KiB | 5 Q