3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Module { protected $_name; protected $_version; public function __construct(string $name, string $version) { $this->_name = $name; $this->_version = $version; } } $s = microtime(true); for ($i = 0; $i < 1000000; $i++) { new Module('Framework', '1.10'); } var_dump(microtime(true) - $s); $s = microtime(true); for ($i = 0; $i < 1000000; $i++) { new class extends Module { public function __construct() { } protected $_name = 'Framework'; protected $_version = '1.10'; }; } var_dump(microtime(true) - $s);
Output for 7.3.1
float(0.1607677936554) float(0.10150098800659)
Output for 7.3.0
float(0.17344093322754) float(0.095388889312744)
Output for 7.2.13
float(0.1816680431366) float(0.12262415885925)
Output for 7.2.12
float(0.16286087036133) float(0.11846995353699)
Output for 7.2.11
float(0.16979384422302) float(0.12652707099915)
Output for 7.2.10
float(0.16516804695129) float(0.16119909286499)
Output for 7.2.9
float(0.16089200973511) float(0.14768886566162)
Output for 7.2.8
float(0.16101503372192) float(0.13127994537354)
Output for 7.2.7
float(0.16747808456421) float(0.11624979972839)
Output for 7.2.6
float(0.17694711685181) float(0.12240314483643)
Output for 7.2.5
float(0.15267586708069) float(0.12321305274963)
Output for 7.2.4
float(0.15781593322754) float(0.14237117767334)
Output for 7.2.3
float(0.15795111656189) float(0.13010096549988)
Output for 7.2.2
float(0.18706297874451) float(0.13149189949036)
Output for 7.2.1
float(0.16073203086853) float(0.11209511756897)
Output for 7.2.0
float(0.16838192939758) float(0.11715602874756)
Output for 7.1.25
float(0.24931192398071) float(0.21423006057739)
Output for 7.1.10
float(0.11794304847717) float(0.11138296127319)
Output for 7.1.7
float(0.46954917907715) float(0.31160807609558)
Output for 7.1.6
float(0.45670390129089) float(0.19433808326721)
Output for 7.1.5
float(0.46541595458984) float(0.28908395767212)
Output for 7.1.4
float(0.30936312675476) float(0.18632292747498)
Output for 7.1.3
float(0.25630807876587) float(0.19490098953247)
Output for 7.1.2
float(0.26827597618103) float(0.17813611030579)
Output for 7.1.1
float(0.3083770275116) float(0.20539498329163)
Output for 7.1.0
float(0.25922393798828) float(0.21244978904724)
Output for 7.0.20
float(0.21607303619385) float(0.17177700996399)
Output for 7.0.19
float(0.4726390838623) float(0.18437480926514)
Output for 7.0.18
float(0.36868715286255) float(0.25244212150574)
Output for 7.0.17
float(0.25922989845276) float(0.16497802734375)
Output for 7.0.16
float(0.22549104690552) float(0.23401093482971)
Output for 7.0.15
float(0.32261610031128) float(0.2164671421051)
Output for 7.0.14
float(0.37635111808777) float(0.26844596862793)
Output for 7.0.13
float(0.35445809364319) float(0.28888988494873)
Output for 7.0.12
float(0.30351614952087) float(0.21435880661011)
Output for 7.0.11
float(0.29233694076538) float(0.23992705345154)
Output for 7.0.10
float(0.31327605247498) float(0.30926585197449)
Output for 7.0.9
float(0.39339995384216) float(0.34139513969421)
Output for 7.0.8
float(0.42352890968323) float(0.33843612670898)
Output for 7.0.7
float(0.29622411727905) float(0.23306608200073)
Output for 7.0.6
float(0.37117505073547) float(0.32479619979858)
Output for 7.0.5
float(0.41188406944275) float(0.29657816886902)
Output for 7.0.4
float(0.45594000816345) float(0.41626310348511)
Output for 7.0.3
float(0.56867504119873) float(0.61952710151672)
Output for 7.0.2
float(0.45675301551819) float(0.32290196418762)
Output for 7.0.1
float(0.4389009475708) float(0.32820510864258)
Output for 7.0.0
float(0.46648693084717) float(0.30656385421753)
Output for hhvm-3.15.4
float(1.207053899765) float(0.39581918716431)
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/eOWpQ on line 27
Process exited with code 255.