3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = 0; for ($i=0; $i < 1000000; $i++) { $x = $x + $i % mt_rand(); } echo $x;
Output for 7.1.0
499860980009
Output for 7.0.14
499857371856
Output for 7.0.6
499872942553
Output for 7.0.5
499860924944
Output for 7.0.4
499875474816
Output for 7.0.3
499876967783
Output for 7.0.2
499877167470
Output for 7.0.1
499864469792
Output for 7.0.0
499861145888
Output for hhvm-3.12.0
499867577722
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
499875513867
Output for 5.6.21
499885560156
Output for 5.6.20
499874097346
Output for 5.6.19
499868521027
Output for 5.6.18
499876678760
Output for 5.6.17
499871678835
Output for 5.6.16
499897873630
Output for 5.6.15
499864243340
Output for 5.6.14
499858402338
Output for 5.6.13
499884886825
Output for 5.6.12
499884866243
Output for 5.6.11
499881710529
Output for 5.6.10
499865320743
Output for 5.6.9
499876974445
Output for 5.6.8
499875084509
Output for 5.6.7
499866261242
Output for 5.5.35
499867080918
Output for 5.5.34
499879745404
Output for 5.5.33
499864557590
Output for 5.5.32
499883798457
Output for 5.5.31
499866926174
Output for 5.5.30
499870936644
Output for 5.5.29
499870724049
Output for 5.5.28
499883958288
Output for 5.5.27
499867223338
Output for 5.5.26
499886115873
Output for 5.5.25
499874845263
Output for 5.5.24
499873558757
Output for 5.4.45
499869286535
Output for 5.4.44
499867497228
Output for 5.4.43
499873377855
Output for 5.4.42
499880671097
Output for 5.4.41
499875213882
Output for 5.4.40
499871392860
Output for 5.4.39
499867054365
Output for 5.4.38
499865033101
Output for 5.4.37
499866708816
Output for 5.4.36
499861822073
Output for 5.4.35
499875203372
Output for 5.4.34
499866376005
Output for 5.4.32
499887813782
Output for 5.4.31
499869561067
Output for 5.4.30
499878957542
Output for 5.4.29
499881985740
Output for 5.4.28
499872967206
Output for 5.4.27
499861962507
Output for 5.4.26
499875519427
Output for 5.4.25
499874861440
Output for 5.4.24
499869686157
Output for 5.4.23
499869127281
Output for 5.4.22
499872860641
Output for 5.4.21
499851531741
Output for 5.4.20
499872285250
Output for 5.4.19
499866045450
Output for 5.4.18
499877366878
Output for 5.4.17
499869905453
Output for 5.4.16
499872680538
Output for 5.4.15
499869293752
Output for 5.4.14
499880362498
Output for 5.4.13
499878620807
Output for 5.4.12
499874462717
Output for 5.4.11
499873272851
Output for 5.4.10
499874159761
Output for 5.4.9
499876412386
Output for 5.4.8
499872891805
Output for 5.4.7
499864425720
Output for 5.4.6
499862380417
Output for 5.4.5
499877243407
Output for 5.4.4
499847041327
Output for 5.4.3
499874246679
Output for 5.4.2
499869635691
Output for 5.4.1
499865987243
Output for 5.4.0
499879854651
Output for 5.3.29
499881155336
Output for 5.3.28
499872505578
Output for 5.3.27
499884672056
Output for 5.3.26
499872119161
Output for 5.3.25
499876126709
Output for 5.3.24
499872835500
Output for 5.3.23
499860489637
Output for 5.3.22
499857095658
Output for 5.3.21
499895025967
Output for 5.3.20
499873543350
Output for 5.3.19
499901696156
Output for 5.3.18
499868057048
Output for 5.3.17
499871653917
Output for 5.3.16
499868741112
Output for 5.3.15
499868730925
Output for 5.3.14
499863135933
Output for 5.3.13
499868236647
Output for 5.3.12
499867966371
Output for 5.3.11
499867097442
Output for 5.3.10
499876389709
Output for 5.3.9
499871448054
Output for 5.3.8
499869650173
Output for 5.3.7
499857617346
Output for 5.3.6
499869954203
Output for 5.3.5
499865809650
Output for 5.3.4
499867275500
Output for 5.3.3
499861703469
Output for 5.3.2
499865028085
Output for 5.3.1
499872382552
Output for 5.3.0
499886657454
Output for 5.2.17
499864556181
Output for 5.2.16
499872113144
Output for 5.2.15
499863312336
Output for 5.2.14
499866293697
Output for 5.2.13
499865318174
Output for 5.2.12
499872248831
Output for 5.2.11
499877584827
Output for 5.2.10
499872802221
Output for 5.2.9
499864615353
Output for 5.2.8
499879244970
Output for 5.2.7
499877113265
Output for 5.2.6
499877897659
Output for 5.2.5
499878356652
Output for 5.2.4
499887036034
Output for 5.2.3
499878208406
Output for 5.2.2
499885152960
Output for 5.2.1
499871226466
Output for 5.2.0
499877037833
Output for 5.1.6
499868501450
Output for 5.1.5
499864857014
Output for 5.1.4
499866519114
Output for 5.1.3
499852706655
Output for 5.1.2
499867596526
Output for 5.1.1
499877284507
Output for 5.1.0
499854006858
Output for 5.0.5
499875263633
Output for 5.0.4
499860008154
Output for 5.0.3
499881355238
Output for 5.0.2
499873896905
Output for 5.0.1
499885533368
Output for 5.0.0
499877037413
Output for 4.4.9
499873197545
Output for 4.4.8
499871757244
Output for 4.4.7
499867926109
Output for 4.4.6
499876422478
Output for 4.4.5
499883398167
Output for 4.4.4
499872395002
Output for 4.4.3
499874698344
Output for 4.4.2
499872471240
Output for 4.4.1
499877190025
Output for 4.4.0
499868820360
Output for 4.3.11
499886334208
Output for 4.3.10
499867682828
Output for 4.3.9
499858893879
Output for 4.3.8
499881477314
Output for 4.3.7
499865763465
Output for 4.3.6
499875785335
Output for 4.3.5
499873590896
Output for 4.3.4
499865814841
Output for 4.3.3
499856057012
Output for 4.3.2
499870153132
Output for 4.3.1
499883694922
Output for 4.3.0
499856346050