3v4l.org

run code in 300+ PHP versions simultaneously
<?php $haystacks = [ ["Mac", "NT"], ["Irix", "Linux"] ]; $needle = 'Irix'; var_export( array_any( $haystacks, fn($haystack) => in_array($needle, $haystack) ) );
Output for 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
true
Output for 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30
Fatal error: Uncaught Error: Call to undefined function array_any() in /in/J17A7:10 Stack trace: #0 {main} thrown in /in/J17A7 on line 10
Process exited with code 255.

preferences:
58.24 ms | 989 KiB | 4 Q