3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $start = microtime(true); for ($i = 0; $i < 1000000; $i ++) { $random = (string)mt_rand(); $int = intval($random); } $end = microtime(true) - $start; echo $end.PHP_EOL; $start = microtime(true); for ($i = 0; $i < 1000000; $i ++) { $random = (string)mt_rand(); $int = (int)$random; } $end = microtime(true) - $start; echo $end.PHP_EOL;
Output for 7.1.0
0.17380094528198 0.12450098991394
Output for 7.0.14
0.18145489692688 0.11571407318115
Output for 7.0.6
0.13665199279785 0.12221813201904
Output for 7.0.5
0.15710997581482 0.12662982940674
Output for 7.0.4
0.10882306098938 0.091063022613525
Output for 7.0.3
0.13579106330872 0.12051796913147
Output for 7.0.2
0.14121103286743 0.12207984924316
Output for 7.0.1
0.14790105819702 0.12414216995239
Output for 7.0.0
0.15332984924316 0.12135195732117
Output for 5.6.28
0.16046905517578 -0.36918807029724
Output for 5.6.21
0.28520894050598 0.21721601486206
Output for 5.6.20
0.29170799255371 0.2157461643219
Output for 5.6.19
0.2346351146698 0.17796492576599
Output for 5.6.18
0.25747203826904 0.18391895294189
Output for 5.6.17
0.27448987960815 0.21453404426575
Output for 5.6.16
0.27754402160645 0.21377992630005
Output for 5.6.15
0.34603214263916 0.26806116104126
Output for 5.6.14
0.29123401641846 0.21579504013062
Output for 5.6.13
0.26637887954712 0.20900297164917
Output for 5.6.12
0.2862491607666 0.21345710754395
Output for 5.6.11
0.31150984764099 0.23583197593689
Output for 5.6.10
0.27735209465027 0.21414399147034
Output for 5.6.9
0.28565382957458 0.21586012840271
Output for 5.6.8
0.2683219909668 0.21172714233398
Output for 5.6.7
0.23368000984192 0.17455291748047
Output for 5.5.35
0.29194498062134 0.21781587600708
Output for 5.5.34
0.27895021438599 0.21761703491211
Output for 5.5.33
0.25821900367737 0.1832480430603
Output for 5.5.32
0.2885320186615 0.2185800075531
Output for 5.5.31
0.27582383155823 0.21628713607788
Output for 5.5.30
0.2803680896759 0.22046899795532
Output for 5.5.29
0.28476309776306 0.22307109832764
Output for 5.5.28
0.27573394775391 0.21512389183044
Output for 5.5.27
0.310142993927 0.23980307579041
Output for 5.5.26
0.28753304481506 0.21473383903503
Output for 5.5.25
0.2976279258728 0.21538615226746
Output for 5.5.24
0.280837059021 0.21388912200928
Output for 5.4.45
0.51910495758057 0.23922920227051
Output for 5.4.44
0.27001595497131 0.26909279823303
Output for 5.4.43
0.44550585746765 0.41786503791809
Output for 5.4.42
0.50088596343994 0.6525731086731
Output for 5.4.41
0.35950183868408 0.58043313026428
Output for 5.4.40
0.77429890632629 0.2181499004364
Output for 5.4.39
0.45965003967285 0.32243013381958
Output for 5.4.38
0.4354088306427 0.46250987052917
Output for 5.4.37
0.48282289505005 0.3500759601593
Output for 5.4.36
0.52808904647827 0.40314483642578
Output for 5.4.35
0.46013903617859 0.36855697631836
Output for 5.4.34
0.54631590843201 0.32457995414734
Output for 5.4.32
0.33501887321472 0.26097202301025
Output for 5.4.31
0.37336993217468 0.26122808456421
Output for 5.4.30
0.32207083702087 0.25855493545532
Output for 5.4.29
0.31381797790527 0.24713897705078
Output for 5.4.28
0.3133659362793 0.25863003730774
Output for 5.4.27
0.31065797805786 0.24821305274963
Output for 5.4.26
0.32858610153198 0.2650671005249
Output for 5.4.25
0.33614683151245 0.27305102348328
Output for 5.4.24
0.35040712356567 0.24579286575317
Output for 5.4.23
0.32872891426086 0.25175881385803
Output for 5.4.22
0.37659692764282 0.28845405578613
Output for 5.4.21
0.31884598731995 0.2501208782196
Output for 5.4.20
0.34616899490356 0.25922107696533
Output for 5.4.19
0.31452894210815 0.256756067276
Output for 5.4.18
0.35074782371521 0.26158690452576
Output for 5.4.17
0.31116914749146 0.24775004386902
Output for 5.4.16
0.31531381607056 0.24832916259766
Output for 5.4.15
0.33311009407043 0.24508810043335
Output for 5.4.14
0.30981802940369 0.25912618637085
Output for 5.4.13
0.31953716278076 0.24973201751709
Output for 5.4.12
0.33695697784424 0.27543592453003
Output for 5.4.11
0.32647514343262 0.30205297470093
Output for 5.4.10
0.31621408462524 0.25213813781738
Output for 5.4.9
0.34259796142578 0.29535794258118
Output for 5.4.8
0.33325791358948 0.27938508987427
Output for 5.4.7
0.3119900226593 0.25126194953918
Output for 5.4.6
0.33343315124512 0.25883316993713
Output for 5.4.5
0.32388305664062 0.2598659992218
Output for 5.4.4
0.32164406776428 0.26938009262085
Output for 5.4.3
0.33111715316772 0.27722406387329
Output for 5.4.2
0.31637787818909 0.25289106369019
Output for 5.4.1
0.32905006408691 0.26086711883545
Output for 5.4.0
0.33039593696594 0.27701902389526
Output for 5.3.29
0.35381102561951 0.2977409362793
Output for 5.3.28
0.43631815910339 0.26045894622803
Output for 5.3.27
0.36056995391846 0.26819396018982
Output for 5.3.26
0.3486659526825 0.26821303367615
Output for 5.3.25
0.41999888420105 0.25693202018738
Output for 5.3.24
0.44034004211426 0.26205801963806
Output for 5.3.23
0.39525294303894 0.30551600456238
Output for 5.3.22
0.36065411567688 0.28143501281738
Output for 5.3.21
0.37373518943787 0.26917815208435
Output for 5.3.20
0.35655879974365 0.26548719406128
Output for 5.3.19
0.36210203170776 0.26679992675781
Output for 5.3.18
0.3519229888916 0.2661919593811
Output for 5.3.17
0.37747693061829 0.27240800857544
Output for 5.3.16
0.35284304618835 0.26545214653015
Output for 5.3.15
0.37492990493774 0.26876783370972
Output for 5.3.14
0.42153000831604 0.29599595069885
Output for 5.3.13
0.35513210296631 0.2637939453125
Output for 5.3.12
0.36305618286133 0.2773380279541
Output for 5.3.11
0.36241316795349 0.26649522781372
Output for 5.3.10
0.38638591766357 0.25947594642639
Output for 5.3.9
0.36273813247681 0.28790879249573
Output for 5.3.8
0.38977098464966 0.26739907264709
Output for 5.3.7
0.57360410690308 0.46184206008911
Output for 5.3.6
0.56239891052246 0.36535501480103
Output for 5.3.5
0.41454100608826 0.29878187179565
Output for 5.3.4
0.43196582794189 0.36298298835754
Output for 5.3.3
0.37048602104187 0.30677890777588
Output for 5.3.2
0.39643001556396 0.28733491897583
Output for 5.3.1
0.35655808448792 0.25905299186707
Output for 5.3.0
0.40687990188599 0.29015803337097
Output for 5.2.17
0.41209197044373 0.41481590270996
Output for 5.2.16
0.39410996437073 0.32254815101624
Output for 5.2.15
0.40938591957092 0.31893587112427
Output for 5.2.14
0.45189118385315 0.38899612426758
Output for 5.2.13
0.356693983078 0.32803010940552
Output for 5.2.12
0.3699791431427 0.32443499565125
Output for 5.2.11
0.37007904052734 0.32882905006409
Output for 5.2.10
0.38377809524536 0.32999801635742
Output for 5.2.9
0.37191009521484 0.33335185050964
Output for 5.2.8
0.40004014968872 0.44280505180359
Output for 5.2.7
0.40000510215759 0.33867597579956
Output for 5.2.6
0.38990998268127 0.33225297927856
Output for 5.2.5
0.38849401473999 0.37501192092896
Output for 5.2.4
0.50103282928467 0.4410400390625
Output for 5.2.3
0.45946097373962 0.34363508224487
Output for 5.2.2
0.73997688293457 0.3531219959259
Output for 5.2.1
0.44276404380798 0.39100790023804
Output for 5.2.0
0.46146488189697 0.40173316001892
Output for 5.1.6
0.47383117675781 0.39390921592712
Output for 5.1.5
0.47305297851562 0.38803005218506
Output for 5.1.4
0.47319793701172 0.54385590553284
Output for 5.1.3
0.54445099830627 0.43671894073486
Output for 5.1.2
0.50699210166931 0.37090516090393
Output for 5.1.1
0.4182391166687 0.38952302932739
Output for 5.1.0
0.52954006195068 0.39643883705139
Output for 5.0.5
0.73200392723083 0.71819019317627
Output for 5.0.4
0.76670789718628 0.88890790939331
Output for 5.0.3
0.84840798377991 0.78756093978882
Output for 5.0.2
0.88507008552551 0.79877495765686
Output for 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 10 0.92026996612549PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 19 0.62707901000977PHP_EOL
Output for 5.0.0
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 10 0.69893908500671PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 19 0.61212801933289PHP_EOL
Output for 4.4.9
0.661835 -0.438639
Output for 4.4.8
-0.327515 0.557037
Output for 4.4.7
-0.304694 -0.432274
Output for 4.4.6
0.701278 -0.365178
Output for 4.4.5
-0.285653 0.608383
Output for 4.4.4
-0.332343 -0.426337
Output for 4.4.3
0.636017 -0.438946
Output for 4.4.2
-0.281821 0.5615
Output for 4.4.1
-0.299215 0.593053
Output for 4.4.0
-0.244835 -0.315999
Output for 4.3.11
-0.242608 0.62049
Output for 4.3.10
-0.230821 -0.353957
Output for 4.3.9
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 10 0.705823PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 19 -0.417714PHP_EOL
Output for 4.3.8
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 10 -0.32082PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 19 0.552641PHP_EOL
Output for 4.3.7
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 10 -0.279776PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 19 -0.390433PHP_EOL
Output for 4.3.6
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 10 0.740356PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 19 -0.373209PHP_EOL
Output for 4.3.5
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 10 -0.341706PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 19 0.57727PHP_EOL
Output for 4.3.4
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 10 -0.312979PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 19 -0.350459PHP_EOL
Output for 4.3.3
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 10 0.686109PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H5uQT on line 19 -0.412953PHP_EOL
Output for 4.3.0 - 4.3.2

Process exited with code 137.