3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace OK { class ServiceOK { public function __construct() { time(); } public function time() { return time(); } } } namespace KO { class ServiceKO { public function __construct() { $this->time(); } public function time() { return time(); } } } namespace { // From https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/PhpUnit/ClockMock.php // An simplified a lot :) class ClockMock { public static function register(string $ns) { eval(<<<EOPHP namespace $ns; function time() { return 0; } EOPHP ); } } $service = new OK\ServiceOK(); ClockMock::register('OK'); var_dump($service->time()); $service = new KO\ServiceKO(); ClockMock::register('KO'); var_dump($service->time()); }

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)
8.0.110.0000.00916.93
8.0.100.0040.00416.97
8.0.90.0060.00316.95
8.0.80.0050.01216.88
8.0.70.0000.00716.94
8.0.60.0050.00317.00
8.0.50.0030.00616.77
8.0.30.0030.01417.05
8.0.20.0120.00717.05
8.0.10.0070.00016.95
8.0.00.0150.00416.78
7.4.230.0000.00716.72
7.4.220.0030.00416.47
7.4.210.0070.00916.56
7.4.200.0040.00416.63
7.4.130.0080.01216.59
7.4.120.0050.01416.48
7.4.110.0080.00816.56
7.4.100.0120.00416.68
7.4.90.0090.00916.33
7.4.80.0130.00619.39
7.4.70.0080.00816.71
7.4.60.0030.01316.45
7.4.50.0040.01216.51
7.4.40.0080.00916.48
7.4.30.0080.00916.44
7.4.20.0090.00916.51
7.4.10.0100.01016.46
7.4.00.0100.00716.48
7.3.300.0030.00316.39
7.3.290.0110.00616.41
7.3.280.0110.00416.52
7.3.260.0130.00416.66
7.3.240.0080.00916.51
7.3.230.0130.00316.36
7.3.210.0070.01516.64
7.3.200.0100.00616.41
7.3.190.0140.00816.58
7.3.180.0060.00916.46
7.3.170.0030.01316.53
7.3.160.0120.00716.48
7.3.150.0070.01116.40
7.3.140.0100.00716.44
7.3.130.0120.00716.49
7.3.120.0100.00816.44
7.3.110.0080.01016.40
7.3.100.0090.00816.44
7.3.90.0090.00816.43
7.3.80.0110.00616.43
7.3.70.0080.00916.38
7.3.60.0090.00916.42
7.3.50.0110.00716.37
7.3.40.0100.00816.43
7.3.30.0100.00816.33
7.3.20.0110.00916.47
7.3.10.0100.00816.45
7.3.00.0100.00816.43
7.2.330.0030.01416.71
7.2.320.0060.01116.83
7.2.310.0170.00416.39
7.2.300.0040.01416.54
7.2.290.0060.01216.61
7.2.280.0120.00716.58
7.2.270.0110.00816.49
7.2.260.0110.00916.65
7.2.250.0110.00716.60
7.2.240.0090.00916.61
7.2.230.0080.01016.60
7.2.220.0110.00716.55
7.2.210.0110.00716.57
7.2.200.0080.00916.53
7.2.190.0090.00916.54
7.2.180.0110.00816.51
7.2.170.0130.00516.52
7.2.160.0100.00816.50
7.2.150.0110.00816.61
7.2.140.0140.00916.63
7.2.130.0080.01016.67
7.2.120.0090.01016.60
7.2.110.0130.00716.64
7.2.100.0070.01316.64
7.2.90.0100.01116.59
7.2.80.0110.00916.60
7.2.70.0090.01216.63
7.2.60.0120.00816.59
7.2.50.0130.00716.64
7.2.40.0100.01016.66
7.2.30.0100.00916.66
7.2.20.0080.01116.58
7.2.10.0120.00716.66
7.2.00.0140.00816.57

preferences:
32.66 ms | 401 KiB | 5 Q