3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array ( 0 => array ( 'Parcel No' => 'PBIR3119358001', 'Status' => 'Delivered', 'Date' => '2/12/2010', 'Time' => '1:39', 'Signed for by' => 'MR MOUHAMMED', ), 1 => array ( 'Parcel No' => 'PBIR3119358002', 'Status' => 'Delivered', 'Date' => '2/12/2010', 'Time' => '1:39', 'Signed for by' => 'MR MOUHAMMED', ), 2 => array ( 'Parcel No' => 'PBIR3119358003', 'Status' => 'Delivered', 'Date' => '2/12/2010', 'Time' => '1:39', 'Signed for by' => 'MR MOUHAMMED', ) ); $b = array ( 0 => array ( 'Parcel No' => 'PBIR3119358000', 'Status' => 'Delivered', 'Date' => '2/12/2010', 'Time' => '1:39', 'Signed for by' => 'MR MOUHAMMED', ), 1 => array ( 'Parcel No' => 'PBIR3119358002', 'Status' => 'Delivered', 'Date' => '2/12/2010', 'Time' => '1:39', 'Signed for by' => 'MR MOUHAMMED', ), 2 => array ( 'Parcel No' => 'PBIR3119358003', 'Status' => 'Delivered', 'Date' => '2/12/2010', 'Time' => '1:39', 'Signed for by' => 'MR MOUHAMMED', ) ); if (compare_consignment($a, $b)) { echo 'Mached'; } else { echo 'Not matched'; } function compare_consignment($original, $con) { if(count($original) != count($con)) { return FALSE; } foreach ($original as $val) { if (!in_array($val, $con)) { return FALSE; } } return TRUE; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Not matched