3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Contacts = [ [ 'name' => 'name 1', 'phone' => '12341234', 'email' => 'test@web.com' ], [ 'name' => 'name 1', 'phone' => '12341234', 'email' => 'test@web.com' ], [ 'name' => 'name 3', 'phone' => '4322342', 'email' => 'test@web1.com' ], [ 'name' => 'name 4', 'phone' => '1234123423', 'email' => 'test@web1.com' ], [ 'name' => 'name 5', 'phone' => '12341266634', 'email' => 'test@eqweqwweb.com' ], ]; $start = microtime(true); // function CheckDuplicteContacts($Contacts) // { if(count($Contacts) == 1){ return $validator = true; } else { $DuplicateLines = []; foreach($Contacts as $CurrentKey => $Contact) { foreach($Contacts as $SearchKey => $SearchContact) { if( ( ($SearchContact["name"] == $Contact["name"]) && ($SearchContact["email"] == $Contact["email"]) && ($SearchContact["phone"] == $Contact["phone"]) ) && ($SearchKey != $CurrentKey)) { array_push($DuplicateLines,$CurrentKey + 1); } } } $validator = empty($DuplicateLines) ? true : $DuplicateLines; } // } var_dump($validator); echo (microtime(true) -$start)*100;
Output for git.master
array(2) { [0]=> int(1) [1]=> int(2) } 0.0093936920166016
Output for git.master_jit
array(2) { [0]=> int(1) [1]=> int(2) } 0.011515617370605

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:
15.12 ms | 406 KiB | 5 Q