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.1.30 - 8.1.33, 8.2.22 - 8.2.29, 8.3.5 - 8.3.25, 8.4.1 - 8.4.12
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:
69.13 ms | 408 KiB | 5 Q