3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'inputs', 'app', 'post', 'server', ]; echo in_array('inputs', $array) ? '"inputs" is in the array...' : ''; echo "\n"; echo in_array(0, $array) ? '0 is also in the array!' : '0 is NOT in the array!'; echo "\n"; echo in_array(0, $array, true) ? '0 is also in the array!' : '0 is NOT in the array!'; echo "\n"; echo in_array(1, $array) ? '1 is also in the array!' : '1 is NOT in the array!'; echo "\n"; print_r(array_keys($array, 0));

preferences:
29.22 ms | 406 KiB | 5 Q