3v4l.org

run code in 300+ PHP versions simultaneously
<?php class T { public $attr = [1,2,3]; } $t = function(){ var_dump($this->attr); }; $c1 = Closure::bind($t, new T()); $c1();die; abstract class T { static public $instanses; final private function __construct(){ } public static function getInstance() { var_dump(static::$instanses); if (!(static::$instanses instanceof static)) { static::$instanses = new static; } var_dump(static::$instanses); 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.0130.00618.57
8.3.50.0160.00821.04
8.3.40.0150.00318.58
8.3.30.0120.00318.84
8.3.20.0070.01120.30
8.3.10.0050.00323.59
8.3.00.0070.00022.32
8.2.180.0030.01718.29
8.2.170.0140.00022.96
8.2.160.0130.00320.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00721.11
8.2.110.0030.00719.18
8.2.100.0040.00817.72
8.2.90.0000.00819.23
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0000.00917.79
8.2.50.0060.00318.07
8.2.40.0000.00821.11
8.2.30.0050.00319.91
8.2.20.0040.00417.71
8.2.10.0000.00718.11
8.2.00.0040.00418.00
8.1.280.0120.00925.92
8.1.270.0080.00020.38
8.1.260.0070.00326.35
8.1.250.0050.00228.09
8.1.240.0030.00622.69
8.1.230.0090.00320.87
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0030.00617.25
8.1.180.0040.00418.10
8.1.170.0060.00318.55
8.1.160.0040.00422.07
8.1.150.0050.00218.80
8.1.140.0000.00917.33
8.1.130.0030.00317.38
8.1.120.0080.00017.50
8.1.110.0000.00917.36
8.1.100.0030.00517.36
8.1.90.0000.00717.43
8.1.80.0000.00817.38
8.1.70.0030.00517.52
8.1.60.0080.00417.63
8.1.50.0040.00417.41
8.1.40.0040.00417.48
8.1.30.0050.00317.67
8.1.20.0000.00717.56
8.1.10.0020.00517.56
8.1.00.0060.00317.56
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0040.00418.36
8.0.270.0070.00017.20
8.0.260.0050.00216.74
8.0.250.0000.00716.99
8.0.240.0050.00316.85
8.0.230.0070.00016.91
8.0.220.0070.00016.93
8.0.210.0040.00416.85
8.0.200.0030.00316.96
8.0.190.0050.00516.99
8.0.180.0000.00716.81
8.0.170.0060.00317.03
8.0.160.0050.00217.07
8.0.150.0030.00416.94
8.0.140.0070.00016.96
8.0.130.0000.00613.34
8.0.120.0040.00416.89
8.0.110.0000.00716.97
8.0.100.0000.00817.05
8.0.90.0040.00416.74
8.0.80.0120.00616.87
8.0.70.0070.00016.94
8.0.60.0030.00516.90
8.0.50.0000.00716.84
8.0.30.0100.00617.01
8.0.20.0120.01017.40
8.0.10.0040.00416.97
8.0.00.0090.01016.87
7.4.330.0000.00615.14
7.4.320.0000.00616.53
7.4.300.0070.00016.57
7.4.290.0030.00316.42
7.4.280.0000.00716.50
7.4.270.0000.00716.66
7.4.260.0040.00416.61
7.4.250.0080.00016.59
7.4.240.0040.00416.61
7.4.230.0040.00416.64
7.4.220.0100.00716.64
7.4.210.0080.00916.55
7.4.200.0030.00316.40
7.4.160.0110.00516.45
7.4.150.0090.00917.40
7.4.140.0100.01217.86
7.4.130.0110.00716.59
7.4.120.0080.01216.59
7.4.110.0100.00716.59
7.4.100.0090.00916.41
7.4.90.0090.00916.66
7.4.80.0170.00319.39
7.4.70.0140.00516.47
7.4.60.0060.01016.48
7.4.50.0030.00316.66
7.4.40.0070.01216.45
7.4.30.0130.01016.26
7.4.00.0070.00714.93
7.3.330.0030.00313.29
7.3.320.0050.00013.34
7.3.310.0000.00716.22
7.3.300.0030.00316.32
7.3.290.0040.00416.28
7.3.280.0080.00916.27
7.3.270.0050.01317.40
7.3.260.0160.00816.35
7.3.250.0090.01116.37
7.3.240.0130.00316.23
7.3.230.0090.01216.50
7.3.210.0070.01016.33
7.3.200.0070.01019.39
7.3.190.0180.00616.34
7.3.180.0150.00016.40
7.3.170.0160.00016.43
7.3.160.0110.01116.39
7.2.330.0090.01216.71
7.2.320.0060.01616.45
7.2.310.0060.01216.52
7.2.300.0030.01916.62
7.2.290.0120.00616.67
7.2.00.0040.00819.17
7.1.100.0300.00318.08
7.1.70.0030.00517.18
7.1.60.0200.00720.03
7.1.50.0120.01216.51
7.1.00.0000.07722.32
7.0.200.0190.00616.50
7.0.100.0000.06019.90
7.0.90.0100.08719.91
7.0.80.0100.08019.89
7.0.70.0070.08319.86
7.0.60.0100.08320.08
7.0.50.0100.05020.34
7.0.40.0100.08019.99
7.0.30.0070.08720.08
7.0.20.0000.06320.11
7.0.10.0170.06719.98
7.0.00.0100.07719.93
5.6.280.0000.04721.11
5.6.250.0070.08320.73
5.6.240.0000.06720.54
5.6.230.0130.05320.51
5.6.220.0100.07020.59
5.6.210.0100.07720.78
5.6.200.0000.08320.97
5.6.190.0100.08321.03
5.6.180.0100.06021.12
5.6.170.0070.07720.95
5.6.160.0070.08321.14
5.6.150.0270.06321.09
5.6.140.0130.07721.17
5.6.130.0070.05021.09
5.6.120.0100.08321.14
5.6.110.0070.08720.95
5.6.100.0070.07321.11
5.6.90.0100.08021.02
5.6.80.0070.05320.38
5.6.70.0170.06020.33
5.6.60.0100.04720.33
5.6.50.0000.08020.37
5.6.40.0000.08020.37
5.6.30.0030.07720.44
5.6.20.0100.08320.44
5.6.10.0000.05720.38
5.6.00.0030.05020.43
5.5.380.0200.07020.36
5.5.370.0100.08020.40
5.5.360.0070.05020.44
5.5.350.0130.07320.39
5.5.340.0070.07720.75
5.5.330.0100.07320.65
5.5.320.0130.08720.79
5.5.310.0100.08020.87
5.5.300.0100.06720.93
5.5.290.0070.08020.89
5.5.280.0030.06720.92
5.5.270.0200.07020.87
5.5.260.0170.08020.63
5.5.250.0100.08320.75
5.5.240.0030.07720.29
5.5.230.0100.07320.30
5.5.220.0130.07320.14
5.5.210.0100.07720.29
5.5.200.0030.07020.23
5.5.190.0070.04720.09
5.5.180.0100.08020.13
5.5.160.0130.07320.23
5.5.150.0070.07320.11
5.5.140.0070.06720.15
5.5.130.0030.08320.19
5.5.120.0100.06020.09
5.5.110.0070.04320.22
5.5.100.0070.06320.15
5.5.90.0070.08019.98
5.5.80.0170.06720.08
5.5.70.0270.04720.07
5.5.60.0070.07720.07
5.5.50.0030.08020.04
5.5.40.0070.07320.09
5.5.30.0130.06720.14
5.5.20.0170.04720.07
5.5.10.0100.07320.08
5.5.00.0100.07720.04
5.4.450.0070.05719.23
5.4.440.0200.06719.46
5.4.430.0100.04719.18
5.4.420.0100.05719.20
5.4.410.0200.06319.22
5.4.400.0230.05719.18
5.4.390.0030.04719.13
5.4.380.0070.06719.02
5.4.370.0200.05719.05
5.4.360.0130.04719.04
5.4.350.0100.06019.09
5.4.340.0070.06319.04
5.4.320.0030.04718.91
5.4.310.0030.05319.04
5.4.300.0070.08018.87
5.4.290.0100.07319.13
5.4.280.0070.04319.09
5.4.270.0070.06319.09
5.4.260.0070.07719.06
5.4.250.0170.06718.87
5.4.240.0000.08018.84
5.4.230.0030.08719.23
5.4.220.0130.07319.04
5.4.210.0130.05018.83
5.4.200.0030.04719.13
5.4.190.0130.07018.93
5.4.180.0100.06719.08
5.4.170.0100.04719.24
5.4.160.0070.04019.11
5.4.150.0030.08319.02
5.4.140.0030.07316.48
5.4.130.0100.06316.46
5.4.120.0100.04316.48
5.4.110.0070.06316.48
5.4.100.0100.04316.54
5.4.90.0070.07316.52
5.4.80.0130.06316.54
5.4.70.0070.07716.40
5.4.60.0100.06316.36
5.4.50.0100.05016.44
5.4.40.0100.04716.42
5.4.30.0130.06716.23
5.4.20.0000.05716.49
5.4.10.0100.05316.41
5.4.00.0070.04315.92

preferences:
59.43 ms | 401 KiB | 5 Q