3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace DummyTest\Lib { class TObject { public function __construct() { } } class TComponent extends \DummyTest\Lib\TObject { public function __construct() { parent::__construct(); } } class TSingletonComponent extends \DummyTest\Lib\TComponent { public function __construct() { parent::__construct(); } } class TDatabase extends \DummyTest\Lib\TSingletonComponent { public function __construct() { parent::__construct(); } public static function Init() { $db = new \DummyTest\Lib\Database\TPDO(); } } } namespace DummyTest\Lib\Database { class TDatabase extends \DummyTest\Lib\TComponent { public function __construct() { parent::__construct(); } } class TPDO extends \DummyTest\Lib\Database\TDatabase { protected $pdo; public function __construct() { parent::__construct(); echo serialize(\DummyTest\SystemConfig::Get('xxx')); // Fails in PHP } } } namespace DummyTest { class SystemConfig { protected static $config = array(); public function Get($name) { echo get_called_class().PHP_EOL; if(isset(static::$config[$name])) { return static::$config[$name]; } return null; } public function Set($name, $value) { static::$config[$name] = $value; } } SystemConfig::Set('xxx', 'yyy'); \DummyTest\Lib\TDatabase::Init(); }

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.3.60.0150.00616.63
8.3.50.0120.00822.78
8.3.40.0150.00318.92
8.3.30.0000.01419.22
8.3.20.0080.00020.35
8.3.10.0080.00023.71
8.3.00.0050.00319.38
8.2.180.0130.00916.38
8.2.170.0170.00322.96
8.2.160.0130.00020.43
8.2.150.0030.00524.18
8.2.140.0090.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00420.98
8.2.110.0030.00719.08
8.2.100.0060.00617.87
8.2.90.0040.00419.23
8.2.80.0000.00817.97
8.2.70.0030.00717.50
8.2.60.0000.00817.80
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0050.00317.92
8.2.20.0040.00417.65
8.2.10.0060.00317.98
8.2.00.0050.00217.72
8.1.280.0140.00025.92
8.1.270.0080.00023.88
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00620.87
8.1.230.0090.00317.42
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0090.00317.35
8.1.190.0040.00417.11
8.1.180.0050.00218.10
8.1.170.0030.00518.59
8.1.160.0000.00821.96
8.1.150.0000.00718.73
8.1.140.0050.00217.32
8.1.130.0030.00517.73
8.1.120.0040.00417.37
8.1.110.0040.00417.41
8.1.100.0000.00717.39
8.1.90.0070.00017.34
8.1.80.0000.00817.23
8.1.70.0030.00517.31
8.1.60.0060.00317.42
8.1.50.0050.00317.33
8.1.40.0000.00817.50
8.1.30.0000.00817.66
8.1.20.0060.00517.46
8.1.10.0040.00417.53
8.1.00.0000.00817.44
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0030.00318.43
8.0.270.0040.00417.13
8.0.260.0060.00018.43
8.0.250.0040.00416.93
8.0.240.0030.00516.85
8.0.230.0030.00316.98
8.0.220.0030.00316.90
8.0.210.0060.00316.93
8.0.200.0000.00716.95
8.0.190.0000.00716.97
8.0.180.0070.00016.83
8.0.170.0060.00316.96
8.0.160.0050.00216.77
8.0.150.0070.00016.89
8.0.140.0000.00716.89
8.0.130.0030.00613.32
8.0.120.0040.00416.81
8.0.110.0070.00016.95
8.0.100.0040.00416.77
8.0.90.0000.00716.88
8.0.80.0080.00816.86
8.0.70.0040.00416.95
8.0.60.0050.00316.96
8.0.50.0080.00016.89
8.0.30.0130.00917.02
8.0.20.0120.00717.40
8.0.10.0000.00816.99
8.0.00.0110.00616.57
7.4.330.0000.00715.00
7.4.320.0000.00716.53
7.4.300.0060.00016.62
7.4.290.0070.00016.42
7.4.280.0040.00416.43
7.4.270.0000.00716.63
7.4.260.0040.00416.59
7.4.250.0050.00216.47
7.4.240.0020.00516.58
7.4.230.0060.00316.45
7.4.220.0060.01616.70
7.4.210.0110.00316.64
7.4.200.0000.00716.71
7.4.160.0100.00716.57
7.4.150.0150.01017.40
7.4.140.0120.00717.86
7.4.130.0140.00716.58
7.4.120.0110.00616.55
7.4.110.0080.00816.63
7.4.100.0030.01916.66
7.4.90.0060.01016.56
7.4.80.0070.01719.39
7.4.70.0090.00916.51
7.4.60.0100.00616.43
7.4.50.0040.00016.43
7.4.40.0120.00416.52
7.4.30.0040.01216.54
7.4.00.0030.01314.79
7.3.330.0020.00213.41
7.3.320.0000.00513.45
7.3.310.0000.00716.34
7.3.300.0020.00516.39
7.3.290.0060.00916.45
7.3.280.0090.01016.44
7.3.270.0030.01417.40
7.3.260.0100.01316.65
7.3.240.0110.00716.54
7.3.230.0090.00616.39
7.3.210.0100.00716.69
7.3.200.0170.00919.39
7.3.190.0070.01316.51
7.3.180.0060.01016.66
7.3.170.0120.00916.55
7.3.160.0180.00616.49
7.3.120.0030.01414.80
7.3.110.0000.01315.10
7.3.100.0070.00714.98
7.3.90.0000.01415.09
7.3.80.0090.00914.93
7.3.70.0080.00414.76
7.3.60.0050.00514.66
7.3.50.0000.01514.90
7.3.40.0040.00414.78
7.3.30.0000.01514.38
7.3.20.0060.00616.62
7.3.10.0070.00716.35
7.3.00.0000.00916.87
7.2.330.0170.00416.72
7.2.320.0090.01216.78
7.2.310.0160.00016.89
7.2.300.0150.00616.71
7.2.290.0060.01716.82
7.2.240.0060.00614.97
7.2.230.0000.01114.75
7.2.220.0060.00915.23
7.2.210.0000.01214.85
7.2.200.0040.01215.24
7.2.190.0030.00615.16
7.2.180.0060.01215.01
7.2.170.0090.00615.01
7.2.160.0030.01015.08
7.2.150.0100.00616.68
7.2.140.0070.00717.03
7.2.130.0080.00617.04
7.2.120.0040.01117.05
7.2.110.0030.00616.69
7.2.100.0000.00917.07
7.2.90.0070.00716.99
7.2.80.0070.00417.08
7.2.70.0080.00417.04
7.2.60.0070.00516.85
7.2.50.0040.00816.76
7.2.40.0070.00416.55
7.2.30.0120.00316.81
7.2.20.0090.00617.03
7.2.10.0030.00917.05
7.2.00.0080.00518.18
7.1.330.0000.01215.81
7.1.320.0060.00315.79
7.1.310.0040.01115.67
7.1.300.0030.00615.51
7.1.290.0000.01115.67
7.1.280.0090.00015.66
7.1.270.0000.00815.73
7.1.260.0030.00715.59
7.1.250.0070.00715.46
7.1.200.0090.00315.86
7.1.100.0070.00718.20
7.1.70.0070.00317.05
7.1.60.0070.01719.40
7.1.50.0110.01416.78
7.1.00.0030.07722.48
7.0.200.0030.00616.80
7.0.140.0070.07021.95
7.0.60.0000.07720.04
7.0.50.0170.07717.89
7.0.40.0070.04320.14
7.0.30.0570.06720.13
7.0.20.0300.07020.14
7.0.10.0070.08720.21
7.0.00.0070.07020.08
5.6.280.0000.07721.13
5.6.210.0070.04720.49
5.6.200.0030.05718.19
5.6.190.0130.06720.55
5.6.180.3600.05020.63
5.6.170.0270.04720.51
5.6.160.0100.06720.71
5.6.150.0100.04018.21
5.6.140.0070.08318.15
5.6.130.0070.07018.19
5.6.120.0000.07321.11
5.6.110.0030.04720.98
5.6.100.0070.03721.00
5.6.90.0100.08020.99
5.6.80.0030.04720.51
5.6.70.0370.06720.41
5.5.350.0370.07020.54
5.5.340.0070.08317.96
5.5.330.0030.04320.21
5.5.320.0270.08320.32
5.5.310.0300.04020.30
5.5.300.0070.03718.01
5.5.290.0000.07718.08
5.5.280.0100.04020.90
5.5.270.0070.06720.78
5.5.260.0130.03720.79
5.5.250.0000.06020.71
5.5.240.0170.05320.28
5.4.450.0230.07719.41
5.4.440.0230.06019.48
5.4.430.0200.06319.27
5.4.420.0130.04319.27
5.4.410.0200.06319.39
5.4.400.0270.06319.31
5.4.390.0170.05019.09
5.4.380.0170.05719.08
5.4.370.0270.06019.09
5.4.360.0230.07319.31
5.4.350.0230.07019.26
5.4.340.0300.07019.09
5.4.320.0200.08019.21
5.4.310.0200.07719.14
5.4.300.0170.06019.16
5.4.290.0230.04719.14
5.4.280.0200.06719.16
5.4.270.0170.03719.31
5.4.260.0200.07018.87
5.4.250.0170.05019.16
5.4.240.0200.05019.30
5.4.230.0200.07718.84
5.4.220.0270.07319.08
5.4.210.0170.04019.21
5.4.200.0230.04319.08
5.4.190.0270.06719.21
5.4.180.0230.04319.15
5.4.170.0230.07318.86
5.4.160.0200.04718.98
5.4.150.0200.06718.85
5.4.140.0230.06316.43
5.4.130.0200.06716.56
5.4.120.0130.04016.39
5.4.110.0170.03716.59
5.4.100.0200.06016.42
5.4.90.0200.07016.23
5.4.80.0130.04316.57
5.4.70.0170.04716.55
5.4.60.0270.06016.15
5.4.50.0300.06016.27
5.4.40.0270.06316.50
5.4.30.0300.04716.32
5.4.20.0170.05316.51
5.4.10.0200.03716.38
5.4.00.0100.04015.74
5.3.290.0330.06314.80
5.3.280.0200.07714.58
5.3.270.0200.05314.55
5.3.260.0230.05314.74
5.3.250.0300.06714.73
5.3.240.0270.06314.74
5.3.230.0200.04714.70
5.3.220.0170.04314.74
5.3.210.0100.04314.55
5.3.200.0170.03714.80
5.3.190.0270.05714.66
5.3.180.0200.04714.50
5.3.170.0170.05014.48
5.3.160.0200.04014.69
5.3.150.0300.06014.48
5.3.140.0200.03714.66
5.3.130.0230.04714.79
5.3.120.0130.04714.48
5.3.110.0270.05714.57
5.3.100.0230.03014.22
5.3.90.0270.02714.09
5.3.80.0130.04014.11
5.3.70.0130.04714.13
5.3.60.0100.04314.04
5.3.50.0170.03713.95
5.3.40.0270.03013.90
5.3.30.0300.03313.93
5.3.20.0170.04713.77
5.3.10.0230.03013.58
5.3.00.0170.06713.74
5.2.170.0170.03313.48
5.2.160.0130.03713.48
5.2.150.0170.04713.48
5.2.140.0200.03713.48
5.2.130.0100.06013.48
5.2.120.0170.03013.48
5.2.110.0200.05713.48
5.2.100.0170.03013.48
5.2.90.0200.05713.48
5.2.80.0200.03713.48
5.2.70.0230.03313.48
5.2.60.0170.04713.48
5.2.50.0100.03313.48
5.2.40.0130.05713.48
5.2.30.0130.03013.48
5.2.20.0200.05713.48
5.2.10.0170.06013.48
5.2.00.0200.04013.48
5.1.60.0130.05313.48
5.1.50.0130.05313.48
5.1.40.0200.04713.48
5.1.30.0170.04013.48
5.1.20.0170.03013.48
5.1.10.0070.03713.48
5.1.00.0130.02713.48
5.0.50.0070.04013.48
5.0.40.0070.02313.48
5.0.30.0100.06713.48
5.0.20.0100.03713.48
5.0.10.0070.03713.48
5.0.00.0070.03013.48
4.4.90.0070.03013.48
4.4.80.0030.02013.48
4.4.70.0070.03713.48
4.4.60.0070.03313.48
4.4.50.0070.02713.48
4.4.40.0070.03713.48
4.4.30.0070.04313.48
4.4.20.0070.02313.48
4.4.10.0130.02313.48
4.4.00.0130.03713.48
4.3.110.0100.02013.48
4.3.100.0070.03013.48
4.3.90.0070.02713.48
4.3.80.0100.05313.48
4.3.70.0170.01713.48
4.3.60.0070.03313.48
4.3.50.0070.04313.48
4.3.40.0030.04013.48
4.3.30.0000.02313.48
4.3.20.0070.01313.48
4.3.10.0030.01313.48
4.3.00.0030.03013.48

preferences:
46.87 ms | 401 KiB | 5 Q