3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tstart = microtime(true); $numberOfRandoms = 500; $uniques = array(); do { $uniques[mt_rand(10000, 99999)] = true; } while(count(array_keys($uniques)) < $numberOfRandoms); $uniques = array_keys($uniques); $elapsed = microtime(true) - $tstart; echo $elapsed . PHP_EOL; $tstart = microtime(true); $uniques = range(10000, 99999); shuffle($uniques); $uniques = array_slice($uniques, 0, 500); $elapsed = microtime(true) - $tstart; echo $elapsed . PHP_EOL;
Output for 7.1.0
0.00070309638977051 0.0051748752593994
Output for 7.0.14
0.00066280364990234 0.0032169818878174
Output for 7.0.6
0.00069499015808105 0.0044350624084473
Output for 7.0.5
0.0004119873046875 0.0023360252380371
Output for 7.0.4
0.00046801567077637 0.0028378963470459
Output for 7.0.3
0.00049495697021484 0.006443977355957
Output for 7.0.2
0.00051784515380859 0.0068519115447998
Output for 7.0.1
0.00041580200195312 0.0029430389404297
Output for 7.0.0
0.00064301490783691 0.0040929317474365
Output for 5.6.28
0.0078380107879639 0.040934801101685
Output for 5.6.21
0.0074248313903809 0.040789127349854
Output for 5.6.20
0.0071609020233154 0.043387889862061
Output for 5.6.19
0.0066142082214355 0.04047679901123
Output for 5.6.18
0.0058550834655762 0.036095857620239
Output for 5.6.17
0.0061769485473633 0.036848068237305
Output for 5.6.16
0.0050029754638672 0.028795003890991
Output for 5.6.15
0.0054419040679932 0.03560996055603
Output for 5.6.14
0.0045108795166016 0.033205986022949
Output for 5.6.13
0.0071959495544434 0.040709018707275
Output for 5.6.12
0.0055820941925049 0.038187026977539
Output for 5.6.11
0.0068280696868896 0.035892963409424
Output for 5.6.10
0.0044150352478027 0.028977870941162
Output for 5.6.9
0.0071480274200439 0.037810087203979
Output for 5.6.8
0.0065529346466064 0.031974077224731
Output for 5.6.7
0.0044999122619629 0.024946928024292
Output for 5.5.35
0.0071899890899658 0.039106845855713
Output for 5.5.34
0.007133960723877 0.052913904190063
Output for 5.5.33
0.0085921287536621 0.048608064651489
Output for 5.5.32
0.0058369636535645 0.044136047363281
Output for 5.5.31
0.0051858425140381 0.034204959869385
Output for 5.5.30
0.0044338703155518 0.044217824935913
Output for 5.5.29
0.0046200752258301 0.030929088592529
Output for 5.5.28
0.0066180229187012 0.044052839279175
Output for 5.5.27
0.007951021194458 0.043997049331665
Output for 5.5.26
0.0072829723358154 0.042691946029663
Output for 5.5.25
0.0072259902954102 0.043046951293945
Output for 5.5.24
0.0066921710968018 0.042972087860107
Output for 5.4.45
0.0066070556640625 0.058093786239624
Output for 5.4.44
0.012793064117432 0.13061594963074
Output for 5.4.43
0.0075411796569824 0.094244003295898
Output for 5.4.42
0.0068900585174561 0.098474979400635
Output for 5.4.41
0.0078940391540527 0.075967073440552
Output for 5.4.40
0.0090041160583496 0.11195683479309
Output for 5.4.39
0.0083670616149902 0.096353054046631
Output for 5.4.38
0.0093998908996582 0.11347794532776
Output for 5.4.37
0.007559061050415 0.10426211357117
Output for 5.4.36
0.010705947875977 0.1592321395874
Output for 5.4.35
0.010540008544922 0.13826680183411
Output for 5.4.34
0.013553857803345 0.12122821807861
Output for 5.4.32
0.0050749778747559 0.050827026367188
Output for 5.4.31
0.0050671100616455 0.048305034637451
Output for 5.4.30
0.0050630569458008 0.048590183258057
Output for 5.4.29
0.005112886428833 0.051852941513062
Output for 5.4.28
0.0097529888153076 0.073554039001465
Output for 5.4.27
0.010879039764404 0.094287157058716
Output for 5.4.26
0.014971971511841 0.065085172653198
Output for 5.4.25
0.0055780410766602 0.055988073348999
Output for 5.4.24
0.0054941177368164 0.059503078460693
Output for 5.4.23
0.0062229633331299 0.056232213973999
Output for 5.4.22
0.0055558681488037 0.056258916854858
Output for 5.4.21
0.0054571628570557 0.052905082702637
Output for 5.4.20
0.0054957866668701 0.057698011398315
Output for 5.4.19
0.0091860294342041 0.067563056945801
Output for 5.4.18
0.0095047950744629 0.068077087402344
Output for 5.4.17
0.0055890083312988 0.060786008834839
Output for 5.4.16
0.010050058364868 0.069055080413818
Output for 5.4.15
0.010880947113037 0.086113929748535
Output for 5.4.14
0.0092499256134033 0.071309804916382
Output for 5.4.13
0.0093791484832764 0.066023111343384
Output for 5.4.12
0.0074529647827148 0.061050891876221
Output for 5.4.11
0.0094430446624756 0.065186023712158
Output for 5.4.10
0.010334014892578 0.061985015869141
Output for 5.4.9
0.0058929920196533 0.055941820144653
Output for 5.4.8
0.0057759284973145 0.06821608543396
Output for 5.4.7
0.010236024856567 0.073346853256226
Output for 5.4.6
0.010129928588867 0.070328950881958
Output for 5.4.5
0.0097460746765137 0.080672979354858
Output for 5.4.4
0.0099828243255615 0.068574905395508
Output for 5.4.3
0.010820865631104 0.078730821609497
Output for 5.4.2
0.010344982147217 0.073371887207031
Output for 5.4.1
0.01029896736145 0.074556112289429
Output for 5.4.0
0.0054600238800049 0.060828924179077
Output for 5.3.29
0.0053799152374268 0.051208019256592
Output for 5.3.28
0.020236015319824 0.083922863006592
Output for 5.3.27
0.0091309547424316 0.084329843521118
Output for 5.3.26
0.0056169033050537 0.057492017745972
Output for 5.3.25
0.0054149627685547 0.05534291267395
Output for 5.3.24
0.0091531276702881 0.067796230316162
Output for 5.3.23
0.010271072387695 0.072726964950562
Output for 5.3.22
0.01165509223938 0.081072092056274
Output for 5.3.21
0.010539054870605 0.080520868301392
Output for 5.3.20
0.0097389221191406 0.1120080947876
Output for 5.3.19
0.011101961135864 0.075149059295654
Output for 5.3.18
0.0081121921539307 0.063177108764648
Output for 5.3.17
0.010035991668701 0.1083288192749
Output for 5.3.16
0.0093250274658203 0.071030855178833
Output for 5.3.15
0.009505033493042 0.073601007461548
Output for 5.3.14
0.024683952331543 0.11682915687561
Output for 5.3.13
0.0091671943664551 0.071267127990723
Output for 5.3.12
0.0092439651489258 0.071058988571167
Output for 5.3.11
0.01356315612793 0.074266910552979
Output for 5.3.10
0.009915828704834 0.071153879165649
Output for 5.3.9
0.0088510513305664 0.068268060684204
Output for 5.3.8
0.0088322162628174 0.076455116271973
Output for 5.3.7
0.010428190231323 0.072490930557251
Output for 5.3.6
0.0058770179748535 0.071147918701172
Output for 5.3.5
0.009084939956665 0.067046165466309
Output for 5.3.4
0.0058550834655762 0.062514066696167
Output for 5.3.3
0.005889892578125 0.061198949813843
Output for 5.3.2
0.006990909576416 0.059031009674072
Output for 5.3.1
0.0060019493103027 0.064409017562866
Output for 5.3.0
0.0097200870513916 0.077423810958862
Output for 5.2.17
0.010520935058594 0.08643913269043
Output for 5.2.16
0.010120153427124 0.071633100509644
Output for 5.2.15
0.021336078643799 0.061370849609375
Output for 5.2.14
0.012161016464233 0.057791948318481
Output for 5.2.13
0.011487007141113 0.071808099746704
Output for 5.2.12
0.011833906173706 0.067838191986084
Output for 5.2.11
0.0093369483947754 0.062964916229248
Output for 5.2.10
0.011695146560669 0.071631908416748
Output for 5.2.9
0.0096981525421143 0.060700178146362
Output for 5.2.8
0.0096862316131592 0.063997030258179
Output for 5.2.7
0.0096790790557861 0.064568996429443
Output for 5.2.6
0.012469053268433 0.081165075302124
Output for 5.2.5
0.010552167892456 0.090152025222778
Output for 5.2.4
0.01062798500061 0.070562839508057
Output for 5.2.3
0.010545969009399 0.077243089675903
Output for 5.2.2
0.01227593421936 0.074625015258789
Output for 5.2.1
0.010799169540405 0.06965708732605
Output for 5.2.0
0.011222839355469 0.061752080917358
Output for 5.1.6
0.0077669620513916 0.054189920425415
Output for 5.1.5
0.0080771446228027 0.054701089859009
Output for 5.1.4
0.013827085494995 0.072488069534302
Output for 5.1.3
0.013590097427368 0.070820093154907
Output for 5.1.2
0.01256799697876 0.069911003112793
Output for 5.1.1
0.013385057449341 0.072345972061157
Output for 5.1.0
0.015785932540894 0.076020956039429
Output for 5.0.5
0.016242027282715 0.068594932556152
Output for 5.0.4
0.016844987869263 0.065674066543579
Output for 5.0.3
0.01491904258728 0.056720972061157
Output for 5.0.2
0.0097119808197021 0.055917978286743
Output for 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 16 0.009984016418457PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 28 0.056051969528198PHP_EOL
Output for 5.0.0
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 16 0.0095150470733643PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 28 0.073585987091064PHP_EOL
Output for 4.4.9
0.010951 0.064021
Output for 4.4.8
0.012128 0.061563
Output for 4.4.7
0.011306 0.060071
Output for 4.4.6
0.011132 0.057303
Output for 4.4.5
0.008729 0.054369
Output for 4.4.4
0.0092110000000001 0.061652
Output for 4.4.3
0.012083 0.057728
Output for 4.4.2
0.009978 0.057158
Output for 4.4.1
0.009856 0.070309
Output for 4.4.0
0.012414 -0.926152
Output for 4.3.11
0.017846 0.073223
Output for 4.3.10
0.009642 0.055844
Output for 4.3.9
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 16 0.009389PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 28 0.056246PHP_EOL
Output for 4.3.8
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 16 0.008421PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 28 0.054437PHP_EOL
Output for 4.3.7
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 16 0.01459PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 28 0.058827PHP_EOL
Output for 4.3.6
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 16 0.009834PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 28 0.054374PHP_EOL
Output for 4.3.5
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 16 0.012485PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 28 0.056757PHP_EOL
Output for 4.3.4
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 16 0.0087119999999999PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 28 0.054724PHP_EOL
Output for 4.3.3
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 16 0.011035PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 28 0.055205PHP_EOL
Output for 4.3.2
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 16 0.014696PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 28 0.064901PHP_EOL
Output for 4.3.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 16 0.016851PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 28 0.09667PHP_EOL
Output for 4.3.0
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 16 0.014292PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/tEKS7 on line 28 0.075286PHP_EOL