3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrayB = array ( 0 => array ( 'order_option_detail' => array ( 0 => array ( 'option_id' => '19', 'sub_option_id' => '57', ), 1 => array ( 'option_id' => '1093', 'sub_option_id' => '57', ), 2 => array ( 'option_id' => '1093', 'sub_option_id' => '3582', ), ), ), 1 => array ( 'order_option_detail' => array ( 0 => array ( 'option_id' => '1', 'sub_option_id' => '2', ), ), ), ); $arrayA = array ( 0 => array ( 'option_id' => '19', 'sub_option_id' => '57', ), 1 => array ( 'option_id' => '1093', 'sub_option_id' => '3582', ), 2 => array ( 'option_id' => '1093', 'sub_option_id' => '57', ), ); $details = array_column($arrayB, 'order_option_detail'); foreach($details as $detail){ // loop the two items. if($detail === $arrayA){ echo "true"; // Do something } }
Output for git.master, git.master_jit, rfc.property-hooks

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:
883.22 ms | 405 KiB | 5 Q