3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = 'monkey'; printf("[%-15s]\n", $s); printf("[%-10s]\n", $s); die; abstract class T { static public $instanses; final private function __construct(){ } public static function getInstance() { if (!(static::$instanses instanceof static)) { static::$instanses = new static; } return static::$instanses; } } class A extends T { static public $instanses; } class B extends A { static public $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.70.0150.00318.43
8.3.60.0090.00616.38
8.3.50.0110.00921.10
8.3.40.0040.01118.76
8.3.30.0040.01118.67
8.3.20.0000.00720.34
8.3.10.0040.00423.53
8.3.00.0050.00319.53
8.2.180.0150.00416.63
8.2.170.0040.01122.96
8.2.160.0070.00720.39
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0060.00317.75
8.2.110.0090.00322.25
8.2.100.0090.00317.90
8.2.90.0000.00819.17
8.2.80.0030.00617.97
8.2.70.0030.00517.63
8.2.60.0000.00717.80
8.2.50.0050.00318.07
8.2.40.0040.00421.07
8.2.30.0030.00620.66
8.2.20.0080.00017.75
8.2.10.0000.00718.03
8.2.00.0040.00417.96
8.1.280.0070.00725.92
8.1.270.0100.01023.97
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0040.00422.46
8.1.230.0040.01117.42
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0060.00317.13
8.1.180.0060.00318.10
8.1.170.0040.00418.29
8.1.160.0000.00721.95
8.1.150.0040.00418.86
8.1.140.0030.00517.39
8.1.130.0040.00417.69
8.1.120.0000.00817.33
8.1.110.0070.00317.42
8.1.100.0000.00717.47
8.1.90.0050.00317.39
8.1.80.0030.00517.38
8.1.70.0080.00017.44
8.1.60.0040.00417.52
8.1.50.0050.00317.54
8.1.40.0000.00717.41
8.1.30.0080.00017.72
8.1.20.0040.00417.55
8.1.10.0050.00317.54
8.1.00.0050.00517.45
8.0.300.0070.00318.77
8.0.290.0000.00816.75
8.0.280.0040.00418.29
8.0.270.0000.00717.27
8.0.260.0030.00317.13
8.0.250.0050.00216.80
8.0.240.0000.00716.88
8.0.230.0040.00417.02
8.0.220.0030.00616.86
8.0.210.0040.00416.77
8.0.200.0000.00616.96
8.0.190.0050.00316.96
8.0.180.0070.00016.82
8.0.170.0080.00016.94
8.0.160.0040.00416.94
8.0.150.0000.00816.89
8.0.140.0070.00016.69
8.0.130.0060.00313.28
8.0.120.0070.00016.76
8.0.110.0040.00416.96
8.0.100.0040.00416.84
8.0.90.0000.00716.83
8.0.80.0080.01216.92
8.0.70.0040.00416.87
8.0.60.0050.00216.96
8.0.50.0060.00316.91
8.0.30.0100.01017.21
8.0.20.0160.00517.40
8.0.10.0040.00417.07
8.0.00.0110.00916.76
7.4.330.0050.00015.08
7.4.320.0060.00016.44
7.4.300.0060.00016.30
7.4.290.0030.00316.46
7.4.280.0040.00416.44
7.4.270.0030.00316.36
7.4.260.0000.00916.52
7.4.250.0040.00416.55
7.4.240.0050.00316.55
7.4.230.0000.00716.64
7.4.220.0030.01916.47
7.4.210.0130.00616.52
7.4.200.0070.00016.55
7.4.160.0100.00516.42
7.4.150.0070.01117.40
7.4.140.0120.00717.86
7.4.130.0120.00616.55
7.4.120.0130.00516.44
7.4.110.0070.01016.66
7.4.100.0120.00616.51
7.4.90.0150.00616.39
7.4.80.0040.01419.39
7.4.70.0080.00916.27
7.4.60.0060.01316.46
7.4.50.0020.00216.26
7.4.40.0140.00316.51
7.4.30.0130.00916.18
7.4.00.0000.01614.70
7.3.330.0050.00013.10
7.3.320.0020.00213.20
7.3.310.0040.00416.35
7.3.300.0070.00016.11
7.3.290.0060.00916.23
7.3.280.0090.00916.27
7.3.270.0060.01217.40
7.3.260.0080.00816.09
7.3.240.0060.01516.21
7.3.230.0060.01316.39
7.3.210.0040.01616.41
7.3.200.0110.00816.28
7.3.190.0080.00816.36
7.3.180.0070.00716.40
7.3.170.0000.02016.37
7.3.160.0120.00316.18
7.3.10.0100.00716.47
7.3.00.0060.00916.58
7.2.330.0150.00316.67
7.2.320.0090.00916.63
7.2.310.0140.00416.33
7.2.300.0090.00916.39
7.2.290.0060.01216.26
7.2.130.0100.00616.71
7.2.120.0040.01116.49
7.2.110.0030.01016.78
7.2.100.0070.00716.69
7.2.90.0040.01116.88
7.2.80.0030.01116.47
7.2.70.0040.00716.84
7.2.60.0060.00916.95
7.2.50.0060.00616.74
7.2.40.0030.01016.84
7.2.30.0000.01216.68
7.2.20.0040.01216.86
7.2.10.0030.01016.50
7.2.00.0120.00317.97
7.1.250.0070.00715.91
7.1.100.0110.00017.85
7.1.70.0000.00817.06
7.1.60.0060.01819.50
7.1.50.0130.00716.85
7.1.00.0030.07722.45
7.0.200.0030.00616.73
7.0.60.0070.06320.04
7.0.50.0070.04717.88
7.0.40.0100.06720.13
7.0.30.0230.05720.06
7.0.20.0330.07020.12
7.0.10.0100.08720.22
7.0.00.0000.04720.05
5.6.280.0030.03320.90
5.6.210.0070.07020.47
5.6.200.0030.06318.14
5.6.190.0100.05020.48
5.6.180.0430.06720.41
5.6.170.0270.06320.61
5.6.160.0170.07320.54
5.6.150.0030.05318.14
5.6.140.0130.05318.20
5.6.130.0100.07018.18
5.6.120.0100.08321.02
5.6.110.0000.04721.02
5.6.100.0070.07021.14
5.6.90.0170.06720.94
5.6.80.0070.08020.39
5.5.350.0230.07320.34
5.5.340.0130.06017.93
5.5.330.0230.06720.35
5.5.320.0400.05320.38
5.5.310.0370.07020.30
5.5.300.0100.07717.97
5.5.290.0000.07717.98
5.5.280.0100.08020.86
5.5.270.0130.06720.80
5.5.260.0030.04320.65
5.5.250.0170.04320.55
5.5.240.0070.06020.28
5.4.450.0230.05719.16
5.4.440.0370.04719.48
5.4.430.0300.04319.33
5.4.420.0270.05719.60
5.4.410.0200.06719.45
5.4.400.0170.06019.01
5.4.390.0370.04318.84
5.4.380.0270.04718.99
5.4.370.0200.06319.13
5.4.360.0330.04318.88
5.4.350.0330.05719.01
5.4.340.0230.07019.30
5.4.320.0130.06319.26
5.4.310.0230.05018.84
5.4.300.0230.05319.14
5.4.290.0230.05319.25
5.4.280.0400.04319.02
5.4.270.0330.05718.89
5.4.260.0170.05718.84
5.4.250.0230.05019.22
5.4.240.0400.05318.85
5.4.230.0300.06319.22
5.4.220.0330.04719.22
5.4.210.0200.06019.15
5.4.200.0270.05019.25
5.4.190.0300.04019.25
5.4.180.0200.05318.97
5.4.170.0230.05018.83
5.4.160.0200.05019.20
5.4.150.0230.05018.82
5.4.140.0170.05316.61
5.4.130.0070.06016.78
5.4.120.0270.04016.78
5.4.110.0100.06016.29
5.4.100.0170.05016.67
5.4.90.0230.04316.71
5.4.80.0170.05316.57
5.4.70.0100.03016.60
5.4.60.0230.04316.34
5.4.50.0200.07016.16
5.4.40.0230.06316.55
5.4.30.0070.06316.25
5.4.20.0030.03716.34
5.4.10.0230.04716.53

preferences:
69.89 ms | 401 KiB | 5 Q