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.12
true
Output for 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25
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:
55.76 ms | 407 KiB | 5 Q