3v4l.org

run code in 300+ PHP versions simultaneously
<?php $parser = xml_parser_create(); xml_set_default_handler($parser, "this is not a valid callback"); function only_accepts_callables(callable $value) { } only_accepts_callables("this is not a valid callback");
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.24, 8.3.0 - 8.3.12
Fatal error: Uncaught TypeError: only_accepts_callables(): Argument #1 ($value) must be of type callable, string given, called in /in/0kBnZ on line 7 and defined in /in/0kBnZ:6 Stack trace: #0 /in/0kBnZ(7): only_accepts_callables('this is not a v...') #1 {main} thrown in /in/0kBnZ on line 6
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Fatal error: Uncaught TypeError: Argument 1 passed to only_accepts_callables() must be callable, string given, called in /in/0kBnZ on line 7 and defined in /in/0kBnZ:6 Stack trace: #0 /in/0kBnZ(7): only_accepts_callables('this is not a v...') #1 {main} thrown in /in/0kBnZ on line 6
Process exited with code 255.

preferences:
76.72 ms | 407 KiB | 5 Q