3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Foo { private $x; private function __construct() { $this->x = new \DateTimeImmutable(); } /** * @return static */ public static function create() { return new static(); } } class Bar extends Foo { private $a; public function __construct($a) { $this->a = $a; } } $bar = new Bar(1);

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.5.20.0110.00619.37
8.5.10.0090.01019.05
8.5.00.0130.01220.07
8.4.170.0090.01123.92
8.4.160.0120.01023.89
8.4.150.0020.00014.05
8.4.140.0150.00817.43
8.4.130.0030.00618.88
8.4.120.0130.00824.05
8.4.110.0130.00518.71
8.4.100.0080.00918.83
8.4.90.0130.00720.52
8.4.80.0030.00518.64
8.4.70.0050.00417.94
8.4.60.0120.00518.86
8.4.50.0100.00418.42
8.4.40.0000.00817.40
8.4.30.0110.00420.53
8.4.20.0160.00718.08
8.4.10.0070.00719.34
8.3.300.0100.01020.74
8.3.290.0100.01020.70
8.3.280.0110.01118.21
8.3.270.0130.00716.62
8.3.260.0090.00916.53
8.3.250.0110.00718.89
8.3.240.0100.00917.23
8.3.230.0120.00716.44
8.3.220.0100.00618.90
8.3.210.0100.00816.72
8.3.200.0070.00416.73
8.3.190.0050.00317.26
8.3.180.0030.00517.13
8.3.170.0150.00418.85
8.3.160.0150.00316.59
8.3.150.0120.00617.29
8.3.140.0110.00716.61
8.3.130.0080.00016.62
8.3.120.0030.00620.80
8.3.110.0060.00316.76
8.3.100.0120.00324.06
8.3.90.0040.00426.77
8.3.80.0030.00616.75
8.3.70.0100.00716.61
8.3.60.0090.00918.55
8.3.50.0120.00723.72
8.3.40.0040.01118.46
8.3.30.0070.00718.66
8.3.20.0040.00420.86
8.3.10.0000.00721.75
8.3.00.0050.00322.02
8.2.300.0080.01118.78
8.2.290.0090.01020.51
8.2.280.0120.00718.23
8.2.270.0080.01117.30
8.2.260.0040.00418.68
8.2.250.0040.00417.10
8.2.240.0140.00717.30
8.2.230.0000.00920.94
8.2.220.0050.00337.54
8.2.210.0070.00726.77
8.2.200.0000.01216.63
8.2.190.0110.01116.63
8.2.180.0140.00418.11
8.2.170.0120.00322.96
8.2.160.0140.00020.47
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0000.00826.16
8.2.120.0080.00026.16
8.2.110.0090.00021.12
8.2.100.0070.00419.32
8.2.90.0080.00017.63
8.2.80.0000.00918.63
8.2.70.0080.00017.50
8.2.60.0050.00317.25
8.2.50.0040.00418.05
8.2.40.0000.00918.03
8.2.30.0040.00419.48
8.2.20.0040.00418.04
8.2.10.0040.00419.10
8.2.00.0040.00419.12
8.1.340.0050.00519.89
8.1.330.0110.00821.83
8.1.320.0090.01116.00
8.1.310.0040.00418.36
8.1.300.0000.01016.26
8.1.290.0060.00318.88
8.1.280.0040.01125.92
8.1.270.0050.00222.19
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00922.18
8.1.230.0080.00320.88
8.1.220.0000.00818.46
8.1.210.0040.00418.77
8.1.200.0000.00917.53
8.1.190.0050.00317.22
8.1.180.0080.00018.99
8.1.170.0000.00817.62
8.1.160.0000.00718.83
8.1.150.0000.00818.77
8.1.140.0080.00020.74
8.1.130.0040.00420.17
8.1.120.0000.00717.29
8.1.110.0080.00017.39
8.1.100.0000.00817.29
8.1.90.0050.00317.43
8.1.80.0040.00417.45
8.1.70.0030.00317.36
8.1.60.0040.00417.59
8.1.50.0050.00317.50
8.1.40.0000.00817.50
8.1.30.0040.00417.64
8.1.20.0070.00417.68
8.1.10.0020.00517.44
8.1.00.0070.00417.38
8.0.300.0030.00618.77
8.0.290.0000.00916.63
8.0.280.0000.00718.45
8.0.270.0030.00318.01
8.0.260.0060.00020.02
8.0.250.0030.00316.89
8.0.240.0040.00416.90
8.0.230.0040.00416.77
8.0.220.0030.00316.80
8.0.210.0020.00516.79
8.0.200.0030.00316.80
8.0.190.0040.00416.78
8.0.180.0050.00516.78
8.0.170.0040.00416.88
8.0.160.0000.00716.90
8.0.150.0070.00016.83
8.0.140.0000.00716.84
8.0.130.0030.00313.30
8.0.120.0030.00516.70
8.0.110.0060.00316.71
8.0.100.0000.00716.87
8.0.90.0060.00316.65
8.0.80.0050.01016.81
8.0.70.0030.00516.89
8.0.60.0000.00716.85
8.0.50.0000.00816.71
8.0.30.0160.00916.93
8.0.20.0130.01017.00
8.0.10.0000.00716.98
8.0.00.0090.00916.40
7.4.330.0020.00216.89
7.4.320.0060.00016.50
7.4.300.0050.00516.45
7.4.290.0000.00716.51
7.4.280.0040.00416.50
7.4.270.0070.00016.62
7.4.260.0000.00513.32
7.4.250.0030.00616.59
7.4.240.0000.00716.57
7.4.230.0030.00316.41
7.4.220.0020.00516.50
7.4.210.0100.00716.48
7.4.200.0050.00216.40
7.4.140.0170.00717.86
7.4.130.0080.01316.42
7.4.120.0120.00616.58
7.4.110.0100.01016.54
7.4.100.0040.01616.50
7.4.90.0080.00816.27
7.4.80.0070.01319.39
7.4.70.0100.00716.48
7.4.60.0090.00616.39
7.4.50.0120.00316.28
7.4.40.0030.01416.58
7.4.20.0120.00416.41
7.4.10.0090.00616.26
7.4.00.0100.00716.23
7.3.330.0040.00416.03
7.3.320.0000.00513.05
7.3.310.0050.00316.19
7.3.300.0070.00016.28
7.3.290.0090.00616.23
7.3.260.0100.00816.48
7.3.240.0130.00816.25
7.3.230.0120.00616.50
7.3.210.0100.00716.50
7.3.200.0070.01016.30
7.3.190.0060.01116.31
7.3.180.0130.01016.22
7.3.170.0060.01316.22
7.3.160.0060.01016.33
7.3.130.0090.00616.40
7.3.120.0040.01116.42
7.3.110.0090.00616.34
7.3.100.0030.01316.25
7.3.90.0060.00916.15
7.3.80.0180.00316.01
7.3.70.0130.00316.32
7.3.60.0030.01616.34
7.3.50.0090.00616.16
7.3.40.0100.01016.31
7.3.30.0100.01016.28
7.3.20.0040.01816.24
7.3.10.0090.01216.30
7.3.00.0130.00816.18
7.2.330.0150.00316.37
7.2.320.0060.01016.53
7.2.310.0100.01116.30
7.2.300.0070.01016.39
7.2.290.0070.01016.68
7.2.260.0060.00916.31
7.2.250.0030.01316.30
7.2.240.0070.01016.66
7.2.230.0060.00916.49
7.2.220.0070.01016.67
7.2.210.0070.01116.43
7.2.200.0160.00316.54
7.2.190.0060.01316.21
7.2.180.0140.00716.57
7.2.170.0000.02116.44
7.2.160.0090.01216.53
7.2.150.0070.01716.49
7.2.140.0150.00716.56
7.2.130.0090.01316.56
7.2.120.0110.01116.37
7.2.110.0070.01516.61
7.2.100.0150.00716.58
7.2.90.0080.01716.68
7.2.80.0110.00716.61
7.2.70.0080.00816.55
7.2.60.0040.01216.40
7.2.50.0110.00516.71
7.2.40.0060.01216.23
7.2.30.0030.01316.65
7.2.20.0090.00916.45
7.2.10.0120.00916.46
7.2.00.0100.00716.56

preferences:
33.93 ms | 403 KiB | 5 Q