3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { function test($p) { $p[] = 'test'; } } $tp = ['asd','sad']; $tc = new test(); $tc->test($tp); var_dump($tp); 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.60.0110.00716.63
8.3.50.0080.01121.99
8.3.40.0000.01518.70
8.3.30.0000.01418.75
8.3.20.0040.00420.35
8.3.10.0040.00423.53
8.3.00.0000.00817.63
8.2.180.0140.00718.41
8.2.170.0120.00822.96
8.2.160.0080.00620.38
8.2.150.0110.00724.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0080.00017.50
8.2.110.0090.00322.27
8.2.100.0080.00417.93
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0000.00917.50
8.2.60.0030.00617.93
8.2.50.0000.00818.07
8.2.40.0040.00419.36
8.2.30.0000.00820.70
8.2.20.0000.00817.77
8.2.10.0000.00817.95
8.2.00.0040.00417.97
8.1.280.0070.00725.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0030.00622.61
8.1.230.0110.00017.55
8.1.220.0070.00317.74
8.1.210.0060.00318.77
8.1.200.0060.00317.23
8.1.190.0080.00017.13
8.1.180.0030.00518.10
8.1.170.0030.00620.63
8.1.160.0040.00421.96
8.1.150.0040.00418.84
8.1.140.0000.00919.47
8.1.130.0040.00417.66
8.1.120.0020.00517.43
8.1.110.0030.00517.26
8.1.100.0000.00717.32
8.1.90.0070.00017.31
8.1.80.0040.00317.29
8.1.70.0030.00317.38
8.1.60.0000.00817.61
8.1.50.0040.00417.52
8.1.40.0030.00517.58
8.1.30.0040.00417.69
8.1.20.0070.00017.52
8.1.10.0040.00417.66
8.1.00.0030.00517.41
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.30
8.0.270.0040.00417.11
8.0.260.0000.00717.11
8.0.250.0000.00716.99
8.0.240.0000.00816.97
8.0.230.0100.00016.98
8.0.220.0040.00416.90
8.0.210.0000.00716.86
8.0.200.0070.00016.98
8.0.190.0030.00616.84
8.0.180.0030.00616.83
8.0.170.0000.00816.96
8.0.160.0050.00216.97
8.0.150.0030.00316.88
8.0.140.0000.00716.91
8.0.130.0000.00613.32
8.0.120.0050.00216.89
8.0.110.0040.00416.80
8.0.100.0000.00716.96
8.0.90.0040.00416.88
8.0.80.0060.00916.92
8.0.70.0050.00316.97
8.0.60.0080.00016.79
8.0.50.0070.00016.94
8.0.30.0070.01017.17
8.0.20.0090.01117.40
8.0.10.0050.00317.05
8.0.00.0140.00816.70
7.4.330.0050.00015.08
7.4.320.0000.00616.53
7.4.300.0060.00016.60
7.4.290.0000.00716.52
7.4.280.0000.00716.52
7.4.270.0000.00716.45
7.4.260.0040.00416.40
7.4.250.0040.00416.49
7.4.240.0040.00316.51
7.4.230.0030.00316.41
7.4.220.0150.01316.41
7.4.210.0100.01016.65
7.4.200.0000.00716.71
7.4.160.0130.00716.57
7.4.150.0060.01217.40
7.4.140.0070.01217.86
7.4.130.0110.00716.55
7.4.120.0090.00816.48
7.4.110.0030.01416.53
7.4.100.0160.00316.58
7.4.90.0060.01016.49
7.4.80.0070.01519.39
7.4.70.0080.01216.47
7.4.60.0070.01016.45
7.4.50.0040.00416.45
7.4.40.0160.00616.29
7.4.30.0120.00516.53
7.4.00.0090.00915.04
7.3.330.0000.00613.41
7.3.320.0000.00513.32
7.3.310.0030.00316.24
7.3.300.0000.00716.38
7.3.290.0110.00516.36
7.3.280.0080.00916.37
7.3.270.0170.00317.40
7.3.260.0130.00916.52
7.3.250.0080.01016.46
7.3.240.0080.00816.48
7.3.230.0070.01416.58
7.3.210.0090.01216.28
7.3.200.0140.00616.33
7.3.190.0130.00316.31
7.3.180.0120.00616.47
7.3.170.0060.01616.60
7.3.160.0190.00316.34
7.2.330.0130.00416.27
7.2.320.0080.00316.56
7.2.310.0070.01016.66
7.2.300.0120.00616.59
7.2.290.0160.00916.52
7.2.60.0070.00716.54
7.2.00.0040.00419.48
7.1.200.0000.01315.57
7.1.100.0070.00718.14
7.1.70.0000.00717.04
7.1.60.0120.00919.43
7.1.50.0000.01216.52
7.1.00.0030.07322.57
7.0.200.0150.00614.84
7.0.60.0070.08320.04
7.0.50.0030.08317.89
7.0.40.0000.04720.14
7.0.30.0130.04320.09
7.0.20.0400.07720.09
7.0.10.0070.05720.33
7.0.00.0030.06720.16
5.6.280.0030.05721.00
5.6.210.0030.05320.55
5.6.200.0070.07018.25
5.6.190.0070.08320.55
5.6.180.0200.08020.65
5.6.170.0300.07720.57
5.6.160.0130.07720.48
5.6.150.0130.07318.18
5.6.140.0100.06718.12
5.6.130.0030.08718.28
5.6.120.0100.08021.11
5.6.110.0130.05720.99
5.6.100.0100.08020.98
5.6.90.0130.06021.04
5.6.80.0030.07020.53
5.5.350.0130.04020.45
5.5.340.0000.04318.04
5.5.330.0030.09320.53
5.5.320.0330.07020.25
5.5.310.0230.08020.39
5.5.300.0070.03717.96
5.5.290.0030.05718.04
5.5.280.0030.08320.89
5.5.270.0070.04720.82
5.5.260.0070.04320.77
5.5.250.0130.07020.79
5.5.240.0030.06020.20
5.4.450.0000.08719.43
5.4.440.0030.05719.54
5.4.430.0000.08719.20
5.4.420.0000.08719.39
5.4.410.0000.08319.44
5.4.400.0070.07019.09
5.4.390.0100.07319.08
5.4.380.0000.05719.22
5.4.370.0030.07319.04
5.4.360.0030.06018.95
5.4.350.0130.06719.15
5.4.340.0070.07318.95
5.4.320.0100.05719.31
5.4.310.0000.07019.23
5.4.300.0030.06718.97
5.4.290.0000.07019.13
5.4.280.0070.06719.15
5.4.270.0000.05718.84
5.4.260.0030.03719.07
5.4.250.0030.07319.08
5.4.240.0070.07019.07
5.4.230.0100.06719.22
5.4.220.0000.08319.08
5.4.210.0030.07019.24
5.4.200.0070.07019.09
5.4.190.0170.05718.86
5.4.180.0070.06319.21
5.4.170.0030.06319.15
5.4.160.0070.04719.11
5.4.150.0070.07318.83
5.4.140.0030.04716.43
5.4.130.0000.04316.57
5.4.120.0000.04316.71
5.4.110.0070.03716.43
5.4.100.0030.07016.57
5.4.90.0000.05716.32

preferences:
51.15 ms | 401 KiB | 5 Q