3v4l.org

run code in 300+ PHP versions simultaneously
<?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);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.3.10.0070.27316.41
7.3.00.0100.27515.96
7.2.130.0140.30916.63
7.2.120.0130.28917.00
7.2.110.0170.29716.67
7.2.100.0100.32817.02
7.2.90.0170.31316.64
7.2.80.0130.29616.46
7.2.70.0130.28816.40
7.2.60.0080.25416.92
7.2.50.0100.28216.57
7.2.40.0030.30816.62
7.2.30.0070.29516.57
7.2.20.0100.32416.72
7.2.10.0030.27916.62
7.2.00.0130.25318.19
7.1.250.0070.46815.51
7.1.100.0030.24018.02
7.1.70.0160.54617.10
7.1.60.0300.56435.17
7.1.50.0230.66534.72
7.1.40.0230.50634.45
7.1.30.0230.45534.45
7.1.20.0160.46234.54
7.1.10.0100.49616.48
7.1.00.0090.45516.79
7.0.200.0090.39416.63
7.0.190.0110.51916.50
7.0.180.0090.61316.31
7.0.170.0030.43316.26
7.0.160.0130.44016.13
7.0.150.0060.49416.45
7.0.140.0030.61516.18
7.0.130.0190.48016.41
7.0.120.0150.46416.41
7.0.110.0050.48616.29
7.0.100.0220.49116.45
7.0.90.0270.49016.23
7.0.80.0250.50716.32
7.0.70.0150.46416.29
7.0.60.0060.60816.29
7.0.50.0170.62116.16
7.0.40.0130.62116.29
7.0.30.0370.60916.47
7.0.20.0120.59716.39
7.0.10.0280.63016.53
7.0.00.0100.60316.51

preferences:
36.3 ms | 400 KiB | 5 Q