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;
Output for 7.1.0
0.0006859302520752
Output for 7.0.14
0.00068902969360352
Output for 7.0.6
0.0004270076751709
Output for 7.0.5
0.00066590309143066
Output for 7.0.4
0.00050497055053711
Output for 7.0.3
0.00086522102355957
Output for 7.0.2
0.00059103965759277
Output for 7.0.1
0.0006561279296875
Output for 7.0.0
0.00045204162597656
Output for 5.6.28
0.0078508853912354
Output for 5.6.21
0.005040168762207
Output for 5.6.20
0.0055949687957764
Output for 5.6.19
0.0063650608062744
Output for 5.6.18
0.0059020519256592
Output for 5.6.17
0.004490852355957
Output for 5.6.16
0.0071580410003662
Output for 5.6.15
0.0057520866394043
Output for 5.6.14
0.0046658515930176
Output for 5.6.13
0.0057611465454102
Output for 5.6.12
0.0054211616516113
Output for 5.6.11
0.00543212890625
Output for 5.6.10
0.0068280696868896
Output for 5.6.9
0.0074219703674316
Output for 5.6.8
0.0073208808898926
Output for 5.6.7
0.007526159286499
Output for 5.5.35
0.006303071975708
Output for 5.5.34
0.0061321258544922
Output for 5.5.33
0.0086309909820557
Output for 5.5.32
0.0063889026641846
Output for 5.5.31
0.0059349536895752
Output for 5.5.30
0.008080005645752
Output for 5.5.29
0.0069880485534668
Output for 5.5.28
0.0070328712463379
Output for 5.5.27
0.0072610378265381
Output for 5.5.26
0.0073919296264648
Output for 5.5.25
0.0068831443786621
Output for 5.5.24
0.0045888423919678
Output for 5.4.45
0.0070450305938721
Output for 5.4.44
0.008018970489502
Output for 5.4.43
0.01230788230896
Output for 5.4.42
0.011795043945312
Output for 5.4.41
0.012010097503662
Output for 5.4.40
0.016364097595215
Output for 5.4.39
0.0081939697265625
Output for 5.4.38
0.0081250667572021
Output for 5.4.37
0.0089700222015381
Output for 5.4.36
0.01256799697876
Output for 5.4.35
0.014708042144775
Output for 5.4.34
0.0091829299926758
Output for 5.4.32
0.0051829814910889
Output for 5.4.31
0.0049641132354736
Output for 5.4.30
0.0051319599151611
Output for 5.4.29
0.0088720321655273
Output for 5.4.28
0.0063140392303467
Output for 5.4.27
0.054225921630859
Output for 5.4.26
0.010013818740845
Output for 5.4.25
0.0095229148864746
Output for 5.4.24
0.0061419010162354
Output for 5.4.23
0.005573034286499
Output for 5.4.22
0.007969856262207
Output for 5.4.21
0.0091500282287598
Output for 5.4.20
0.0052638053894043
Output for 5.4.19
0.0099270343780518
Output for 5.4.18
0.0092170238494873
Output for 5.4.17
0.011850833892822
Output for 5.4.16
0.011419057846069
Output for 5.4.15
0.0090649127960205
Output for 5.4.14
0.0054068565368652
Output for 5.4.13
0.0062282085418701
Output for 5.4.12
0.0059230327606201
Output for 5.4.11
0.0093860626220703
Output for 5.4.10
0.0090160369873047
Output for 5.4.9
0.0065979957580566
Output for 5.4.8
0.0054380893707275
Output for 5.4.7
0.0090498924255371
Output for 5.4.6
0.0054419040679932
Output for 5.4.5
0.005620002746582
Output for 5.4.4
0.0068380832672119
Output for 5.4.3
0.0064899921417236
Output for 5.4.2
0.0094878673553467
Output for 5.4.1
0.010149002075195
Output for 5.4.0
0.011547088623047
Output for 5.3.29
0.0051610469818115
Output for 5.2.5, 5.3.28
0.0082590579986572
Output for 5.3.27
0.0059280395507812
Output for 5.3.26
0.0053579807281494
Output for 5.3.25
0.0058889389038086
Output for 5.3.24
0.0050060749053955
Output for 5.3.23
0.0086209774017334
Output for 5.3.22
0.0087440013885498
Output for 5.3.21
0.0052318572998047
Output for 5.3.20
0.0049848556518555
Output for 5.3.19
0.0048909187316895
Output for 5.3.18
0.0050139427185059
Output for 5.3.17
0.0050699710845947
Output for 5.3.16
0.0050270557403564
Output for 5.3.15
0.0048520565032959
Output for 5.3.14
0.0087680816650391
Output for 5.3.13
0.0093281269073486
Output for 5.3.12
0.0052931308746338
Output for 5.3.11
0.0081300735473633
Output for 5.3.10
0.0099709033966064
Output for 5.3.9
0.0062248706817627
Output for 5.3.8
0.0089559555053711
Output for 5.3.7
0.005465030670166
Output for 5.3.6
0.0062668323516846
Output for 5.3.5
0.0092010498046875
Output for 5.3.4
0.0099070072174072
Output for 5.3.3
0.0076429843902588
Output for 5.3.2
0.010302066802979
Output for 5.3.1
0.0055639743804932
Output for 5.3.0
0.009188175201416
Output for 5.2.17
0.009890079498291
Output for 5.2.16
0.0096051692962646
Output for 5.2.15
0.028341054916382
Output for 5.2.14
0.0087840557098389
Output for 5.2.13
0.0076169967651367
Output for 5.2.12
0.026235103607178
Output for 5.2.11
0.0088579654693604
Output for 5.2.10
0.0087559223175049
Output for 5.2.9
0.0098249912261963
Output for 5.2.8
0.0065569877624512
Output for 5.2.7
0.011252880096436
Output for 5.2.6
0.019972085952759
Output for 5.2.4
0.01114296913147
Output for 5.2.3
0.0072038173675537
Output for 5.2.2
0.0062289237976074
Output for 5.2.1
0.012141942977905
Output for 5.2.0
0.0076611042022705
Output for 5.1.6
0.0083959102630615
Output for 5.1.5
0.0078079700469971
Output for 5.1.4
0.0081110000610352
Output for 5.1.3
0.013004064559937
Output for 5.1.2
0.013087034225464
Output for 5.1.1
0.0074059963226318
Output for 5.1.0
0.0074939727783203
Output for 5.0.5
0.0097520351409912
Output for 5.0.4
0.014097929000854
Output for 5.0.3
0.012071847915649
Output for 5.0.2
0.014862060546875
Output for 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QpX4M on line 15 0.0086290836334229PHP_EOL
Output for 5.0.0
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QpX4M on line 15 0.0083410739898682PHP_EOL
Output for 4.4.9
0.008146
Output for 4.4.8
0.009073
Output for 4.4.7
0.009535
Output for 4.4.6
0.015038
Output for 4.4.5
0.061876
Output for 4.4.4
0.015173
Output for 4.4.3
0.009516
Output for 4.4.2
0.008639
Output for 4.4.1
0.008562
Output for 4.4.0
0.009039
Output for 4.3.11
0.008793
Output for 4.3.10
0.008951
Output for 4.3.9
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QpX4M on line 15 0.008793PHP_EOL
Output for 4.3.8
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QpX4M on line 15 0.0086PHP_EOL
Output for 4.3.7
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QpX4M on line 15 0.008654PHP_EOL
Output for 4.3.6
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QpX4M on line 15 0.008224PHP_EOL
Output for 4.3.5
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QpX4M on line 15 0.008509PHP_EOL
Output for 4.3.4
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QpX4M on line 15 0.008551PHP_EOL
Output for 4.3.3
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QpX4M on line 15 0.0085900000000001PHP_EOL
Output for 4.3.2
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QpX4M on line 15 0.009452PHP_EOL
Output for 4.3.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QpX4M on line 15 0.009554PHP_EOL
Output for 4.3.0
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QpX4M on line 15 0.012291PHP_EOL