3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'CURRENT: '.current( array_filter([3=>'three',7=>'seven'], function($e){ return stripos($e,'ee'); } ) ).PHP_EOL; echo 'RESET: '.reset( array_filter([3=>'three',7=>'seven'], function($e){ return stripos($e,'ee'); } ) );
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.30, 7.4.0 - 7.4.23, 8.0.0 - 8.0.11, 8.1rc1 - rc2
CURRENT: three Notice: Only variables should be passed by reference in /in/sUrcB on line 14 RESET: three

preferences:
100.96 ms | 535 KiB | 20 Q