3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = 'test'; $arr = ['test','test2', 'test3', 'test4']; if(false !== $key = !array_search($test, $arr)){ echo $key; }

preferences:
54.37 ms | 402 KiB | 5 Q