3v4l.org

run code in 300+ PHP versions simultaneously
<?php strpos('a', 'a'); strpos(false, 'a'); strpos(array(), 'a');
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
Fatal error: Uncaught TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given in /in/CoekE:4 Stack trace: #0 /in/CoekE(4): strpos(Array, 'a') #1 {main} thrown in /in/CoekE on line 4
Process exited with code 255.

preferences:
74.5 ms | 406 KiB | 5 Q