3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $start = microtime(true); for ($i = 0; $i < 1000000; $i++) { rand(); } $end = microtime(true) - $start; printf("%0.6F\n", $end); $start = microtime(true); for ($i = 0; $i < 1000000; $i++) { mt_rand(); } $end = microtime(true) - $start; printf("%0.6F\n", $end);
Output for 7.1.0
0.054576 0.050219
Output for 7.0.14
0.037048 0.029472
Output for 7.0.10
0.032649 0.024607
Output for 7.0.9
0.032088 0.024654
Output for 7.0.8
0.022550 0.020414
Output for 7.0.7
0.029587 0.022546
Output for 7.0.6
0.026545 0.021201
Output for 7.0.5
0.025668 0.022373
Output for 7.0.4
0.023894 0.023121
Output for 7.0.3
0.021887 0.020348
Output for 7.0.2
0.020275 0.017233
Output for 7.0.1
0.018700 0.016753
Output for 7.0.0
0.018450 0.017479
Output for hhvm-3.12.0
0.118461 0.181135
Output for hhvm-3.10.0
0.271561 0.272022
Output for 5.6.28
0.145646 0.031268
Output for 5.6.25
0.052434 0.048373
Output for 5.6.24
0.053077 0.050004
Output for 5.6.23
0.050371 0.049224
Output for 5.6.22
0.068867 0.052944
Output for 5.6.21
0.073874 0.052665
Output for 5.6.20
0.065762 0.052047
Output for 5.6.19
0.059773 0.050241
Output for 5.6.18
0.050003 0.042768
Output for 5.6.17
0.042362 0.041846
Output for 5.6.16
0.046822 0.041583
Output for 5.6.15
0.055401 0.050259
Output for 5.6.14
0.045772 0.044595
Output for 5.6.13
0.043913 0.041369
Output for 5.6.12
0.042856 0.042608
Output for 5.6.11
0.042394 0.042514
Output for 5.6.10
0.052416 0.047240
Output for 5.6.9
0.042245 0.043172
Output for 5.6.8
0.041976 0.040672
Output for 5.6.7
0.046451 0.046787
Output for 5.6.6
0.060444 0.049924
Output for 5.6.5
0.049149 0.049312
Output for 5.6.4
0.049338 0.050517
Output for 5.6.3
0.059516 0.050995
Output for 5.6.2
0.057463 0.050504
Output for 5.6.1
0.057070 0.053657
Output for 5.6.0
0.070980 0.077795
Output for 5.5.38
0.070256 0.054486
Output for 5.5.37
0.056898 0.063399
Output for 5.5.36
0.072908 0.056307
Output for 5.5.35
0.055169 0.052515
Output for 5.5.34
0.051787 0.049262
Output for 5.5.33
0.063998 0.052985
Output for 5.5.32
0.047243 0.042566
Output for 5.5.31
0.049431 0.049136
Output for 5.5.30
0.044683 0.043971
Output for 5.5.29
0.047277 0.046904
Output for 5.5.28
0.042223 0.040779
Output for 5.5.27
0.049083 0.042924
Output for 5.5.26
0.052481 0.046280
Output for 5.5.25
0.041173 0.041011
Output for 5.5.24
0.053642 0.044307
Output for 5.5.23
0.067993 0.055756
Output for 5.5.22
0.059358 0.050866
Output for 5.5.21
0.049838 0.050061
Output for 5.5.20
0.050525 0.050330
Output for 5.5.19
0.056630 0.049903
Output for 5.5.18
0.054155 0.052474
Output for 5.5.16
0.051829 0.050991
Output for 5.5.15
0.053049 0.049362
Output for 5.5.14
0.061215 0.049385
Output for 5.5.13
0.065636 0.052094
Output for 5.5.12
0.050019 0.049031
Output for 5.5.11
0.054685 0.052305
Output for 5.5.10
0.048824 0.049713
Output for 5.5.9
0.055732 0.049822
Output for 5.5.8
0.072000 0.052613
Output for 5.5.7
0.070499 0.056992
Output for 5.5.6
0.052912 0.049858
Output for 5.5.5
0.051396 0.048929
Output for 5.5.4
0.055202 0.049059
Output for 5.5.3
0.050299 0.049615
Output for 5.5.2
0.063108 0.052901
Output for 5.5.1
0.070163 0.066216
Output for 5.5.0
0.055287 0.049067
Output for 5.4.45
0.064609 0.052819
Output for 5.4.44
0.045056 0.044212
Output for 5.4.43
0.046074 0.044565
Output for 5.4.42
0.045083 0.044371
Output for 5.4.41
0.056732 0.053739
Output for 5.4.40
0.060894 0.048299
Output for 5.4.39
0.062803 0.054876
Output for 5.4.38
0.057345 0.056817
Output for 5.4.37
0.059136 0.056379
Output for 5.4.36
0.071649 0.055570
Output for 5.4.35
0.056901 0.054319
Output for 5.4.34
0.055708 0.054179
Output for 5.4.32
0.067231 0.054063
Output for 5.4.31
0.083576 0.061166
Output for 5.4.30
0.061916 0.055026
Output for 5.4.29
0.061316 0.053999
Output for 5.4.28
0.061653 0.055047
Output for 5.4.27
0.086512 0.069752
Output for 5.4.26
0.059598 0.053653
Output for 5.4.25
0.088947 0.064752
Output for 5.4.24
0.057407 0.055065
Output for 5.4.23
0.069235 0.055020
Output for 5.4.22
0.066812 0.053957
Output for 5.4.21
0.079721 0.063175
Output for 5.4.20
0.055510 0.051412
Output for 5.4.19
0.070016 0.057723
Output for 5.4.18
0.068017 0.055454
Output for 5.4.17
0.059364 0.056084
Output for 5.4.16
0.060744 0.053588
Output for 5.4.15
0.065503 0.054684
Output for 5.4.14
0.084153 0.063415
Output for 5.4.13
0.065975 0.054628
Output for 5.4.12
0.052083 0.051850
Output for 5.4.11
0.071931 0.060057
Output for 5.4.10
0.056446 0.055231
Output for 5.4.9
0.056432 0.054018
Output for 5.4.8
0.061604 0.059072
Output for 5.4.7
0.052397 0.051935
Output for 5.4.6
0.058674 0.053173
Output for 5.4.5
0.063036 0.052130
Output for 5.4.4
0.062178 0.058302
Output for 5.4.3
0.069288 0.055110
Output for 5.4.2
0.083659 0.060358
Output for 5.4.1
0.065474 0.055157
Output for 5.4.0
0.081269 0.062938
Output for 5.3.29
0.083860 0.065577
Output for 5.3.28
0.097326 0.071760
Output for 5.3.27
0.069427 0.066309
Output for 5.3.26
0.067956 0.064211
Output for 5.3.25
0.069777 0.062906
Output for 5.3.24
0.065715 0.062113
Output for 5.3.23
0.090484 0.067905
Output for 5.3.22
0.069524 0.066430
Output for 5.3.21
0.077530 0.066656
Output for 5.3.20
0.072364 0.068205
Output for 5.3.19
0.067433 0.066148
Output for 5.3.18
0.066001 0.067674
Output for 5.3.17
0.082689 0.072681
Output for 5.3.16
0.065227 0.065198
Output for 5.3.15
0.068596 0.063708
Output for 5.3.14
0.069939 0.066928
Output for 5.3.13
0.065432 0.064614
Output for 5.3.12
0.073048 0.069442
Output for 5.3.11
0.081791 0.066912
Output for 5.3.10
0.087327 0.070689
Output for 5.3.9
0.067339 0.065089
Output for 5.3.8
0.067979 0.067626
Output for 5.3.7
0.071240 0.068706
Output for 5.3.6
0.077368 0.076561
Output for 5.3.5
0.070645 0.066317
Output for 5.3.4
0.070640 0.069573
Output for 5.3.3
0.092862 0.067869
Output for 5.3.2
0.094819 0.071971
Output for 5.3.1
0.080269 0.071385
Output for 5.3.0
0.083674 0.068265
Output for 5.2.17
0.098408 0.077173
Output for 5.2.16
0.100294 0.077379
Output for 5.2.15
0.129198 0.087100
Output for 5.2.14
0.078148 0.078797
Output for 5.2.13
0.091505 0.082382
Output for 5.2.12
0.095443 0.078096
Output for 5.2.11
0.131119 0.098965
Output for 5.2.10
0.090604 0.076463
Output for 5.2.9
0.093624 0.101464
Output for 5.2.8
0.117018 0.077664
Output for 5.2.7
0.094696 0.079373
Output for 5.2.6
0.082128 0.078160
Output for 5.2.5
0.083631 0.066420
Output for 5.2.4
0.104395 0.078530
Output for 5.2.3
0.114675 0.083973
Output for 5.2.2
0.081610 0.066791
Output for 5.2.1
0.078614 0.075854
Output for 5.2.0
0.081607 0.079426
Output for 5.1.6
0.079331 0.081538
Output for 5.1.5
0.094415 0.082027
Output for 5.1.4
0.080590 0.080345
Output for 5.1.3
0.079081 0.078541
Output for 5.1.2
0.090661 0.075640
Output for 5.1.1
0.082768 0.078787
Output for 5.1.0
0.090006 0.076786
Output for 5.0.5
0.151262 0.149572
Output for 5.0.4
0.149701 0.150807
Output for 5.0.3
0.188569 0.138899
Output for 4.3.3 - 4.3.9, 5.0.0 - 5.0.2
Output for 4.4.9
0.156351 0.142108
Output for 4.4.8
0.142687 0.139292
Output for 4.4.7
0.139125 0.141584
Output for 4.4.6
0.175909 0.141259
Output for 4.4.5
0.140663 0.140196
Output for 4.4.4
0.153437 0.153696
Output for 4.4.3
0.136875 0.140005
Output for 4.4.2
0.140503 0.128861
Output for 4.4.1
0.181706 0.142290
Output for 4.4.0
0.176812 0.141660
Output for 4.3.11
0.196334 0.140564
Output for 4.3.10
0.159401 0.138270
Output for 4.3.0 - 4.3.2

Process exited with code 137.