3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Foo { class Bar { public function baz() { return strlen('Regarding the overhead: Just keep in mind, that a typical application calls built-in functions many thousand times. Even if the difference is small: It exists.'); } } $start = microtime(true); $foo = new Bar; for($x = 0; $x < 1000000; $x++) { $foo->baz(); } echo "Time: " . (microtime(true) - $start ) . 'us'; }
Output for 7.1.0
Time: 0.037062883377075us
Output for 7.0.14
Time: 0.062946081161499us
Output for 7.0.10
Time: 0.040715932846069us
Output for 7.0.9
Time: 0.053268194198608us
Output for 7.0.8
Time: 0.051881074905396us
Output for 7.0.7
Time: 0.049965858459473us
Output for 7.0.6
Time: 0.052263021469116us
Output for 7.0.5
Time: 0.057098150253296us
Output for 7.0.4
Time: 0.071665048599243us
Output for 7.0.3
Time: 0.041330099105835us
Output for 7.0.2
Time: 0.044747114181519us
Output for 7.0.1
Time: 0.042311906814575us
Output for 7.0.0
Time: 0.054367065429688us
Output for 5.6.28
Time: 0.14514303207397us
Output for 5.6.25
Time: 0.15965795516968us
Output for 5.6.24
Time: 0.15106701850891us
Output for 5.6.23
Time: 0.14290595054626us
Output for 5.6.22
Time: 0.14089202880859us
Output for 5.6.21
Time: 0.16780304908752us
Output for 5.6.20
Time: 0.17024397850037us
Output for 5.6.19
Time: 0.16254615783691us
Output for 5.6.18
Time: 0.14960694313049us
Output for 5.6.17
Time: 0.1723849773407us
Output for 5.6.16
Time: 0.16402006149292us
Output for 5.6.15
Time: 0.16683888435364us
Output for 5.6.14
Time: 0.15661096572876us
Output for 5.6.13
Time: 0.17339992523193us
Output for 5.6.12
Time: 0.14815998077393us
Output for 5.6.11
Time: 0.15080189704895us
Output for 5.6.10
Time: 0.16269588470459us
Output for 5.6.9
Time: 0.20328903198242us
Output for 5.6.8
Time: 0.14546298980713us
Output for 5.6.7
Time: 0.16482090950012us
Output for 5.6.6
Time: 0.14202690124512us
Output for 5.6.5
Time: 0.14016795158386us
Output for 5.6.4
Time: 0.15752196311951us
Output for 5.6.3
Time: 0.1557080745697us
Output for 5.6.2
Time: 0.16641902923584us
Output for 5.6.1
Time: 0.16090512275696us
Output for 5.6.0
Time: 0.14966416358948us
Output for 5.5.38
Time: 0.16178488731384us
Output for 5.5.37
Time: 0.17905187606812us
Output for 5.5.36
Time: 0.15963196754456us
Output for 5.5.35
Time: 0.1432991027832us
Output for 5.5.34
Time: 0.17545104026794us
Output for 5.5.33
Time: 0.15190410614014us
Output for 5.5.32
Time: 0.14251279830933us
Output for 5.5.31
Time: 0.14338898658752us
Output for 5.5.30
Time: 0.16893100738525us
Output for 5.5.29
Time: 0.17368102073669us
Output for 5.5.28
Time: 0.16405200958252us
Output for 5.5.27
Time: 0.14792704582214us
Output for 5.5.26
Time: 0.15093302726746us
Output for 5.5.25
Time: 0.15895414352417us
Output for 5.5.24
Time: 0.17419004440308us
Output for 5.5.23
Time: 0.15347290039062us
Output for 5.5.22
Time: 0.17989587783813us
Output for 5.5.21
Time: 0.14910006523132us
Output for 5.5.20
Time: 0.18380284309387us
Output for 5.5.19
Time: 0.15468502044678us
Output for 5.5.18
Time: 0.1687650680542us
Output for 5.5.16
Time: 0.160001039505us
Output for 5.5.15
Time: 0.15005707740784us
Output for 5.5.14
Time: 0.16006898880005us
Output for 5.5.13
Time: 0.1834020614624us
Output for 5.5.12
Time: 0.17314100265503us
Output for 5.5.11
Time: 0.16270995140076us
Output for 5.5.10
Time: 0.18305492401123us
Output for 5.5.9
Time: 0.16115307807922us
Output for 5.5.8
Time: 0.15311193466187us
Output for 5.5.7
Time: 0.14845395088196us
Output for 5.5.6
Time: 0.14483976364136us
Output for 5.5.5
Time: 0.13785815238953us
Output for 5.5.4
Time: 0.11744904518127us
Output for 5.5.3
Time: 0.16542291641235us
Output for 5.5.2
Time: 0.14826703071594us
Output for 5.5.1
Time: 0.11909198760986us
Output for 5.5.0
Time: 0.12078189849854us
Output for 5.4.45
Time: 0.16056299209595us
Output for 5.4.44
Time: 0.14718198776245us
Output for 5.4.43
Time: 0.17798399925232us
Output for 5.4.42
Time: 0.15491890907288us
Output for 5.4.41
Time: 0.15811800956726us
Output for 5.4.40
Time: 0.16100096702576us
Output for 5.4.39
Time: 0.15005087852478us
Output for 5.4.38
Time: 0.16976308822632us
Output for 5.4.37
Time: 0.16941690444946us
Output for 5.4.36
Time: 0.19197797775269us
Output for 5.4.35
Time: 0.14299988746643us
Output for 5.4.34
Time: 0.15611696243286us
Output for 5.4.32
Time: 0.1796190738678us
Output for 5.4.31
Time: 0.17000508308411us
Output for 5.4.30
Time: 0.16459798812866us
Output for 5.4.29
Time: 0.15164804458618us
Output for 5.4.28
Time: 0.15079283714294us
Output for 5.4.27
Time: 0.1542820930481us
Output for 5.4.26
Time: 0.15876793861389us
Output for 5.4.25
Time: 0.15616798400879us
Output for 5.4.24
Time: 0.14646697044373us
Output for 5.4.23
Time: 0.14101600646973us
Output for 5.4.22
Time: 0.11812496185303us
Output for 5.4.21
Time: 0.11649489402771us
Output for 5.4.20
Time: 0.14524102210999us
Output for 5.4.19
Time: 0.15277600288391us
Output for 5.4.18
Time: 0.11754894256592us
Output for 5.4.17
Time: 0.1170060634613us
Output for 5.4.16
Time: 0.14256882667542us
Output for 5.4.15
Time: 0.11493611335754us
Output for 5.4.14
Time: 0.13579297065735us
Output for 5.4.13
Time: 0.16374111175537us
Output for 5.4.12
Time: 0.15516996383667us
Output for 5.4.11
Time: 0.15127301216125us
Output for 5.4.10
Time: 0.16076493263245us
Output for 5.4.9
Time: 0.17693996429443us
Output for 5.4.8
Time: 0.1639289855957us
Output for 5.4.7
Time: 0.17570185661316us
Output for 5.4.6
Time: 0.16108012199402us
Output for 5.4.5
Time: 0.17771196365356us
Output for 5.4.4
Time: 0.15228700637817us
Output for 5.4.3
Time: 0.15147185325623us
Output for 5.4.2
Time: 0.15108704566956us
Output for 5.4.1
Time: 0.16606903076172us
Output for 5.4.0
Time: 0.14753198623657us
Output for 5.3.29
Time: 0.34168887138367us
Output for 5.3.28
Time: 0.26074695587158us
Output for 5.3.27
Time: 0.2593240737915us
Output for 5.3.26
Time: 0.26093888282776us
Output for 5.3.25
Time: 0.26249098777771us
Output for 5.3.24
Time: 0.30770993232727us
Output for 5.3.23
Time: 0.34639191627502us
Output for 5.3.22
Time: 0.33177208900452us
Output for 5.3.21
Time: 0.36037802696228us
Output for 5.3.20
Time: 0.31790685653687us
Output for 5.3.19
Time: 0.32490396499634us
Output for 5.3.18
Time: 0.35703110694885us
Output for 5.3.17
Time: 0.32331895828247us
Output for 5.3.16
Time: 0.32293105125427us
Output for 5.3.15
Time: 0.35094308853149us
Output for 5.3.14
Time: 0.37055397033691us
Output for 5.3.13
Time: 0.32233500480652us
Output for 5.3.12
Time: 0.34645485877991us
Output for 5.3.11
Time: 0.32400298118591us
Output for 5.3.10
Time: 0.31553101539612us
Output for 5.3.9
Time: 0.35179209709167us
Output for 5.3.8
Time: 0.32292604446411us
Output for 5.3.7
Time: 0.33306503295898us
Output for 5.3.6
Time: 0.32869482040405us
Output for 5.3.5
Time: 0.32963109016418us
Output for 5.3.4
Time: 0.30437588691711us
Output for 5.3.3
Time: 0.33800196647644us
Output for 5.3.2
Time: 0.34760808944702us
Output for 5.3.1
Time: 0.29810380935669us
Output for 5.3.0
Time: 0.29221105575562us
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_STRING in /in/702jo on line 2
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/702jo on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/702jo on line 2
Process exited with code 255.