3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(array_search([0, "Foo"], "Foo"));
Output for 8.0.0 - 8.0.2
Fatal error: Uncaught TypeError: array_search(): Argument #2 ($haystack) must be of type array, string given in /in/LnC0t:3 Stack trace: #0 /in/LnC0t(3): array_search(Array, 'Foo') #1 {main} thrown in /in/LnC0t on line 3
Process exited with code 255.
Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.26, 7.4.0 - 7.4.13
Warning: array_search() expects parameter 2 to be array, string given in /in/LnC0t on line 3 NULL