3v4l.org

run code in 500+ 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.34, 8.2.22 - 8.2.32, 8.3.5 - 8.3.33, 8.4.1 - 8.4.24, 8.5.0 - 8.5.9
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:
77.92 ms | 1058 KiB | 4 Q