3v4l.org

run code in 300+ PHP versions simultaneously
<?php $img=array( array("iamge"=>"1234_asd.jpg"), array("iamge"=>"1235_ase.jpg"), array("iamge"=>"1236_asf.jpg") ); $imgArr=array( array("iamgename"=>"1234_asd.jpg"), array("iamgename"=>"1235_ase.jpg"), array("iamgename"=>"1236_asf.jpg"), array("iamgename"=>"1237_asg.jpg") ); function bjsearch($img, $seachimg){ $result = true; if(!in_array($seachimg, $img)){ $result = false; } return $result; } $found = true; $image_name = ''; foreach($imgArr as $k=>$im){ $seachInArr = isset($img[$k]) ? $img[$k] : array(); $res = bjsearch($seachInArr, $im['iamgename']); if($res === false){ $found = false; $image_name = $im['iamgename']; } } var_dump($found, $image_name);
Output for git.master, git.master_jit, rfc.property-hooks
bool(false) string(12) "1237_asg.jpg"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
28.76 ms | 401 KiB | 8 Q