3v4l.org

run code in 300+ PHP versions simultaneously
<?php class T { private $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.0100.00718.43
8.3.50.0090.01221.20
8.3.40.0100.01018.88
8.3.30.0040.01718.71
8.3.20.0090.00920.07
8.3.10.0040.00423.66
8.3.00.0000.00722.34
8.2.180.0000.01816.75
8.2.170.0110.01122.96
8.2.160.0200.00020.32
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0090.00017.75
8.2.110.0040.00420.77
8.2.100.0090.00317.75
8.2.90.0050.00519.27
8.2.80.0030.00517.97
8.2.70.0030.00517.61
8.2.60.0030.00617.93
8.2.50.0000.00818.07
8.2.40.0050.00321.09
8.2.30.0040.00419.75
8.2.20.0050.00317.75
8.2.10.0040.00418.12
8.2.00.0000.00718.07
8.1.280.0110.00725.92
8.1.270.0030.00520.24
8.1.260.0090.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00319.01
8.1.230.0030.00817.42
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0090.00017.13
8.1.190.0060.00317.23
8.1.180.0080.00018.10
8.1.170.0000.00818.49
8.1.160.0000.00722.03
8.1.150.0080.00018.75
8.1.140.0000.00817.47
8.1.130.0070.00017.59
8.1.120.0000.00717.49
8.1.110.0040.00417.40
8.1.100.0000.00817.36
8.1.90.0080.00017.50
8.1.80.0040.00417.50
8.1.70.0070.00017.36
8.1.60.0100.00017.54
8.1.50.0030.00617.58
8.1.40.0060.00317.58
8.1.30.0000.00817.54
8.1.20.0040.00417.67
8.1.10.0030.00617.56
8.1.00.0060.00317.54
8.0.300.0040.00418.77
8.0.290.0030.00616.63
8.0.280.0030.00318.39
8.0.270.0000.00717.11
8.0.260.0060.00017.11
8.0.250.0040.00416.83
8.0.240.0030.00516.85
8.0.230.0000.00816.84
8.0.220.0030.00516.90
8.0.210.0000.00716.89
8.0.200.0000.00616.94
8.0.190.0060.00316.93
8.0.180.0040.00416.91
8.0.170.0030.00616.85
8.0.160.0070.00016.84
8.0.150.0040.00416.87
8.0.140.0050.00216.84
8.0.130.0030.00313.47
8.0.120.0070.00316.86
8.0.110.0040.00416.98
8.0.100.0030.00516.75
8.0.90.0030.00516.92
8.0.80.0060.01216.84
8.0.70.0000.00717.00
8.0.60.0030.00416.84
8.0.50.0040.00416.87
8.0.30.0100.00517.11
8.0.20.0140.00817.40
8.0.10.0000.00717.07
8.0.00.0090.00816.77
7.4.330.0000.00515.10
7.4.320.0030.00316.59
7.4.300.0000.00616.65
7.4.290.0070.00016.65
7.4.280.0000.00816.50
7.4.270.0040.00316.52
7.4.260.0030.00316.43
7.4.250.0030.00616.44
7.4.240.0030.00316.52
7.4.230.0070.00016.54
7.4.220.0070.01616.71
7.4.210.0050.01316.56
7.4.200.0000.00716.49
7.4.160.0090.00616.56
7.4.150.0100.01017.40
7.4.140.0120.01117.86
7.4.130.0030.01416.57
7.4.120.0070.01316.49
7.4.110.0160.00616.51
7.4.100.0100.01016.77
7.4.90.0120.00616.50
7.4.80.0140.00719.39
7.4.70.0060.01316.42
7.4.60.0100.00616.69
7.4.50.0030.00316.61
7.4.40.0070.01116.50
7.4.30.0030.01616.52
7.4.00.0060.00614.77
7.3.330.0000.00513.32
7.3.320.0030.00213.25
7.3.310.0050.00216.14
7.3.300.0000.00716.22
7.3.290.0000.00616.37
7.3.280.0140.00616.29
7.3.270.0040.01517.40
7.3.260.0090.00916.60
7.3.250.0110.00716.33
7.3.240.0100.00616.39
7.3.230.0130.00716.39
7.3.210.0100.00716.54
7.3.200.0080.00919.39
7.3.190.0130.00316.66
7.3.180.0080.00816.40
7.3.170.0060.01616.30
7.3.160.0070.01116.41
7.2.330.0110.00816.70
7.2.320.0060.01416.49
7.2.310.0090.00916.73
7.2.300.0110.00916.66
7.2.290.0100.01316.71
7.2.80.0090.00616.31
7.2.60.0060.01016.94
7.2.00.0000.01019.59
7.1.200.0040.00515.88
7.1.100.0090.00617.82
7.1.70.0030.01017.27
7.1.60.0140.01120.03
7.1.50.0030.00717.01
7.1.00.0070.07322.36
7.0.200.0300.00316.67
7.0.60.0000.05319.87
7.0.50.0100.04717.88
7.0.40.0100.04020.15
7.0.30.0230.04020.33
7.0.20.0370.07320.30
7.0.10.0030.04720.16
7.0.00.0170.06720.23
5.6.280.0030.07321.09
5.6.210.0000.04320.71
5.6.200.0070.07018.21
5.6.190.0070.07320.48
5.6.180.0170.05320.48
5.6.170.0270.04720.62
5.6.160.0030.04320.47
5.6.150.0070.07318.29
5.6.140.0030.07718.15
5.6.130.0030.04718.11
5.6.120.0070.08021.02
5.6.110.0130.03721.13
5.6.100.0130.07721.05
5.6.90.0030.08721.00
5.6.80.0070.07720.42
5.6.70.4570.04020.41
5.5.350.0270.06720.42
5.5.340.0070.08318.07
5.5.330.0030.05320.34
5.5.320.0430.05720.52
5.5.310.0270.07020.24
5.5.300.0130.07017.94
5.5.290.0070.06718.01
5.5.280.0030.04020.90
5.5.270.0100.04020.87
5.5.260.0170.06020.98
5.5.250.0100.07020.62
5.5.240.0230.07020.13
5.4.450.0870.05719.34
5.4.440.0830.07019.57
5.4.430.0800.06319.56
5.4.420.0930.04719.55
5.4.410.0830.05719.45
5.4.400.0970.06719.23
5.4.390.0830.04719.25
5.4.380.0770.03719.14
5.4.370.0770.04719.25
5.4.360.0870.05319.29
5.4.350.0930.04719.30
5.4.340.0770.05319.14
5.4.320.0870.03719.14
5.4.310.0730.05019.13
5.4.300.0730.05019.29
5.4.290.0670.05318.86
5.4.280.0600.05719.06
5.4.270.0900.05019.22
5.4.260.0830.04319.23
5.4.250.0730.04719.13
5.4.240.0800.05019.24
5.4.230.0730.05018.85
5.4.220.0670.05719.13
5.4.210.0730.05719.01
5.4.200.0830.05016.90
5.4.190.0670.05019.07
5.4.180.0870.05319.09
5.4.170.0900.04719.17
5.4.160.0970.06319.00
5.4.150.0970.07019.23
5.4.140.0870.05316.49
5.4.130.0970.05016.46
5.4.120.0770.05716.35
5.4.110.0930.04316.46
5.4.100.1000.04716.43
5.4.90.0800.05316.35
5.4.80.0870.04716.44
5.4.70.0670.05316.31
5.4.60.0030.05716.54
5.4.50.0030.03316.51
5.4.40.0230.05716.53
5.4.30.0300.06716.22
5.4.20.0270.06016.25

preferences:
56.16 ms | 401 KiB | 5 Q