3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /** leavecalc Copyright (C) 2014 Paul White This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ //Access every element once using array_filter() $objectArray = []; $objectNames = []; for($i = 0; $i < 1000; $i ++){ $objName = 'object_name_' . ($i + 1); $objectNames[] = $objName; $obj = new stdClass(); $obj->name = $objName; $obj->description = 'test description'; $obj->accessed = 0; $objectArray[] = $obj; } $start = microtime(true); foreach($objectNames as $name){ $iterations = getObjectWithArray_Filter($name, $objectArray); } $end = microtime(true); $taken = $end - $start; echo "Accessing 1000 elements once took " . $iterations . " iterations using array_filter() in $taken seconds<br/>\n"; //Access every element once using foreach(){} $objectArray = []; $objectNames = []; for($i = 0; $i < 1000; $i ++){ $objName = 'object_name_' . ($i + 1); $objectNames[] = $objName; $obj = new stdClass(); $obj->name = $objName; $obj->description = 'test description'; $obj->accessed = 0; $objectArray[] = $obj; } $start = microtime(true); foreach($objectNames as $name){ $iterations = getObjectWithForeach($name, $objectArray); } $end = microtime(true); $taken = $end - $start; echo "Accessing 1000 elements once took " . $iterations . " iterations using foreach(){} in $taken seconds<br/>\n"; //Access every element once using Associative array $objectArray = []; $objectNames = []; for($i = 0; $i < 1000; $i ++){ $objName = 'object_name_' . ($i + 1); $objectNames[] = $objName; $obj = new stdClass(); $obj->name = $objName; $obj->description = 'test description'; $obj->accessed = 0; $objectArray[] = $obj; } $associativeArray = []; $start = microtime(true); foreach($objectArray as $object){ $associativeArray[$object->name] = $object; $object->accessed ++; } foreach($objectNames as $name){ $iterations = getObjectFromAssociativeArray($objName, $associativeArray); } $end = microtime(true); $taken = $end - $start; echo "Accessing 1000 elements once took " . $iterations . " iterations using associative array{} in $taken seconds<br/>\n"; //================================================================= function getObjectWithArray_Filter($objectName, array $objectArray){ $myobjects = array_filter($objectArray, function($e) use($objectName) { $e->accessed ++; return strcmp($e->name, $objectName) == 0; }); $iterations = 0; foreach($objectArray as $object){ $iterations += $object->accessed; } return $iterations; } function getObjectWithForeach($objectName, array $objectArray){ $iterations = 0; $found = false; $count = 0; while(!$found){ $objectArray[$count]->accessed ++; if($objectArray[$count]->name === $objectName){ $found = true; } $count ++; } foreach($objectArray as $object){ $iterations += $object->accessed; } return $iterations; } function getObjectFromAssociativeArray($objectName, array $objectArray){ $iterations = 0; if($objectName === $objectArray[$objectName]->name){ $objectArray[$objectName]->accessed ++; } foreach($objectArray as $object){ $iterations += $object->accessed; } return $iterations; }
Output for 7.1.0
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.16325306892395 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.057605981826782 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.033262968063354 seconds<br/>
Output for 7.0.14
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.21642589569092 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.057158946990967 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.032222986221313 seconds<br/>
Output for 7.0.6
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.20615220069885 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.064898014068604 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.038155078887939 seconds<br/>
Output for 7.0.5
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.20245003700256 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.065681934356689 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.038784027099609 seconds<br/>
Output for 7.0.4
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.19888591766357 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.064750909805298 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.037809133529663 seconds<br/>
Output for 7.0.3
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.20293092727661 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.065331935882568 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.038011074066162 seconds<br/>
Output for 7.0.2
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.20807290077209 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.06485390663147 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.038902997970581 seconds<br/>
Output for 7.0.1
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.217689037323 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.06912088394165 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.040050029754639 seconds<br/>
Output for 7.0.0
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.21499300003052 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.065371036529541 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.039022922515869 seconds<br/>
Output for hhvm-3.12.0
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.48382902145386 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.24732422828674 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12613201141357 seconds<br/>
Output for hhvm-3.10.0
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.54515981674194 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.27141618728638 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.1405029296875 seconds<br/>
Output for 5.6.28
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.42973709106445 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.15128803253174 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.095850944519043 seconds<br/>
Output for 5.6.21
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.45144701004028 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19254803657532 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12694597244263 seconds<br/>
Output for 5.6.20
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.45983386039734 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19202899932861 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12743902206421 seconds<br/>
Output for 5.6.19
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.44195508956909 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19121694564819 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12033200263977 seconds<br/>
Output for 5.6.18
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.43379211425781 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.18382596969604 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11664390563965 seconds<br/>
Output for 5.6.17
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.61905193328857 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.26446485519409 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.15381693840027 seconds<br/>
Output for 5.6.16
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.45353484153748 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19617891311646 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12641501426697 seconds<br/>
Output for 5.6.15
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.45342898368835 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.185142993927 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11282396316528 seconds<br/>
Output for 5.6.14
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.48165488243103 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.1950671672821 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12954998016357 seconds<br/>
Output for 5.6.13
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.46233797073364 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.1929759979248 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12442398071289 seconds<br/>
Output for 5.6.12
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.45243692398071 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19188404083252 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12843608856201 seconds<br/>
Output for 5.6.11
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.45471405982971 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19262313842773 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12648296356201 seconds<br/>
Output for 5.6.10
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.46593499183655 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19133400917053 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12469482421875 seconds<br/>
Output for 5.6.9
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.46275401115417 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19105195999146 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12663197517395 seconds<br/>
Output for 5.6.8
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.4468400478363 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.18083906173706 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11780118942261 seconds<br/>
Output for 5.6.7
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.45406889915466 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.18942904472351 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12869787216187 seconds<br/>
Output for 5.5.35
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.50982689857483 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.22132992744446 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12631297111511 seconds<br/>
Output for 5.5.34
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.6200110912323 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.24635410308838 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.17282605171204 seconds<br/>
Output for 5.5.33
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.45435285568237 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.1852240562439 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11917090415955 seconds<br/>
Output for 5.5.32
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.42472410202026 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.18178200721741 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11900210380554 seconds<br/>
Output for 5.5.31
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.43713021278381 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.18738889694214 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12124705314636 seconds<br/>
Output for 5.5.30
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.48888087272644 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19753503799438 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.13172388076782 seconds<br/>
Output for 5.5.29
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.48770713806152 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19811201095581 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.13023614883423 seconds<br/>
Output for 5.5.28
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.48446607589722 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19802308082581 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12794804573059 seconds<br/>
Output for 5.5.27
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.64359092712402 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.25028204917908 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.14673686027527 seconds<br/>
Output for 5.5.26
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.46996283531189 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.20016193389893 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.13350892066956 seconds<br/>
Output for 5.5.25
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.48431897163391 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.18442988395691 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.1213960647583 seconds<br/>
Output for 5.5.24
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.47406697273254 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19898009300232 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.1333920955658 seconds<br/>
Output for 5.4.45
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.45080304145813 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.18061494827271 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11915802955627 seconds<br/>
Output for 5.4.44
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.42323708534241 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.18942999839783 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11721897125244 seconds<br/>
Output for 5.4.43
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.43051910400391 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17790293693542 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11647987365723 seconds<br/>
Output for 5.4.42
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.45550990104675 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.20258212089539 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.13204598426819 seconds<br/>
Output for 5.4.41
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.48367309570312 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.20312094688416 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.13429689407349 seconds<br/>
Output for 5.4.40
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.42042589187622 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17691993713379 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11704707145691 seconds<br/>
Output for 5.4.39
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.41529703140259 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17791891098022 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11639595031738 seconds<br/>
Output for 5.4.38
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.4764130115509 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.18128895759583 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11826181411743 seconds<br/>
Output for 5.4.37
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.42756009101868 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17582821846008 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11568403244019 seconds<br/>
Output for 5.4.36
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.41216206550598 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.1751070022583 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11555695533752 seconds<br/>
Output for 5.4.35
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.47384786605835 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19924211502075 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.13163185119629 seconds<br/>
Output for 5.4.34
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.41943693161011 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17655086517334 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11612582206726 seconds<br/>
Output for 5.4.32
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.43543100357056 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17894697189331 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11785292625427 seconds<br/>
Output for 5.4.31
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.42135787010193 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17708611488342 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.1172559261322 seconds<br/>
Output for 5.4.30
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.44376111030579 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.18758106231689 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11525511741638 seconds<br/>
Output for 5.4.29
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.42765593528748 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17893099784851 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11600089073181 seconds<br/>
Output for 5.4.28
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.44179010391235 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.18239688873291 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11779880523682 seconds<br/>
Output for 5.4.27
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.42949795722961 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17843890190125 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11602783203125 seconds<br/>
Output for 5.4.26
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.54670119285583 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.22619485855103 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.13436794281006 seconds<br/>
Output for 5.4.25
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.47707390785217 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19891619682312 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12769508361816 seconds<br/>
Output for 5.4.24
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.45323204994202 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17842888832092 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.1159360408783 seconds<br/>
Output for 5.4.23
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.44776511192322 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17933511734009 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.1173529624939 seconds<br/>
Output for 5.4.22
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.43770599365234 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17986106872559 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11879181861877 seconds<br/>
Output for 5.4.21
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.43876814842224 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.18043899536133 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11584997177124 seconds<br/>
Output for 5.4.20
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.46003389358521 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19348120689392 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12787079811096 seconds<br/>
Output for 5.4.19
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.43216609954834 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17581796646118 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.1152651309967 seconds<br/>
Output for 5.4.18
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.46823215484619 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19431400299072 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12003183364868 seconds<br/>
Output for 5.4.17
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.49606204032898 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17743706703186 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11569285392761 seconds<br/>
Output for 5.4.16
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.46714615821838 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17738103866577 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11497592926025 seconds<br/>
Output for 5.4.15
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.43480205535889 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.1813428401947 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11755609512329 seconds<br/>
Output for 5.4.14
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.50194883346558 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17956113815308 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11729097366333 seconds<br/>
Output for 5.4.13
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.41921496391296 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17281579971313 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11500906944275 seconds<br/>
Output for 5.4.12
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.43489193916321 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.1798141002655 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12014698982239 seconds<br/>
Output for 5.4.11
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.44659614562988 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17796587944031 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12078189849854 seconds<br/>
Output for 5.4.10
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.42416000366211 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17596817016602 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11612296104431 seconds<br/>
Output for 5.4.9
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.43317794799805 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17638087272644 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11543893814087 seconds<br/>
Output for 5.4.8
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.41804313659668 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17707109451294 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11629700660706 seconds<br/>
Output for 5.4.7
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.42880582809448 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17690706253052 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11486482620239 seconds<br/>
Output for 5.4.6
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.4284839630127 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17526292800903 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11456084251404 seconds<br/>
Output for 5.4.5
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.43026900291443 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17722105979919 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11692309379578 seconds<br/>
Output for 5.4.4
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.45220518112183 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19477391242981 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.12785696983337 seconds<br/>
Output for 5.4.3
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.45263385772705 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.18843293190002 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11781597137451 seconds<br/>
Output for 5.4.2
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.48621416091919 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.19763803482056 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.13398289680481 seconds<br/>
Output for 5.4.1
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.43919610977173 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17765998840332 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11620402336121 seconds<br/>
Output for 5.4.0
Accessing 1000 elements once took 1000000 iterations using array_filter() in 0.42774295806885 seconds<br/> Accessing 1000 elements once took 500500 iterations using foreach(){} in 0.17717695236206 seconds<br/> Accessing 1000 elements once took 2000 iterations using associative array{} in 0.11825299263 seconds<br/>
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/DWDvB on line 21
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/DWDvB on line 21
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/DWDvB on line 21
Process exited with code 255.