3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Foo { abstract protected static function things(); protected $t; protected function __construct($t) { $this->t = $t; } public function getT() { return $this->t; } public static function all() { return array_map(function($t) { return new static($t); }, static::things()); } } class Bar extends Foo { protected static function things() { return [10, 20, 30]; } } $bars = Bar::all(); foreach ($bars as $bar) { echo $bar->getT()."\n"; }

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.0110.01118.55
8.3.50.0110.01121.16
8.3.40.0070.00718.79
8.3.30.0160.00318.75
8.3.20.0040.00420.33
8.3.10.0040.00421.82
8.3.00.0080.00022.42
8.2.180.0100.01018.41
8.2.170.0070.00722.96
8.2.160.0090.00620.39
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00617.75
8.2.110.0060.00322.26
8.2.100.0080.00417.72
8.2.90.0040.00419.05
8.2.80.0040.00417.97
8.2.70.0040.00417.49
8.2.60.0040.00417.93
8.2.50.0030.00618.07
8.2.40.0000.00821.06
8.2.30.0040.00419.83
8.2.20.0000.00717.61
8.2.10.0030.00517.94
8.2.00.0040.00418.17
8.1.280.0070.00725.92
8.1.270.0060.00320.38
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0050.00523.78
8.1.230.0060.00622.53
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0030.00617.25
8.1.180.0030.00518.10
8.1.170.0050.00318.66
8.1.160.0040.00421.95
8.1.150.0080.00018.81
8.1.140.0000.00817.38
8.1.130.0030.00317.75
8.1.120.0000.00817.49
8.1.110.0000.00817.45
8.1.100.0040.00417.42
8.1.90.0040.00417.38
8.1.80.0040.00417.46
8.1.70.0000.00717.34
8.1.60.0040.00417.62
8.1.50.0030.00617.36
8.1.40.0030.00517.44
8.1.30.0060.00317.56
8.1.20.0040.00417.59
8.1.10.0040.00417.63
8.1.00.0030.00517.41
8.0.300.0000.00718.77
8.0.290.0060.00316.75
8.0.280.0030.00618.51
8.0.270.0040.00417.27
8.0.260.0000.00617.26
8.0.250.0040.00416.95
8.0.240.0040.00416.95
8.0.230.0030.00316.93
8.0.220.0000.00716.92
8.0.210.0000.00716.89
8.0.200.0000.00716.85
8.0.190.0040.00416.85
8.0.180.0000.00716.89
8.0.170.0070.00016.77
8.0.160.0030.00316.91
8.0.150.0030.00316.83
8.0.140.0000.00816.88
8.0.130.0060.00013.29
8.0.120.0030.00516.82
8.0.110.0070.00016.97
8.0.100.0000.00716.96
8.0.90.0000.00716.96
8.0.80.0040.01116.82
8.0.70.0000.00816.96
8.0.60.0070.00016.77
8.0.50.0070.00016.97
8.0.30.0060.01416.89
8.0.20.0090.00917.40
8.0.10.0050.00217.04
8.0.00.0100.00816.91
7.4.330.0020.00215.08
7.4.320.0030.00316.46
7.4.300.0000.00716.53
7.4.290.0000.00716.61
7.4.280.0030.00616.50
7.4.270.0050.00216.42
7.4.260.0040.00416.54
7.4.250.0040.00416.55
7.4.240.0020.00516.56
7.4.230.0000.00816.49
7.4.220.0110.01116.56
7.4.210.0080.00616.66
7.4.200.0030.00316.63
7.4.160.0100.00616.36
7.4.150.0170.00017.40
7.4.140.0110.01117.86
7.4.130.0130.00616.54
7.4.120.0170.00316.51
7.4.110.0110.00716.55
7.4.100.0130.01016.68
7.4.90.0100.01016.56
7.4.80.0090.00919.39
7.4.70.0070.01016.47
7.4.60.0030.01316.61
7.4.50.0000.00616.35
7.4.40.0130.00516.28
7.4.30.0130.00316.57
7.4.00.0060.01015.04
7.3.330.0060.00013.17
7.3.320.0000.00513.27
7.3.310.0000.00616.29
7.3.300.0000.00716.29
7.3.290.0060.00916.32
7.3.280.0080.01016.30
7.3.270.0040.01417.40
7.3.260.0060.01616.32
7.3.250.0090.00916.50
7.3.240.0110.00616.61
7.3.230.0150.01216.51
7.3.210.0060.01116.34
7.3.200.0040.01419.39
7.3.190.0070.00916.64
7.3.180.0100.00716.25
7.3.170.0070.00916.59
7.3.160.0120.01016.38
7.3.120.0070.01014.79
7.3.110.0100.00714.85
7.3.100.0100.01015.09
7.3.90.0110.00714.75
7.3.80.0170.00015.11
7.3.70.0030.01414.64
7.3.60.0040.00814.84
7.3.50.0030.00914.94
7.3.40.0110.00414.81
7.3.30.0090.00314.88
7.3.20.0090.00616.65
7.3.10.0070.00716.49
7.3.00.0050.00916.55
7.2.330.0070.01116.62
7.2.320.0060.01616.82
7.2.310.0130.00916.75
7.2.300.0090.00916.48
7.2.290.0100.00716.75
7.2.250.0000.01514.96
7.2.240.0100.00615.26
7.2.230.0030.01614.95
7.2.220.0070.01115.02
7.2.210.0040.01514.98
7.2.200.0130.00715.11
7.2.190.0060.00915.19
7.2.180.0040.01115.05
7.2.170.0090.00615.21
7.2.130.0040.01116.79
7.2.120.0060.00916.95
7.2.110.0060.00916.71
7.2.100.0040.01116.78
7.2.90.0070.01016.69
7.2.80.0070.01016.65
7.2.70.0000.01416.70
7.2.60.0050.01216.78
7.2.50.0070.00316.96
7.2.40.0090.00616.80
7.2.30.0090.00617.03
7.2.20.0040.01116.84
7.2.10.0000.01516.86
7.2.00.0050.01118.12
7.1.330.0000.01615.86
7.1.320.0000.01715.68
7.1.310.0060.00915.69
7.1.300.0100.00715.77
7.1.290.0040.01215.77
7.1.280.0090.00615.70
7.1.270.0000.01215.70
7.1.260.0000.01315.76
7.1.250.0000.01015.77
7.1.200.0070.00315.87
7.1.100.0030.01017.67
7.1.70.0060.00617.14
7.1.60.0070.01720.03
7.1.50.0100.01016.64
7.1.00.0000.08022.33
7.0.200.0110.00014.97
7.0.60.0070.08019.91
7.0.50.0100.06717.91
7.0.40.0070.05320.41
7.0.30.0500.07320.33
7.0.20.0070.05020.23
7.0.10.0100.05320.30
7.0.00.0070.04320.03
5.6.210.0070.06020.74
5.6.200.0070.08318.21
5.6.190.0100.06720.77
5.6.180.0200.04020.61
5.6.170.0300.06020.56
5.6.160.0100.05320.39
5.6.150.0030.06718.22
5.6.140.0030.03718.15
5.6.130.0070.08018.27
5.6.120.0130.07721.04
5.6.110.0100.06721.06
5.6.100.0130.08021.14
5.6.90.0070.08020.99
5.6.80.0100.05020.55
5.6.70.3730.03320.54
5.5.350.0270.06020.44
5.5.340.0030.04017.96
5.5.330.0070.03720.40
5.5.320.0430.06020.35
5.5.310.0370.07020.24
5.5.300.0070.04317.98
5.5.290.0030.04017.98
5.5.280.0300.04020.91
5.5.270.0100.08020.66
5.5.260.0070.08020.91
5.5.250.0100.05320.51
5.5.240.0130.03320.17
5.4.450.0500.06019.49
5.4.440.0670.05719.59
5.4.430.0670.05319.63
5.4.420.0730.04319.45
5.4.410.0700.04719.48
5.4.400.0630.06019.16
5.4.390.0700.04719.06
5.4.380.0630.05319.27
5.4.370.0670.05018.98
5.4.360.0600.06019.23
5.4.350.0600.04719.26
5.4.340.0500.05718.84
5.4.320.0500.05719.13
5.4.310.0500.05319.38
5.4.300.0530.05318.98
5.4.290.0530.05019.28
5.4.280.0500.05719.12
5.4.270.0470.06019.06
5.4.260.0500.06018.98
5.4.250.0730.04719.27
5.4.240.0700.05319.25
5.4.230.0730.04319.16
5.4.220.0670.05319.25
5.4.210.0630.05718.91
5.4.200.0600.05316.73
5.4.190.0630.05019.17
5.4.180.0600.05019.25
5.4.170.0830.06719.02
5.4.160.0670.05019.10
5.4.150.0670.05318.88
5.4.140.0570.05716.45
5.4.130.0630.04716.46
5.4.120.0700.06016.40
5.4.110.0500.05716.40
5.4.100.0500.05316.61
5.4.90.0530.05016.58
5.4.80.0600.06316.59
5.4.70.0570.04716.58
5.4.60.0130.05716.33
5.4.50.0100.05716.53
5.4.40.0230.06316.43
5.4.30.0300.06316.33
5.4.20.0370.05716.41

preferences:
52.95 ms | 401 KiB | 5 Q