3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=array("joe","sarah","jaison","klai","hanna"); if(in_array('Joe' ,$array ,true)){ echo "yeb,i know him !"; }else{ echo "i dont know him"; }
based on 491ZS
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.24, 7.4.0 - 7.4.12, 8.0.0
i dont know him