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:
194.88 ms | 1395 KiB | 76 Q