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.022852897644043us
Output for 7.0.14
Time: 0.040657997131348us
Output for 7.0.10
Time: 0.026050806045532us
Output for 7.0.9
Time: 0.037565946578979us
Output for 7.0.8
Time: 0.035067081451416us
Output for 7.0.7
Time: 0.033293008804321us
Output for 7.0.6
Time: 0.041007041931152us
Output for 7.0.5
Time: 0.040450096130371us
Output for 7.0.4
Time: 0.030001878738403us
Output for 7.0.3
Time: 0.038552045822144us
Output for 7.0.2
Time: 0.035355806350708us
Output for 7.0.1
Time: 0.041098117828369us
Output for 7.0.0
Time: 0.036347150802612us
Output for hhvm-3.12.0
Time: 0.20306086540222us
Output for hhvm-3.10.0
Time: 0.34699201583862us
Output for 5.6.28
Time: 0.20897006988525us
Output for 5.6.25
Time: 0.14573979377747us
Output for 5.6.24
Time: 0.15072894096375us
Output for 5.6.23
Time: 0.14258217811584us
Output for 5.6.22
Time: 0.16145920753479us
Output for 5.6.21
Time: 0.15142107009888us
Output for 5.6.20
Time: 0.15717101097107us
Output for 5.6.19
Time: 0.15777492523193us
Output for 5.6.18
Time: 0.1564610004425us
Output for 5.6.17
Time: 0.14319109916687us
Output for 5.6.16
Time: 0.1550030708313us
Output for 5.6.15
Time: 0.14982104301453us
Output for 5.6.14
Time: 0.15922498703003us
Output for 5.6.13
Time: 0.15529489517212us
Output for 5.6.12
Time: 0.14672207832336us
Output for 5.6.6, 5.6.11
Time: 0.15440201759338us
Output for 5.6.10
Time: 0.14766097068787us
Output for 5.6.9
Time: 0.170814037323us
Output for 5.6.8
Time: 0.15000700950623us
Output for 5.6.7
Time: 0.21854305267334us
Output for 5.6.5
Time: 0.14537811279297us
Output for 5.6.4
Time: 0.14258599281311us
Output for 5.6.3
Time: 0.16605520248413us
Output for 5.6.2
Time: 0.14322304725647us
Output for 5.6.1
Time: 0.15556883811951us
Output for 5.6.0
Time: 0.1572470664978us
Output for 5.5.38
Time: 0.18489193916321us
Output for 5.5.37
Time: 0.17319703102112us
Output for 5.5.36
Time: 0.16327500343323us
Output for 5.5.35
Time: 0.15189814567566us
Output for 5.5.34
Time: 0.15333795547485us
Output for 5.5.33
Time: 0.1658570766449us
Output for 5.5.32
Time: 0.1804940700531us
Output for 5.5.31
Time: 0.1639461517334us
Output for 5.5.30
Time: 0.15426802635193us
Output for 5.5.29
Time: 0.14904689788818us
Output for 5.5.28
Time: 0.16601705551147us
Output for 5.5.27
Time: 0.16208600997925us
Output for 5.5.26
Time: 0.15218997001648us
Output for 5.5.25
Time: 0.16040015220642us
Output for 5.5.24
Time: 0.18847584724426us
Output for 5.5.23
Time: 0.15406084060669us
Output for 5.5.22
Time: 0.1613290309906us
Output for 5.5.21
Time: 0.15595006942749us
Output for 5.5.20
Time: 0.15533208847046us
Output for 5.5.19
Time: 0.1489429473877us
Output for 5.5.18
Time: 0.16122484207153us
Output for 5.5.16
Time: 0.16474509239197us
Output for 5.5.15
Time: 0.15433502197266us
Output for 5.5.14
Time: 0.1413779258728us
Output for 5.5.13
Time: 0.15610098838806us
Output for 5.5.12
Time: 0.16120195388794us
Output for 5.5.11
Time: 0.16460585594177us
Output for 5.5.10
Time: 0.14586806297302us
Output for 5.5.9
Time: 0.16472411155701us
Output for 5.5.8
Time: 0.18164706230164us
Output for 5.5.7
Time: 0.14342498779297us
Output for 5.5.6
Time: 0.17151618003845us
Output for 5.5.5
Time: 0.15245008468628us
Output for 5.5.4
Time: 0.14889407157898us
Output for 5.5.3
Time: 0.16139912605286us
Output for 5.5.2
Time: 0.15682101249695us
Output for 5.5.1
Time: 0.1658718585968us
Output for 5.5.0
Time: 0.17290616035461us
Output for 5.4.45
Time: 0.14476990699768us
Output for 5.4.44
Time: 0.18120002746582us
Output for 5.4.43
Time: 0.16354393959045us
Output for 5.4.42
Time: 0.15507888793945us
Output for 5.4.41
Time: 0.15042400360107us
Output for 5.4.40
Time: 0.16517305374146us
Output for 5.4.39
Time: 0.14198803901672us
Output for 5.4.38
Time: 0.17455101013184us
Output for 5.4.37
Time: 0.14614391326904us
Output for 5.4.36
Time: 0.14778518676758us
Output for 5.4.35
Time: 0.16716909408569us
Output for 5.4.34
Time: 0.15830183029175us
Output for 5.4.32
Time: 0.16330313682556us
Output for 5.4.31
Time: 0.15508913993835us
Output for 5.4.30
Time: 0.15693402290344us
Output for 5.4.29
Time: 0.1699697971344us
Output for 5.4.28
Time: 0.16863203048706us
Output for 5.4.27
Time: 0.14637184143066us
Output for 5.4.26
Time: 0.15830898284912us
Output for 5.4.25
Time: 0.14270687103271us
Output for 5.4.24
Time: 0.17463397979736us
Output for 5.4.23
Time: 0.13822293281555us
Output for 5.4.22
Time: 0.14097785949707us
Output for 5.4.21
Time: 0.15389394760132us
Output for 5.4.20
Time: 0.15224385261536us
Output for 5.4.19
Time: 0.13872599601746us
Output for 5.4.18
Time: 0.16621112823486us
Output for 5.4.17
Time: 0.15609788894653us
Output for 5.4.16
Time: 0.14071679115295us
Output for 5.4.15
Time: 0.14171290397644us
Output for 5.4.14
Time: 0.12751603126526us
Output for 5.4.13
Time: 0.13453316688538us
Output for 5.4.12
Time: 0.11938214302063us
Output for 5.4.11
Time: 0.14090490341187us
Output for 5.4.10
Time: 0.11644601821899us
Output for 5.4.9
Time: 0.14103484153748us
Output for 5.4.8
Time: 0.11907196044922us
Output for 5.4.7
Time: 0.12250208854675us
Output for 5.4.6
Time: 0.13809490203857us
Output for 5.4.5
Time: 0.16574287414551us
Output for 5.4.4
Time: 0.19648718833923us
Output for 5.4.3
Time: 0.14445209503174us
Output for 5.4.2
Time: 0.13896584510803us
Output for 5.4.1
Time: 0.15350794792175us
Output for 5.4.0
Time: 0.16938805580139us
Output for 5.3.29
Time: 0.27102613449097us
Output for 5.3.28
Time: 0.26974606513977us
Output for 5.3.27
Time: 0.30305290222168us
Output for 5.3.26
Time: 0.26691102981567us
Output for 5.3.25
Time: 0.25569200515747us
Output for 5.3.24
Time: 0.2393651008606us
Output for 5.3.23
Time: 0.25291395187378us
Output for 5.3.22
Time: 0.22037315368652us
Output for 5.3.21
Time: 0.25592613220215us
Output for 5.3.20
Time: 0.21465706825256us
Output for 5.3.19
Time: 0.25127100944519us
Output for 5.3.18
Time: 0.25076508522034us
Output for 5.3.17
Time: 0.23353600502014us
Output for 5.3.16
Time: 0.23759484291077us
Output for 5.3.15
Time: 0.26478719711304us
Output for 5.3.14
Time: 0.2701530456543us
Output for 5.3.13
Time: 0.29130601882935us
Output for 5.3.12
Time: 0.2945408821106us
Output for 5.3.11
Time: 0.26894497871399us
Output for 5.3.10
Time: 0.27067494392395us
Output for 5.3.9
Time: 0.26597881317139us
Output for 5.3.8
Time: 0.25369620323181us
Output for 5.3.7
Time: 0.26900815963745us
Output for 5.3.6
Time: 0.25573492050171us
Output for 5.3.5
Time: 0.27888488769531us
Output for 5.3.4
Time: 0.26156902313232us
Output for 5.3.3
Time: 0.25973701477051us
Output for 5.3.2
Time: 0.2540979385376us
Output for 5.3.1
Time: 0.27221298217773us
Output for 5.3.0
Time: 0.24335479736328us
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_STRING in /in/Ohs6E 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/Ohs6E on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/Ohs6E on line 2
Process exited with code 255.