3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace { $s = 10000000; $start = microtime(true); $i = $s; while($i--) { $a = true; } $end = microtime(true); $g1 = $end-$start; //echo 'Global true: ' . sprintf('%.20f', $g1) . "\n"; $start = microtime(true); $i = $s; while($i--) { $a = \true; } $end = microtime(true); $g2 = $end-$start; //echo 'Global \true: ' . sprintf('%.20f', $g2) . "\n"; echo 'Global relative difference true to \true ' . sprintf('%.10f', (($g2-$g1)*100)/$g1) . "%\n"; } namespace foo { $start = microtime(true); $i = $s; while($i--) { $a = true; } $end = microtime(true); $n1 = $end-$start; //echo 'Namespace true: ' . sprintf('%.20f', $n1) . "\n"; $start = microtime(true); $i = $s; while($i--) { $a = \true; } $end = microtime(true); $n2 = $end-$start; //echo 'Namespace \true: ' . sprintf('%.20f', $n2) . "\n"; echo 'Namespace relative difference true to \true ' . sprintf('%.10f', (($n2-$n1)*100)/$n1) . "%\n"; }
based on 6ZqdZ
Output for 7.1.0
Global relative difference true to \true -164.6252431777% Namespace relative difference true to \true -0.2187555407%
Output for 7.0.14
Global relative difference true to \true -10.5971791925% Namespace relative difference true to \true 0.0058887613%
Output for 7.0.13
Global relative difference true to \true -25.6336499555% Namespace relative difference true to \true -217.4272164594%
Output for 7.0.12
Global relative difference true to \true -24.7445505631% Namespace relative difference true to \true 41.6742508370%
Output for 7.0.11
Global relative difference true to \true -25.5637767671% Namespace relative difference true to \true 2.2018694723%
Output for 7.0.10
Global relative difference true to \true -25.1932236132% Namespace relative difference true to \true -1.4786154501%
Output for 7.0.9
Global relative difference true to \true -54.5881501570% Namespace relative difference true to \true -1.1515766676%
Output for 7.0.8
Global relative difference true to \true -27.0338807276% Namespace relative difference true to \true -1.0284646633%
Output for 7.0.7
Global relative difference true to \true -220.0399955688% Namespace relative difference true to \true 17.1807420737%
Output for 7.0.6
Global relative difference true to \true -22.6034039350% Namespace relative difference true to \true -1.3786860102%
Output for 7.0.5
Global relative difference true to \true -24.5271769119% Namespace relative difference true to \true 21.7256943263%
Output for 7.0.4
Global relative difference true to \true -24.0232574232% Namespace relative difference true to \true 34.3339235221%
Output for 7.0.3
Global relative difference true to \true -21.3452652205% Namespace relative difference true to \true 17.5861244019%
Output for 7.0.2
Global relative difference true to \true -5.0237837162% Namespace relative difference true to \true -0.0031462011%
Output for 7.0.1
Global relative difference true to \true -31.7266804565% Namespace relative difference true to \true -25.5243509604%
Output for 7.0.0
Global relative difference true to \true -24.9886018990% Namespace relative difference true to \true 0.3785006917%
Output for hhvm-3.13.2
Global relative difference true to \true -10.1373558296% Namespace relative difference true to \true -246.6267247448%
Output for hhvm-3.12.0
Global relative difference true to \true -10.2372578434% Namespace relative difference true to \true 1.1183976174%
Output for hhvm-3.10.0
Global relative difference true to \true -8.5331459432% Namespace relative difference true to \true -1.6857820631%
Output for 5.6.28
Global relative difference true to \true -6.5566005660% Namespace relative difference true to \true -38.0896769943%
Output for 5.6.27
Global relative difference true to \true -95.2507786074% Namespace relative difference true to \true -18.7346796924%
Output for 5.6.26
Global relative difference true to \true -258.5894519445% Namespace relative difference true to \true -19.5976271424%
Output for 5.6.25
Global relative difference true to \true -114.6725304641% Namespace relative difference true to \true -19.5061549329%
Output for 5.6.24
Global relative difference true to \true -31.3091000531% Namespace relative difference true to \true -72.7121453309%
Output for 5.6.23
Global relative difference true to \true -137.5995873349% Namespace relative difference true to \true -21.8119617789%
Output for 5.6.22
Global relative difference true to \true -84.5438880959% Namespace relative difference true to \true -20.8008126371%
Output for 5.6.21
Global relative difference true to \true -5.8354467632% Namespace relative difference true to \true 39.9269534989%
Output for 5.6.20
Global relative difference true to \true -13.8747441056% Namespace relative difference true to \true -234.6814969318%
Output for 5.6.19
Global relative difference true to \true -19.9458769918% Namespace relative difference true to \true 7.7632952712%
Output for 5.6.18
Global relative difference true to \true -18.3285459785% Namespace relative difference true to \true 68.9112386845%
Output for 5.6.17
Global relative difference true to \true -26.6407168403% Namespace relative difference true to \true -117.5668390930%
Output for 5.6.16
Global relative difference true to \true -18.3445284627% Namespace relative difference true to \true -24.1643318607%
Output for 5.6.15
Global relative difference true to \true -20.0337105265% Namespace relative difference true to \true -57.5647358840%
Output for 5.6.14
Global relative difference true to \true -27.1584077304% Namespace relative difference true to \true -207.0359240164%
Output for 5.6.13
Global relative difference true to \true -27.0081969135% Namespace relative difference true to \true -26.3215864416%
Output for 5.6.12
Global relative difference true to \true 1.2205655287% Namespace relative difference true to \true -24.0417621395%
Output for 5.6.11
Global relative difference true to \true -286.3753879080% Namespace relative difference true to \true -16.7482779615%
Output for 5.6.10
Global relative difference true to \true -138.8928555138% Namespace relative difference true to \true -35.4919695943%
Output for 5.6.9
Global relative difference true to \true -28.0022966622% Namespace relative difference true to \true -348.0711301912%
Output for 5.6.8
Global relative difference true to \true -29.4683514153% Namespace relative difference true to \true -55.5154454253%
Output for 5.6.7
Global relative difference true to \true -9.6956829441% Namespace relative difference true to \true -25.1937866712%
Output for 5.6.6
Global relative difference true to \true -28.0674232582% Namespace relative difference true to \true -141.8623526737%
Output for 5.6.5
Global relative difference true to \true -236.8305777873% Namespace relative difference true to \true 2.9655386576%
Output for 5.6.4
Global relative difference true to \true -28.4550429550% Namespace relative difference true to \true -210.6962701404%
Output for 5.6.3
Global relative difference true to \true -29.0245587080% Namespace relative difference true to \true -20.9100776883%
Output for 5.6.2
Global relative difference true to \true -27.3009439345% Namespace relative difference true to \true 34.1852970975%
Output for 5.6.1
Global relative difference true to \true -26.5790235192% Namespace relative difference true to \true -146.3958502378%
Output for 5.6.0
Global relative difference true to \true -44.1892940120% Namespace relative difference true to \true -65.3335129471%
Output for 5.5.38
Global relative difference true to \true -27.3657916979% Namespace relative difference true to \true -1.1354924488%
Output for 5.5.37
Global relative difference true to \true -2134.7452606635% Namespace relative difference true to \true -19.5821301945%
Output for 5.5.36
Global relative difference true to \true -25.7917189638% Namespace relative difference true to \true -20.8520581039%
Output for 5.5.35
Global relative difference true to \true -27.0655747739% Namespace relative difference true to \true -18.6916417165%
Output for 5.5.34
Global relative difference true to \true -18.8117465053% Namespace relative difference true to \true 64.4467967721%
Output for 5.5.33
Global relative difference true to \true -27.7061071769% Namespace relative difference true to \true -11.1675703337%
Output for 5.5.32
Global relative difference true to \true -113.6769755543% Namespace relative difference true to \true -19.2465720232%
Output for 5.5.31
Global relative difference true to \true -26.9468615537% Namespace relative difference true to \true -1108.0610266190%
Output for 5.5.30
Global relative difference true to \true -27.9633903554% Namespace relative difference true to \true 299.6505175295%
Output for 5.5.29
Global relative difference true to \true -14.2471235322% Namespace relative difference true to \true -30.7119924712%
Output for 5.5.28
Global relative difference true to \true -24.3417383593% Namespace relative difference true to \true -18.8291407372%
Output for 5.5.27
Global relative difference true to \true 409.2992828464% Namespace relative difference true to \true -15.4527189308%
Output for 5.5.26
Global relative difference true to \true -55.9175996904% Namespace relative difference true to \true -19.3787565439%
Output for 5.5.25
Global relative difference true to \true -19.9772061068% Namespace relative difference true to \true -144.5581442660%
Output for 5.5.24
Global relative difference true to \true -14.9823395603% Namespace relative difference true to \true -7.0244862983%
Output for 5.5.23
Global relative difference true to \true -117.9130981344% Namespace relative difference true to \true -19.8118915921%
Output for 5.5.22
Global relative difference true to \true -28.7264406753% Namespace relative difference true to \true -18.6201271105%
Output for 5.5.21
Global relative difference true to \true -28.2002597388% Namespace relative difference true to \true -19.6524033312%
Output for 5.5.20
Global relative difference true to \true -45.7599013144% Namespace relative difference true to \true -17.3850769711%
Output for 5.5.19
Global relative difference true to \true -27.1761481658% Namespace relative difference true to \true -19.6009770819%
Output for 5.5.18
Global relative difference true to \true -136.0234576014% Namespace relative difference true to \true -16.9085321943%
Output for 5.5.16
Global relative difference true to \true -28.2793085744% Namespace relative difference true to \true -17.2430467111%
Output for 5.5.15
Global relative difference true to \true -0.2989693665% Namespace relative difference true to \true -19.5296663222%
Output for 5.5.14
Global relative difference true to \true 254.4132122324% Namespace relative difference true to \true -21.5397545085%
Output for 5.5.13
Global relative difference true to \true -42.6731168446% Namespace relative difference true to \true -18.2978232000%
Output for 5.5.12
Global relative difference true to \true -17.2795573642% Namespace relative difference true to \true -48.0959446419%
Output for 5.5.11
Global relative difference true to \true -29.1470966248% Namespace relative difference true to \true -18.9791074632%
Output for 5.5.10
Global relative difference true to \true -94.2312947201% Namespace relative difference true to \true -15.4451127227%
Output for 5.5.9
Global relative difference true to \true -36.0887361385% Namespace relative difference true to \true -18.9593923290%
Output for 5.5.8
Global relative difference true to \true -29.1449604197% Namespace relative difference true to \true -177.2063978157%
Output for 5.5.7
Global relative difference true to \true -27.1626815637% Namespace relative difference true to \true -24.7349797761%
Output for 5.5.6
Global relative difference true to \true -28.5520479161% Namespace relative difference true to \true -21.9253639789%
Output for 5.5.5
Global relative difference true to \true -27.8409045070% Namespace relative difference true to \true -19.8374032692%
Output for 5.5.4
Global relative difference true to \true -2.1177522478% Namespace relative difference true to \true -1055.4290474868%
Output for 5.5.3
Global relative difference true to \true -18.9722037777% Namespace relative difference true to \true -19.2167040846%
Output for 5.5.2
Global relative difference true to \true -17.6473494060% Namespace relative difference true to \true -18.5243980649%
Output for 5.5.1
Global relative difference true to \true -162.4739340799% Namespace relative difference true to \true -19.0676323441%
Output for 5.5.0
Global relative difference true to \true -18.8260840152% Namespace relative difference true to \true 39.6090723793%
Output for 5.4.45
Global relative difference true to \true -26.5090116803% Namespace relative difference true to \true -64.0798802546%
Output for 5.4.44
Global relative difference true to \true -15.2206264126% Namespace relative difference true to \true -45.6332763547%
Output for 5.4.43
Global relative difference true to \true -489.0011845654% Namespace relative difference true to \true -23.0124389819%
Output for 5.4.42
Global relative difference true to \true -101.4573657224% Namespace relative difference true to \true 2.6473568753%
Output for 5.4.41
Global relative difference true to \true -28.2736382498% Namespace relative difference true to \true -90.3599609449%
Output for 5.4.40
Global relative difference true to \true -29.1212569857% Namespace relative difference true to \true -23.0052137885%
Output for 5.4.39
Global relative difference true to \true -399.4902186309% Namespace relative difference true to \true -26.7626459811%
Output for 5.4.38
Global relative difference true to \true -36.3614628651% Namespace relative difference true to \true 30.2114147927%
Output for 5.4.37
Global relative difference true to \true -27.9416616712% Namespace relative difference true to \true -22.3457881393%
Output for 5.4.36
Global relative difference true to \true -85.0620660635% Namespace relative difference true to \true -17.9486319674%
Output for 5.4.35
Global relative difference true to \true -27.7378337685% Namespace relative difference true to \true -34.3629640339%
Output for 5.4.34
Global relative difference true to \true 168.8711328579% Namespace relative difference true to \true -22.3862318240%
Output for 5.4.32
Global relative difference true to \true -26.2482654132% Namespace relative difference true to \true -21.2807456745%
Output for 5.4.31
Global relative difference true to \true 14.8461407796% Namespace relative difference true to \true -25.8146998794%
Output for 5.4.30
Global relative difference true to \true -143.7304935978% Namespace relative difference true to \true -26.7799915717%
Output for 5.4.29
Global relative difference true to \true -26.3875292253% Namespace relative difference true to \true -26.9472209796%
Output for 5.4.28
Global relative difference true to \true -28.9687013964% Namespace relative difference true to \true -230.1416371859%
Output for 5.4.27
Global relative difference true to \true -28.7315412046% Namespace relative difference true to \true -22.6980015714%
Output for 5.4.26
Global relative difference true to \true -1024.0774412782% Namespace relative difference true to \true -21.7044646405%
Output for 5.4.25
Global relative difference true to \true -20.8240093689% Namespace relative difference true to \true 19.9614188604%
Output for 5.4.24
Global relative difference true to \true -30.7343689603% Namespace relative difference true to \true 43.6960529573%
Output for 5.4.23
Global relative difference true to \true -18.5946559888% Namespace relative difference true to \true -55.7338736176%
Output for 5.4.22
Global relative difference true to \true -0.6324068784% Namespace relative difference true to \true -50.2423039163%
Output for 5.4.21
Global relative difference true to \true -28.6199272408% Namespace relative difference true to \true -26.7909051821%
Output for 5.4.20
Global relative difference true to \true 85.8417028452% Namespace relative difference true to \true -22.0810898957%
Output for 5.4.19
Global relative difference true to \true -20.3690417041% Namespace relative difference true to \true -14.8825782519%
Output for 5.4.18
Global relative difference true to \true 36.9562067390% Namespace relative difference true to \true -26.1687102962%
Output for 5.4.17
Global relative difference true to \true -31.4015972279% Namespace relative difference true to \true -22.8489438105%
Output for 5.4.16
Global relative difference true to \true -30.1207729192% Namespace relative difference true to \true -1190.3977552248%
Output for 5.4.15
Global relative difference true to \true -28.1868713513% Namespace relative difference true to \true -91.3936793041%
Output for 5.4.14
Global relative difference true to \true -14.1767924255% Namespace relative difference true to \true -171.1660560913%
Output for 5.4.13
Global relative difference true to \true -32.8474059475% Namespace relative difference true to \true -131.0727621613%
Output for 5.4.12
Global relative difference true to \true -29.3574328713% Namespace relative difference true to \true -25.1009655948%
Output for 5.4.11
Global relative difference true to \true -13.0469793094% Namespace relative difference true to \true -16.2429380063%
Output for 5.4.10
Global relative difference true to \true -24.2675416894% Namespace relative difference true to \true -25.8118282605%
Output for 5.4.9
Global relative difference true to \true -19.8461264042% Namespace relative difference true to \true -31.3539012291%
Output for 5.4.8
Global relative difference true to \true -29.3881556295% Namespace relative difference true to \true -0.4356097362%
Output for 5.4.7
Global relative difference true to \true -32.0923216867% Namespace relative difference true to \true -31.5210115284%
Output for 5.4.6
Global relative difference true to \true -309.0280900206% Namespace relative difference true to \true -33.4069410144%
Output for 5.4.5
Global relative difference true to \true -95.5819553334% Namespace relative difference true to \true -21.6426232156%
Output for 5.4.4
Global relative difference true to \true -29.6917293233% Namespace relative difference true to \true -655.1709707718%
Output for 5.4.3
Global relative difference true to \true -28.7592345102% Namespace relative difference true to \true -126.7888294612%
Output for 5.4.2
Global relative difference true to \true -4.7568416226% Namespace relative difference true to \true -23.2122754453%
Output for 5.4.1
Global relative difference true to \true -13.4876317196% Namespace relative difference true to \true -25.5909984897%
Output for 5.4.0
Global relative difference true to \true -186.3463525979% Namespace relative difference true to \true -25.3911571257%