3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test1() { $s = microtime(true); for($i = 0;$i < 1000000; $i++) { $a = 0b10010111100101001 + 0b11100101001100101; } return microtime(true) - $s; } function test2() { $s = microtime(true); for($i = 0;$i < 1000000; $i++) { $a = 0123123 + 023454; } return microtime(true) - $s; } function test3() { $s = microtime(true); for($i = 0;$i < 1000000; $i++) { $a = 0xFAC + 0x234; } return microtime(true) - $s; } echo test1() . "\n"; echo test2() . "\n"; echo test3() . "\n";
Output for 7.1.0
0.017338037490845 0.016472816467285 0.016120195388794
Output for 7.0.14
0.01702618598938 0.015852928161621 0.015024185180664
Output for 7.0.6
0.015048027038574 0.014168977737427 0.013521909713745
Output for 7.0.5
0.015894174575806 0.014758110046387 0.013919830322266
Output for 7.0.4
0.022886037826538 0.020046949386597 0.017828941345215
Output for 7.0.3
0.012472152709961 0.012234210968018 0.011689901351929
Output for 7.0.2
0.011586904525757 0.010381937026978 0.010251045227051
Output for 7.0.1
0.015585899353027 0.014389991760254 0.013597965240479
Output for 7.0.0
0.016119003295898 0.013788938522339 0.013275146484375
Output for 5.6.28
0.084213972091675 0.068051099777222 0.0589280128479
Output for 5.6.21
0.029217004776001 0.029381990432739 0.028994083404541
Output for 5.6.20
0.040764093399048 0.035027980804443 0.0312340259552
Output for 5.6.19
0.037461996078491 0.030918121337891 0.028496026992798
Output for 5.6.18
0.032325029373169 0.029194116592407 0.03104305267334
Output for 5.6.17
0.027942180633545 0.027956008911133 0.028057813644409
Output for 5.6.16
0.037869215011597 0.033041000366211 0.029809951782227
Output for 5.6.15
0.041485071182251 0.035378932952881 0.033149003982544
Output for 5.6.14
0.041290998458862 0.029933929443359 0.02814507484436
Output for 5.6.13
0.037955045700073 0.033200025558472 0.03000807762146
Output for 5.6.12
0.040124177932739 0.034448146820068 0.030757904052734
Output for 5.6.11
0.041007995605469 0.034690856933594 0.032911062240601
Output for 5.6.10
0.034402132034302 0.028196096420288 0.02963399887085
Output for 5.6.9
0.027919054031372 0.027030944824219 0.028753042221069
Output for 5.6.8
0.038077116012573 0.03262996673584 0.031371116638184
Output for 5.6.7
0.029149055480957 0.028434038162231 0.032957077026367
Output for 5.5.35
0.04089617729187 0.034209012985229 0.03049111366272
Output for 5.5.34
0.02858304977417 0.028717041015625 0.028915166854858
Output for 5.5.33
0.05601692199707 0.044142007827759 0.039480924606323
Output for 5.5.32
0.02813982963562 0.027924060821533 0.027844190597534
Output for 5.5.31
0.031292915344238 0.029346942901611 0.02838397026062
Output for 5.5.30
0.034668922424316 0.030882835388184 0.028783798217773
Output for 5.5.29
0.040632963180542 0.034877777099609 0.034321784973145
Output for 5.5.28
0.027673006057739 0.027979850769043 0.027745962142944
Output for 5.5.27
0.040081024169922 0.031320095062256 0.028718948364258
Output for 5.5.26
0.037286996841431 0.029288053512573 0.028040885925293
Output for 5.5.25
0.038110017776489 0.033330917358398 0.029788017272949
Output for 5.5.24
0.038656949996948 0.033807039260864 0.030261039733887
Output for 5.4.45
0.029083013534546 0.028771162033081 0.028911828994751
Output for 5.4.44
0.02849292755127 0.028290987014771 0.028117895126343
Output for 5.4.43
0.028647899627686 0.028192043304443 0.029519081115723
Output for 5.4.42
0.028150081634521 0.028092861175537 0.028247117996216
Output for 5.4.41
0.028146982192993 0.028521060943604 0.028280973434448
Output for 5.4.40
0.030297994613647 0.029790878295898 0.029788970947266
Output for 5.4.39
0.028290033340454 0.028194189071655 0.028048992156982
Output for 5.4.38
0.031627893447876 0.02832293510437 0.02810001373291
Output for 5.4.37
0.028223991394043 0.028255939483643 0.028266906738281
Output for 5.4.36
0.036420106887817 0.036604166030884 0.035494089126587
Output for 5.4.35
0.032482862472534 0.027297973632812 0.027273893356323
Output for 5.4.34
0.027365922927856 0.031258821487427 0.035585880279541
Output for 5.4.32
0.027973890304565 0.027547121047974 0.027255773544312
Output for 5.4.31
0.032183170318604 0.028650999069214 0.02944016456604
Output for 5.4.30
0.027384042739868 0.027358055114746 0.027512073516846
Output for 5.4.29
0.027398109436035 0.027362108230591 0.029331922531128
Output for 5.4.28
0.029051065444946 0.029008150100708 0.033595085144043
Output for 5.4.27
0.027312040328979 0.027309894561768 0.028126001358032
Output for 5.4.26
0.027276992797852 0.027305126190186 0.027295112609863
Output for 5.4.25
0.027536153793335 0.02730393409729 0.027291059494019
Output for 5.4.24
0.027892112731934 0.028218030929565 0.027876138687134
Output for 5.4.23
0.027268886566162 0.027425050735474 0.027354001998901
Output for 5.4.22
0.028347969055176 0.027952909469604 0.028213977813721
Output for 5.4.21
0.027674913406372 0.027314901351929 0.049456834793091
Output for 5.4.20
0.028191804885864 0.028877019882202 0.028659105300903
Output for 5.4.19
0.027298927307129 0.02792501449585 0.02899694442749
Output for 5.4.18
0.029482841491699 0.027539014816284 0.027482032775879
Output for 5.4.17
0.028120994567871 0.028148174285889 0.028187990188599
Output for 5.4.16
0.02700400352478 0.027202129364014 0.032367944717407
Output for 5.4.15
0.027211904525757 0.02759313583374 0.027235984802246
Output for 5.4.14
0.028276920318604 0.028219938278198 0.028301000595093
Output for 5.4.13
0.038663864135742 0.038177967071533 0.03706693649292
Output for 5.4.12
0.028129816055298 0.028109788894653 0.029691934585571
Output for 5.4.11
0.028069019317627 0.029002904891968 0.031671047210693
Output for 5.4.10
0.028291940689087 0.028217792510986 0.02891993522644
Output for 5.4.9
0.034090995788574 0.033556938171387 0.03305196762085
Output for 5.4.8
0.030107975006104 0.032516002655029 0.032418966293335
Output for 5.4.7
0.028158187866211 0.028138875961304 0.030097961425781
Output for 5.4.6
0.031270980834961 0.031803846359253 0.031414985656738
Output for 5.4.5
0.03048300743103 0.030442953109741 0.029149055480957
Output for 5.4.4
0.028198957443237 0.028150081634521 0.028414964675903
Output for 5.4.3
0.02850604057312 0.02856707572937 0.028592109680176
Output for 5.4.2
0.02819299697876 0.028226852416992 0.028148889541626
Output for 5.4.1
0.032366991043091 0.03252100944519 0.033991098403931
Output for 5.4.0
0.032450914382935 0.032578945159912 0.032447099685669
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/rTkXf on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_STRING in /in/rTkXf on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/rTkXf on line 6
Process exited with code 255.