3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function __call($method, $args) {} } var_dump(is_callable([new A, 'method']), method_exists([new A, 'method']));;
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Fatal error: Uncaught ArgumentCountError: method_exists() expects exactly 2 arguments, 1 given in /in/28hSo:1 Stack trace: #0 /in/28hSo(1): method_exists(Array) #1 {main} thrown in /in/28hSo on line 1
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: method_exists() expects exactly 2 parameters, 1 given in /in/28hSo on line 1 bool(true) NULL

preferences:
79.95 ms | 1645 KiB | 4 Q