3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(); for ($i = 0; $i < 10000; ++$i) { $v = rand(1, 1000000); $a[$v] = $v; } echo "Size: ", count($a), PHP_EOL; $start = microtime( true ); for ($i = 0; $i < 10000; ++$i) { isset($a[rand(1, 1000000)]); } $total_time = microtime( true ) - $start; echo "Total time: ", number_format($total_time, 6), PHP_EOL; $start = microtime( true ); for ($i = 0; $i < 10000; ++$i) { in_array(rand(1, 1000000), $a); } $total_time = microtime( true ) - $start; echo "Total time: ", number_format($total_time, 6), PHP_EOL;
Output for 7.1.0
Size: 9957 Total time: 0.001631 Total time: 0.177455
Output for 7.0.14
Size: 9948 Total time: 0.001194 Total time: 0.153811
Output for 7.0.6
Size: 9943 Total time: 0.001140 Total time: 0.160130
Output for 7.0.5
Size: 9950 Total time: 0.000774 Total time: 0.118136
Output for 7.0.4
Size: 9951 Total time: 0.000772 Total time: 0.150414
Output for 7.0.3
Size: 9944 Total time: 0.001082 Total time: 0.161394
Output for 7.0.2
Size: 9964 Total time: 0.001230 Total time: 0.161188
Output for 7.0.1
Size: 9951 Total time: 0.000983 Total time: 0.152136
Output for 7.0.0
Size: 9969 Total time: 0.000896 Total time: 0.151128
Output for hhvm-3.12.0
Size: 9952 Total time: 0.004623 Total time: 1.386557
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
Size: 9952 Total time: 0.002695 Total time: 1.058523
Output for 5.6.21
Size: 9949 Total time: 0.002295 Total time: 1.398784
Output for 5.6.20
Size: 9962 Total time: 0.002195 Total time: 1.392337
Output for 5.6.19
Size: 9952 Total time: 0.002131 Total time: 1.440143
Output for 5.6.18
Size: 9951 Total time: 0.001398 Total time: 1.340542
Output for 5.6.17
Size: 9958 Total time: 0.001486 Total time: 1.365889
Output for 5.6.16
Size: 9942 Total time: 0.002245 Total time: 1.408370
Output for 5.6.15
Size: 9958 Total time: 0.002625 Total time: 1.494945
Output for 5.6.14
Size: 9952 Total time: 0.002298 Total time: 1.416414
Output for 5.6.13
Size: 9945 Total time: 0.002166 Total time: 1.399725
Output for 5.6.12
Size: 9948 Total time: 0.001787 Total time: 1.369547
Output for 5.6.11
Size: 9947 Total time: 0.001573 Total time: 1.364567
Output for 5.6.10
Size: 9944 Total time: 0.001712 Total time: 1.380744
Output for 5.6.9
Size: 9957 Total time: 0.002079 Total time: 1.389448
Output for 5.6.8
Size: 9955 Total time: 0.001352 Total time: 1.339968
Output for 5.6.7
Size: 9946 Total time: 0.001478 Total time: 1.276055
Output for 5.5.35
Size: 9945 Total time: 0.002347 Total time: 1.309909
Output for 5.5.34
Size: 9948 Total time: 0.001772 Total time: 1.383629
Output for 5.5.33
Size: 9954 Total time: 0.001468 Total time: 1.373803
Output for 5.5.32
Size: 9950 Total time: 0.002048 Total time: 1.384734
Output for 5.5.31
Size: 9949 Total time: 0.002334 Total time: 1.373289
Output for 5.5.30
Size: 9944 Total time: 0.001925 Total time: 1.373870
Output for 5.5.29
Size: 9957 Total time: 0.001384 Total time: 1.339507
Output for 5.5.28
Size: 9943 Total time: 0.002218 Total time: 1.564962
Output for 5.5.27
Size: 9951 Total time: 0.002069 Total time: 1.361598
Output for 5.5.26
Size: 9953 Total time: 0.002386 Total time: 1.386748
Output for 5.5.25
Size: 9960 Total time: 0.001862 Total time: 1.424133
Output for 5.5.24
Size: 9936 Total time: 0.001465 Total time: 1.251126
Output for 5.4.45
Size: 9942 Total time: 0.001566 Total time: 1.509782
Output for 5.4.44
Size: 9948 Total time: 0.001379 Total time: 1.300905
Output for 5.4.43
Size: 9944 Total time: 0.002186 Total time: 1.307061
Output for 5.4.42
Size: 9956 Total time: 0.002057 Total time: 1.375148
Output for 5.4.41
Size: 9947 Total time: 0.001375 Total time: 1.279467
Output for 5.4.40
Size: 9950 Total time: 0.001658 Total time: 1.518899
Output for 5.4.39
Size: 9945 Total time: 0.002064 Total time: 1.259033
Output for 5.4.38
Size: 9957 Total time: 0.001593 Total time: 1.381400
Output for 5.4.37
Size: 9958 Total time: 0.001817 Total time: 1.581899
Output for 5.4.36
Size: 9955 Total time: 0.002176 Total time: 1.310094
Output for 5.4.35
Size: 9943 Total time: 0.001415 Total time: 1.357574
Output for 5.4.34
Size: 9954 Total time: 0.001479 Total time: 1.276010
Output for 5.4.32
Size: 9943 Total time: 0.002164 Total time: 1.305150
Output for 5.4.31
Size: 9934 Total time: 0.002049 Total time: 1.315131
Output for 5.4.30
Size: 9948 Total time: 0.002268 Total time: 1.323955
Output for 5.4.29
Size: 9961 Total time: 0.002266 Total time: 1.310989
Output for 5.4.28
Size: 9952 Total time: 0.002339 Total time: 1.366980
Output for 5.4.27
Size: 9963 Total time: 0.002058 Total time: 1.340236
Output for 5.4.26
Size: 9942 Total time: 0.001519 Total time: 1.342893
Output for 5.4.25
Size: 9945 Total time: 0.002316 Total time: 1.313596
Output for 5.4.24
Size: 9946 Total time: 0.002006 Total time: 1.367805
Output for 5.4.23
Size: 9952 Total time: 0.002186 Total time: 1.309543
Output for 5.4.22
Size: 9946 Total time: 0.001516 Total time: 1.282167
Output for 5.4.21
Size: 9959 Total time: 0.001616 Total time: 1.491394
Output for 5.4.20
Size: 9949 Total time: 0.002033 Total time: 1.310685
Output for 5.4.19
Size: 9954 Total time: 0.001565 Total time: 1.438112
Output for 5.4.18
Size: 9946 Total time: 0.001626 Total time: 1.274458
Output for 5.4.17
Size: 9958 Total time: 0.002363 Total time: 1.300306
Output for 5.4.16
Size: 9964 Total time: 0.001875 Total time: 1.444072
Output for 5.4.15
Size: 9964 Total time: 0.002062 Total time: 1.337618
Output for 5.4.14
Size: 9959 Total time: 0.001723 Total time: 1.378156
Output for 5.4.13
Size: 9950 Total time: 0.002309 Total time: 1.319592
Output for 5.4.12
Size: 9948 Total time: 0.002272 Total time: 1.343913
Output for 5.4.11
Size: 9949 Total time: 0.001931 Total time: 1.316814
Output for 5.4.10
Size: 9943 Total time: 0.002179 Total time: 1.392612
Output for 5.4.9
Size: 9956 Total time: 0.002060 Total time: 1.299827
Output for 5.4.8
Size: 9955 Total time: 0.002459 Total time: 1.308217
Output for 5.4.7
Size: 9954 Total time: 0.002094 Total time: 1.299423
Output for 5.4.6
Size: 9942 Total time: 0.001380 Total time: 1.270429
Output for 5.4.5
Size: 9949 Total time: 0.002030 Total time: 1.370016
Output for 5.4.4
Size: 9944 Total time: 0.002037 Total time: 1.414228
Output for 5.4.3
Size: 9952 Total time: 0.001644 Total time: 1.290535
Output for 5.4.2
Size: 9954 Total time: 0.002143 Total time: 1.295473
Output for 5.4.1
Size: 9953 Total time: 0.001527 Total time: 1.420705
Output for 5.4.0
Size: 9950 Total time: 0.001387 Total time: 1.294244
Output for 5.3.29
Size: 9957 Total time: 0.002278 Total time: 1.343113
Output for 5.3.28
Size: 9943 Total time: 0.004490 Total time: 1.465511
Output for 5.3.27
Size: 9942 Total time: 0.001555 Total time: 1.320976
Output for 5.3.26
Size: 9945 Total time: 0.002137 Total time: 1.487922
Output for 5.3.25
Size: 9955 Total time: 0.001611 Total time: 1.358290
Output for 5.3.24
Size: 9952 Total time: 0.002380 Total time: 1.342917
Output for 5.3.23
Size: 9956 Total time: 0.002111 Total time: 1.577983
Output for 5.3.22
Size: 9954 Total time: 0.002448 Total time: 1.334243
Output for 5.3.21
Size: 9938 Total time: 0.002478 Total time: 1.424680
Output for 5.3.20
Size: 9957 Total time: 0.002492 Total time: 1.369291
Output for 5.3.19
Size: 9948 Total time: 0.002346 Total time: 1.311884
Output for 5.3.18
Size: 9943 Total time: 0.002459 Total time: 1.343536
Output for 5.3.17
Size: 9950 Total time: 0.002369 Total time: 1.304386
Output for 5.3.16
Size: 9946 Total time: 0.001705 Total time: 1.313977
Output for 5.3.15
Size: 9954 Total time: 0.002472 Total time: 1.581224
Output for 5.3.14
Size: 9944 Total time: 0.002191 Total time: 1.315971
Output for 5.3.13
Size: 9953 Total time: 0.002201 Total time: 1.338538
Output for 5.3.12
Size: 9946 Total time: 0.001570 Total time: 1.328457
Output for 5.3.11
Size: 9953 Total time: 0.001983 Total time: 1.456215
Output for 5.3.10
Size: 9954 Total time: 0.001585 Total time: 1.366164
Output for 5.3.9
Size: 9962 Total time: 0.001601 Total time: 1.314740
Output for 5.3.8
Size: 9961 Total time: 0.001586 Total time: 1.298949
Output for 5.3.7
Size: 9957 Total time: 0.001745 Total time: 1.424629
Output for 5.3.6
Size: 9937 Total time: 0.002256 Total time: 1.296929
Output for 5.3.5
Size: 9948 Total time: 0.002473 Total time: 1.317734
Output for 5.3.4
Size: 9956 Total time: 0.002362 Total time: 1.340714
Output for 5.3.3
Size: 9947 Total time: 0.001832 Total time: 1.401208
Output for 5.3.2
Size: 9954 Total time: 0.002437 Total time: 1.306801
Output for 5.3.1
Size: 9961 Total time: 0.001597 Total time: 1.270235
Output for 5.3.0
Size: 9951 Total time: 0.001586 Total time: 1.281267
Output for 5.2.17
Size: 9958 Total time: 0.002257 Total time: 1.767774
Output for 5.2.16
Size: 9943 Total time: 0.002780 Total time: 1.964128
Output for 5.2.15
Size: 9949 Total time: 0.002830 Total time: 1.983250
Output for 5.2.14
Size: 9960 Total time: 0.002818 Total time: 1.784990
Output for 5.2.13
Size: 9954 Total time: 0.003126 Total time: 1.991816
Output for 5.2.12
Size: 9950 Total time: 0.002868 Total time: 1.860183
Output for 5.2.11
Size: 9958 Total time: 0.002609 Total time: 1.843564
Output for 5.2.10
Size: 9941 Total time: 0.002066 Total time: 1.882791
Output for 5.2.9
Size: 9954 Total time: 0.001736 Total time: 1.902848
Output for 5.2.8
Size: 9947 Total time: 0.001681 Total time: 1.810794
Output for 5.2.7
Size: 9956 Total time: 0.002656 Total time: 2.030455
Output for 5.2.6
Size: 9943 Total time: 0.002816 Total time: 1.926116
Output for 5.2.5
Size: 9947 Total time: 0.001949 Total time: 1.954367
Output for 5.2.4
Size: 9956 Total time: 0.001884 Total time: 1.952301
Output for 5.2.3
Size: 9939 Total time: 0.002028 Total time: 2.042913
Output for 5.2.2
Size: 9943 Total time: 0.002035 Total time: 1.870012
Output for 5.2.1
Size: 9943 Total time: 0.001985 Total time: 1.883021
Output for 5.2.0
Size: 9959 Total time: 0.001606 Total time: 1.731050
Output for 5.1.6
Size: 9947 Total time: 0.001513 Total time: 1.898224
Output for 5.1.5
Size: 9959 Total time: 0.001773 Total time: 2.146827
Output for 5.1.4
Size: 9937 Total time: 0.001720 Total time: 1.912792
Output for 5.1.3
Size: 9951 Total time: 0.002421 Total time: 2.271872
Output for 5.1.2
Size: 9948 Total time: 0.002968 Total time: 1.929846
Output for 5.1.1
Size: 9951 Total time: 0.003424 Total time: 1.907546
Output for 5.1.0
Size: 9944 Total time: 0.002079 Total time: 1.947895
Output for 5.0.5
Size: 9944 Total time: 0.002791 Total time: 1.994415
Output for 5.0.4
Size: 9956 Total time: 0.004945 Total time: 1.844440
Output for 5.0.3
Size: 9943 Total time: 0.002532 Total time: 1.861822
Output for 5.0.2
Size: 9942 Total time: 0.003710 Total time: 1.872836
Output for 5.0.1
Size: 9944 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 7 PHP_EOLTotal time: 0.004721 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 16 PHP_EOLTotal time: 1.987824 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 25 PHP_EOL
Output for 5.0.0
Size: 9953 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 7 PHP_EOLTotal time: 0.003937 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 16 PHP_EOLTotal time: 1.853980 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 25 PHP_EOL
Output for 4.4.9
Size: 9949 Total time: 0.004260 Total time: -0.175127
Output for 4.4.8
Size: 9943 Total time: 0.003400 Total time: -0.239965
Output for 4.4.7
Size: 9946 Total time: 0.003051 Total time: 0.790264
Output for 4.4.6
Size: 9944 Total time: 0.005254 Total time: 0.792058
Output for 4.4.5
Size: 9954 Total time: 0.005604 Total time: 0.827597
Output for 4.4.4
Size: 9954 Total time: 0.003785 Total time: -0.197806
Output for 4.4.3
Size: 9955 Total time: 0.003443 Total time: 0.762303
Output for 4.4.2
Size: 9939 Total time: 0.004978 Total time: -0.304028
Output for 4.4.1
Size: 9956 Total time: 0.002585 Total time: -0.330245
Output for 4.4.0
Size: 9957 Total time: 0.003338 Total time: -0.271722
Output for 4.3.11
Size: 9950 Total time: 0.004357 Total time: -0.268098
Output for 4.3.10
Size: 9944 Total time: 0.002536 Total time: -0.288624
Output for 4.3.9
Size: 9928 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 7 PHP_EOLTotal time: 0.002578 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 16 PHP_EOLTotal time: 0.737952 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 25 PHP_EOL
Output for 4.3.8
Size: 9952 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 7 PHP_EOLTotal time: 0.003149 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 16 PHP_EOLTotal time: -0.268394 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 25 PHP_EOL
Output for 4.3.7
Size: 9945 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 7 PHP_EOLTotal time: 0.006180 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 16 PHP_EOLTotal time: 0.725366 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 25 PHP_EOL
Output for 4.3.6
Size: 9942 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 7 PHP_EOLTotal time: 0.005166 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 16 PHP_EOLTotal time: 0.815822 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 25 PHP_EOL
Output for 4.3.5
Size: 9953 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 7 PHP_EOLTotal time: -0.994024 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 16 PHP_EOLTotal time: 0.818407 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 25 PHP_EOL
Output for 4.3.4
Size: 9949 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 7 PHP_EOLTotal time: 0.004763 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 16 PHP_EOLTotal time: -0.083876 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 25 PHP_EOL
Output for 4.3.3
Size: 9960 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 7 PHP_EOLTotal time: 0.003152 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 16 PHP_EOLTotal time: 0.775521 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 25 PHP_EOL
Output for 4.3.2
Size: 9958 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 7 PHP_EOLTotal time: 0.023728 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 16 PHP_EOLTotal time: 0.745671 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 25 PHP_EOL
Output for 4.3.1
Size: 9948 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 7 PHP_EOLTotal time: 0.017937 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 16 PHP_EOLTotal time: -0.207258 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 25 PHP_EOL
Output for 4.3.0
Size: 9950 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 7 PHP_EOLTotal time: 0.014638 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 16 PHP_EOLTotal time: -0.202607 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0hubD on line 25 PHP_EOL