3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { protected static $build_keeper = []; public static function build(){ if(!isset(self::$build_keeper[static::class])){ self::$build_keeper[static::class] = new static(); } return self::$build_keeper[static::class]; } protected function __construct() { } } class b extends a { public function doSomeThing() { echo 2; } } class c1 extends a { public function doSomeThingElse() { echo 3; } } b::build()->doSomeThing(); c1::build()->doSomeThingElse();

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.30.0100.00719.54
8.5.20.0080.01019.32
8.5.10.0040.00516.72
8.5.00.0160.00919.86
8.4.170.0110.01020.75
8.4.160.0150.01023.07
8.4.150.0030.00014.05
8.4.140.0160.00717.77
8.4.130.0130.00717.62
8.4.120.0150.00520.73
8.4.110.0050.00418.83
8.4.100.0080.00917.64
8.4.90.0140.00719.30
8.4.80.0110.01117.91
8.4.70.0110.00717.92
8.4.60.0120.00717.64
8.4.50.0050.00420.29
8.4.40.0120.00317.73
8.4.30.0070.01317.94
8.4.20.0100.00018.61
8.4.10.0090.00019.57
8.3.300.0110.00820.68
8.3.290.0100.01120.84
8.3.280.0160.00718.22
8.3.270.0110.00916.77
8.3.260.0120.00716.57
8.3.250.0140.00416.91
8.3.240.0090.01016.50
8.3.230.0120.00716.71
8.3.220.0120.00617.32
8.3.210.0080.00616.82
8.3.200.0100.00916.69
8.3.190.0130.00616.59
8.3.180.0120.00718.98
8.3.170.0120.00619.23
8.3.160.0040.00420.13
8.3.150.0130.00616.77
8.3.140.0060.00317.02
8.3.130.0030.00618.55
8.3.120.0000.00918.99
8.3.110.0110.00020.94
8.3.100.0030.00624.06
8.3.90.0090.00626.77
8.3.80.0030.00718.40
8.3.70.0110.00718.20
8.3.60.0110.00418.18
8.3.50.0120.00617.93
8.3.40.0040.01118.97
8.3.30.0130.00618.86
8.3.20.0000.00721.90
8.3.10.0040.00420.57
8.3.00.0050.00317.75
8.2.300.0210.00718.11
8.2.290.0120.00918.61
8.2.280.0120.00716.81
8.2.270.0070.00417.11
8.2.260.0060.00316.48
8.2.250.0120.00318.52
8.2.240.0130.00617.26
8.2.230.0030.00622.58
8.2.220.0030.00637.54
8.2.210.0000.00726.77
8.2.200.0090.00018.05
8.2.190.0120.00316.82
8.2.180.0220.00316.47
8.2.170.0110.00722.96
8.2.160.0000.01422.26
8.2.150.0030.00524.18
8.2.140.0090.00024.66
8.2.130.0040.00418.03
8.2.120.0050.00226.35
8.2.110.0050.00521.18
8.2.100.0080.00317.85
8.2.90.0050.00318.03
8.2.80.0040.00418.22
8.2.70.0030.00517.63
8.2.60.0050.00517.63
8.2.50.0000.00817.49
8.2.40.0040.00418.05
8.2.30.0050.00319.30
8.2.20.0000.00717.99
8.2.10.0000.00719.36
8.2.00.0080.00017.99
8.1.340.0100.01017.50
8.1.330.0090.01016.29
8.1.320.0130.00516.36
8.1.310.0070.01018.51
8.1.300.0120.00417.90
8.1.290.0060.00330.84
8.1.280.0090.00525.92
8.1.270.0070.00020.20
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00722.02
8.1.230.0110.00020.97
8.1.220.0090.00017.78
8.1.210.0040.00718.77
8.1.200.0030.00617.35
8.1.190.0030.00517.23
8.1.180.0000.00818.10
8.1.170.0000.00917.62
8.1.160.0040.00418.80
8.1.150.0030.00518.89
8.1.140.0000.00818.82
8.1.130.0000.00717.29
8.1.120.0060.00317.43
8.1.110.0000.00717.45
8.1.100.0040.00417.39
8.1.90.0050.00317.39
8.1.80.0000.01017.44
8.1.70.0000.00717.37
8.1.60.0000.00817.44
8.1.50.0050.00317.34
8.1.40.0070.00317.47
8.1.30.0060.00317.54
8.1.20.0030.00517.60
8.1.10.0080.00017.52
8.1.00.0000.00717.38
8.0.300.0040.00419.95
8.0.290.0040.00416.75
8.0.280.0070.00018.35
8.0.270.0040.00417.30
8.0.260.0040.00416.85
8.0.250.0000.00716.98
8.0.240.0030.00316.85
8.0.230.0040.00416.84
8.0.220.0030.00316.87
8.0.210.0040.00416.90
8.0.200.0000.00616.85
8.0.190.0040.00817.00
8.0.180.0040.00416.75
8.0.170.0040.00416.79
8.0.160.0000.00716.88
8.0.150.0070.00016.75
8.0.140.0000.00716.67
8.0.130.0030.00313.26
8.0.120.0040.00416.74
8.0.110.0000.00716.85
8.0.100.0040.00416.82
8.0.90.0000.00816.84
8.0.80.0080.01116.76
8.0.70.0030.00516.71
8.0.60.0000.00716.68
8.0.50.0040.00416.82
8.0.30.0130.00517.25
8.0.20.0210.00617.14
8.0.10.0040.00416.90
8.0.00.0080.01016.67
7.4.330.0000.00415.55
7.4.320.0030.00316.48
7.4.300.0000.00716.41
7.4.290.0030.00316.61
7.4.280.0000.00816.59
7.4.270.0000.00716.51
7.4.260.0030.00516.50
7.4.250.0030.00316.54
7.4.240.0000.00716.60
7.4.230.0000.00716.58
7.4.220.0090.00016.58
7.4.210.0070.01116.58
7.4.200.0030.00316.62
7.4.160.0090.00616.49
7.4.140.0040.01317.86
7.4.130.0140.00316.62
7.4.120.0130.00316.57
7.4.110.0130.00916.40
7.4.100.0090.00916.43
7.4.90.0100.00716.36
7.4.80.0070.01719.39
7.4.70.0120.00416.55
7.4.60.0070.01016.49
7.4.50.0060.00916.30
7.4.40.0000.01616.37
7.4.10.0070.01215.81
7.4.00.0100.00715.33
7.3.330.0000.00513.19
7.3.320.0050.00013.33
7.3.310.0000.00816.40
7.3.300.0030.00316.35
7.3.290.0030.00316.33
7.3.280.0060.01116.38
7.3.260.0140.00816.38
7.3.240.0110.00816.42
7.3.230.0110.01116.47
7.3.210.0090.00916.29
7.3.200.0130.00316.56
7.3.190.0090.00916.38
7.3.180.0130.01016.36
7.3.170.0030.01416.42
7.3.160.0030.01716.63
7.3.130.0050.01415.54
7.3.120.0070.01115.40
7.3.110.0060.01015.44
7.3.100.0070.00815.39
7.3.90.0110.00315.32
7.3.80.0040.00715.50
7.3.70.0050.00815.32
7.3.60.0080.00315.25
7.3.50.0060.00515.35
7.3.40.0030.01115.32
7.3.30.0060.00715.19
7.3.20.0040.01017.12
7.3.10.0170.00716.62
7.3.00.0140.00716.57
7.2.330.0120.00916.67
7.2.320.0180.00016.75
7.2.310.0030.01416.80
7.2.300.0130.01016.66
7.2.290.0100.00716.69
7.2.260.0110.01115.73
7.2.250.0130.00315.66
7.2.240.0060.01015.59
7.2.230.0060.00915.58
7.2.220.0070.00615.65
7.2.210.0050.00715.45
7.2.200.0040.00915.51
7.2.190.0100.00615.30
7.2.180.0050.00715.45
7.2.170.0050.00615.38
7.2.160.0060.00515.85
7.2.150.0070.00517.76
7.2.140.0060.00817.66
7.2.130.0160.01116.70
7.2.120.0460.00716.75
7.2.110.0170.00716.75
7.2.100.0240.01016.74
7.2.90.0240.01016.77
7.2.80.0220.00716.68
7.2.70.0220.00816.81
7.2.60.0260.00816.73
7.2.50.0200.01616.65
7.2.40.0210.01116.70
7.2.30.0200.00916.86
7.2.20.0200.00816.62
7.2.10.0200.01016.80
7.2.00.0170.01416.65
7.1.330.0030.01116.26
7.1.320.0070.00716.32
7.1.310.0040.00716.43
7.1.300.0030.00816.35
7.1.290.0080.00516.27
7.1.280.0030.00716.26
7.1.270.0070.00416.31
7.1.260.0070.00516.32
7.1.250.0160.00815.72
7.1.240.0070.00516.55
7.1.230.0070.00516.56
7.1.220.0090.00516.60
7.1.210.0070.00816.56
7.1.200.0030.01016.57
7.1.190.0000.01316.54
7.1.180.0020.01316.43
7.1.170.0050.00716.59
7.1.160.0040.01016.66
7.1.150.0090.00616.46
7.1.140.0070.00716.52
7.1.130.0060.01016.48
7.1.120.0080.00316.55
7.1.110.0040.00816.49
7.1.100.0050.00916.66
7.1.90.0030.01016.60
7.1.80.0030.00816.40
7.1.70.0060.00816.61
7.1.60.0050.00816.43
7.1.50.0060.00816.67
7.1.40.0060.00716.61
7.1.30.0050.00916.50
7.1.20.0070.00716.60
7.1.10.0060.00616.49
7.1.00.0030.01116.55

preferences:
183.87 ms | 403 KiB | 5 Q