3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class T { static protected $instanses; final private function __construct(){ } public static function getInstance() { if (!isset(static::$instanses)) { static::$instanses = new static; } return static::$instanses; } } class A extends T { static protected $instanses; } class B extends A { static protected $instanses; } $t = A::getInstance(); var_dump($t); $t1 = B::getInstance(); var_dump($t1); new B(); ?>

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.0090.00618.56
8.3.50.0100.01316.11
8.3.40.0120.00318.87
8.3.30.0110.00418.79
8.3.20.0070.00020.13
8.3.10.0040.00423.49
8.3.00.0050.00322.45
8.2.180.0110.00716.63
8.2.170.0110.00422.96
8.2.160.0070.00720.36
8.2.150.0090.00024.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0060.00317.63
8.2.110.0060.00322.14
8.2.100.0120.00017.93
8.2.90.0060.00319.05
8.2.80.0000.00917.97
8.2.70.0030.00517.63
8.2.60.0000.00817.90
8.2.50.0000.00918.07
8.2.40.0030.00521.11
8.2.30.0040.00418.07
8.2.20.0040.00417.75
8.2.10.0000.00718.05
8.2.00.0000.00718.13
8.1.270.0090.00020.26
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00422.52
8.1.230.0040.00721.04
8.1.220.0030.00517.76
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.36
8.1.180.0000.00818.10
8.1.170.0000.00818.52
8.1.160.0020.00521.95
8.1.150.0040.00418.89
8.1.140.0030.00517.43
8.1.130.0000.00717.63
8.1.120.0030.00517.54
8.1.110.0040.00417.38
8.1.100.0030.00517.39
8.1.90.0040.00417.40
8.1.80.0060.00317.52
8.1.70.0000.00717.48
8.1.60.0070.00017.66
8.1.50.0000.00817.52
8.1.40.0020.00517.51
8.1.30.0040.00417.66
8.1.20.0040.00417.64
8.1.10.0070.00017.62
8.1.00.0050.00317.38
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.38
8.0.270.0040.00417.27
8.0.260.0030.00317.21
8.0.250.0030.00517.02
8.0.240.0040.00417.06
8.0.230.0030.00316.84
8.0.220.0030.00317.02
8.0.210.0030.00316.81
8.0.200.0030.00317.04
8.0.190.0070.00017.00
8.0.180.0040.00417.01
8.0.170.0050.00217.07
8.0.160.0070.00016.98
8.0.150.0070.00016.80
8.0.140.0120.00016.95
8.0.130.0030.00313.41
8.0.120.0080.00016.92
8.0.110.0040.00416.91
8.0.100.0040.00416.77
8.0.90.0080.00017.00
8.0.80.0100.01016.97
8.0.70.0040.00416.94
8.0.60.0000.00716.95
8.0.50.0040.00416.93
8.0.30.0100.01017.04
8.0.20.0090.00917.40
8.0.10.0040.00417.09
8.0.00.0110.00716.81
7.4.330.0030.00315.15
7.4.320.0000.00616.63
7.4.300.0060.00016.51
7.4.290.0000.00816.66
7.4.280.0040.00416.40
7.4.270.0070.00016.54
7.4.260.0070.00016.48
7.4.250.0000.00916.60
7.4.240.0050.00316.57
7.4.230.0040.00416.73
7.4.220.0110.01416.56
7.4.210.0120.00416.63
7.4.200.0000.00716.41
7.4.160.0000.01516.32
7.4.150.0070.01117.40
7.4.140.0090.01117.86
7.4.130.0170.00516.55
7.4.120.0080.01216.52
7.4.110.0090.00916.51
7.4.100.0040.01516.57
7.4.90.0160.01016.45
7.4.80.0140.00519.39
7.4.70.0040.01116.60
7.4.60.0040.01116.37
7.4.50.0080.00016.75
7.4.40.0130.00316.66
7.4.30.0120.00616.53
7.4.00.0030.01315.13
7.3.330.0030.00313.38
7.3.320.0050.00013.34
7.3.310.0080.00016.34
7.3.300.0000.00716.38
7.3.290.0080.01116.39
7.3.280.0080.00816.36
7.3.270.0120.00617.40
7.3.260.0120.01216.67
7.3.250.0090.00916.52
7.3.240.0090.00916.33
7.3.230.0110.00616.39
7.3.210.0110.01116.47
7.3.200.0130.00619.39
7.3.190.0070.01016.41
7.3.180.0180.00316.54
7.3.170.0150.00616.58
7.3.160.0050.01116.40
7.3.120.0070.01114.84
7.3.110.0060.01214.58
7.3.100.0070.01014.81
7.3.90.0090.00615.07
7.3.80.0050.00515.08
7.3.70.0000.00914.82
7.3.60.0060.00614.55
7.3.50.0070.01114.65
7.3.40.0060.00314.98
7.3.30.0030.01014.68
7.3.20.0060.00616.93
7.3.10.0030.01016.36
7.3.00.0030.00916.76
7.2.330.0100.01316.28
7.2.320.0080.01516.84
7.2.310.0030.01416.67
7.2.300.0030.01316.79
7.2.290.0090.00816.43
7.2.250.0000.01815.16
7.2.240.0090.00914.85
7.2.230.0150.00014.76
7.2.220.0100.00714.96
7.2.210.0030.01014.93
7.2.200.0000.01814.89
7.2.190.0060.00914.74
7.2.180.0000.01015.15
7.2.170.0000.01114.80
7.2.60.0070.00416.66
7.2.00.0030.00619.41
7.1.330.0000.01115.71
7.1.320.0000.00915.47
7.1.310.0040.01115.86
7.1.300.0070.00615.75
7.1.290.0030.00915.77
7.1.280.0070.00415.77
7.1.270.0090.00315.57
7.1.260.0040.00715.79
7.1.200.0100.00015.55
7.1.100.0070.01017.78
7.1.70.0000.01216.94
7.1.60.0110.01520.03
7.1.50.0120.01216.96
7.1.00.0070.07022.42
7.0.200.0300.01014.64
7.0.60.0070.04019.94
7.0.50.0030.04317.85
7.0.40.0170.05320.30
7.0.30.0400.04320.20
7.0.20.0170.04320.22
7.0.10.0000.06020.15
7.0.00.0100.08720.19
5.6.280.0000.03320.96
5.6.210.0100.07320.71
5.6.200.0170.07718.20
5.6.190.0200.06720.77
5.6.180.0270.04020.63
5.6.170.0300.06720.47
5.6.160.0070.08320.41
5.6.150.0070.06318.28
5.6.140.0000.04318.24
5.6.130.0030.09018.14
5.6.120.0100.06321.00
5.6.110.0100.07321.09
5.6.100.0070.07321.09
5.6.90.0030.04320.88
5.6.80.0200.05020.41
5.6.70.4170.03720.50
5.5.350.0100.06320.36
5.5.340.0100.08017.98
5.5.330.0100.04020.47
5.5.320.0230.04320.38
5.5.310.0230.04720.34
5.5.300.0070.07318.05
5.5.290.0100.07318.14
5.5.280.0070.08720.87
5.5.270.0200.07020.98
5.5.260.0200.07020.87
5.5.250.0070.08020.46
5.5.240.0030.08320.38
5.4.450.0230.04319.45
5.4.440.0230.03719.42
5.4.430.0230.04719.52
5.4.420.0170.04019.54
5.4.410.0200.03719.44
5.4.400.0200.04718.84
5.4.390.0170.03319.22
5.4.380.0100.04019.09
5.4.370.0130.06318.87
5.4.360.0130.05019.14
5.4.350.0130.04019.13
5.4.340.0200.03719.09
5.4.320.0170.06018.98
5.4.310.0300.03718.97
5.4.300.0270.07018.84
5.4.290.0200.04019.32
5.4.280.0300.06719.19
5.4.270.0300.06018.95
5.4.260.0130.04318.95
5.4.250.0230.07019.19
5.4.240.0230.03319.21
5.4.230.0230.04718.86
5.4.220.0330.03719.05
5.4.210.0200.06319.05
5.4.200.0270.04019.25
5.4.190.0430.03319.17
5.4.180.0470.07019.30
5.4.170.0270.03718.98
5.4.160.0370.05718.82
5.4.150.0270.06719.11
5.4.140.0230.03716.37
5.4.130.0370.03316.43
5.4.120.0200.06316.40
5.4.110.0230.03716.61
5.4.100.0270.06316.50
5.4.90.0200.07016.27
5.4.80.0170.04316.62
5.4.70.0200.07316.57
5.4.60.0230.04016.48
5.4.50.0030.07316.53
5.4.40.0030.06716.48
5.4.30.0000.05316.22
5.4.20.0000.06316.42

preferences:
60.02 ms | 400 KiB | 5 Q