3v4l.org

run code in 300+ PHP versions simultaneously
<?php class T { protected $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.0110.00718.43
8.3.50.0120.01121.20
8.3.40.0090.00618.84
8.3.30.0150.00318.84
8.3.20.0100.01020.20
8.3.10.0080.00023.54
8.3.00.0080.00022.52
8.2.180.0140.00316.63
8.2.170.0120.00322.96
8.2.160.0070.01020.43
8.2.150.0120.00324.18
8.2.140.0070.00724.66
8.2.130.0040.00426.16
8.2.120.0090.00017.50
8.2.110.0030.00620.35
8.2.100.0040.00817.91
8.2.90.0030.00719.08
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0050.00321.25
8.2.30.0060.00319.84
8.2.20.0070.00017.79
8.2.10.0050.00318.08
8.2.00.0000.00717.95
8.1.280.0070.01025.92
8.1.270.0080.00020.24
8.1.260.0030.00726.35
8.1.250.0000.00728.09
8.1.240.0030.00623.91
8.1.230.0090.00320.87
8.1.220.0050.00317.74
8.1.210.0030.00718.77
8.1.200.0040.00417.36
8.1.190.0050.00317.34
8.1.180.0000.00818.10
8.1.170.0030.00518.46
8.1.160.0070.00021.94
8.1.150.0030.00518.90
8.1.140.0060.00317.38
8.1.130.0050.00317.72
8.1.120.0040.00417.42
8.1.110.0000.00817.47
8.1.100.0030.00517.47
8.1.90.0000.00717.51
8.1.80.0040.00417.48
8.1.70.0000.00717.49
8.1.60.0090.00017.63
8.1.50.0000.00917.52
8.1.40.0040.00417.49
8.1.30.0000.00817.71
8.1.20.0040.00417.68
8.1.10.0000.00717.62
8.1.00.0040.00417.55
8.0.300.0000.00718.77
8.0.290.0070.00016.75
8.0.280.0020.00518.27
8.0.270.0070.00017.21
8.0.260.0030.00318.27
8.0.250.0050.00216.93
8.0.240.0000.00816.88
8.0.230.0000.00716.98
8.0.220.0000.00716.89
8.0.210.0000.00716.92
8.0.200.0030.00316.91
8.0.190.0060.00316.94
8.0.180.0040.00416.99
8.0.170.0030.00516.95
8.0.160.0040.00417.01
8.0.150.0000.00716.86
8.0.140.0040.00416.96
8.0.130.0060.00013.40
8.0.120.0030.00516.95
8.0.110.0070.00017.03
8.0.100.0000.00816.84
8.0.90.0070.00017.00
8.0.80.0100.00716.95
8.0.70.0070.00016.82
8.0.60.0000.00716.93
8.0.50.0070.00016.83
8.0.30.0090.00917.02
8.0.20.0070.01217.42
8.0.10.0040.00417.20
8.0.00.0110.00816.83
7.4.330.0050.00015.08
7.4.320.0060.00016.66
7.4.300.0060.00016.50
7.4.290.0030.00316.52
7.4.280.0040.00416.52
7.4.270.0070.00016.37
7.4.260.0030.00316.47
7.4.250.0020.00516.43
7.4.240.0040.00416.57
7.4.230.0070.00016.39
7.4.220.0120.00916.43
7.4.210.0040.01116.70
7.4.200.0000.00716.41
7.4.160.0090.00616.48
7.4.150.0090.00917.40
7.4.140.0070.00917.86
7.4.130.0060.01116.48
7.4.120.0110.01016.51
7.4.110.0030.01416.54
7.4.100.0150.00416.36
7.4.90.0070.01016.80
7.4.80.0040.01319.39
7.4.70.0100.01016.39
7.4.60.0080.00816.58
7.4.50.0000.00516.34
7.4.40.0100.00716.62
7.4.30.0060.01316.44
7.4.00.0040.00714.93
7.3.330.0060.00013.33
7.3.320.0030.00313.32
7.3.310.0030.00316.17
7.3.300.0030.00316.38
7.3.290.0030.00316.24
7.3.280.0050.01416.34
7.3.270.0070.01017.40
7.3.260.0190.00316.61
7.3.250.0090.00816.37
7.3.240.0110.00716.31
7.3.230.0130.01016.50
7.3.210.0090.00616.30
7.3.200.0090.00919.39
7.3.190.0100.00716.38
7.3.180.0100.00616.39
7.3.170.0100.00716.41
7.3.160.0110.01116.50
7.2.330.0150.00316.65
7.2.320.0070.01116.42
7.2.310.0060.01316.79
7.2.300.0110.01316.58
7.2.290.0190.00616.56
7.2.60.0000.01416.89
7.2.00.0000.01019.57
7.1.200.0030.00915.77
7.1.100.0100.00717.95
7.1.70.0030.00717.18
7.1.60.0100.01020.03
7.1.50.0000.02116.67
7.1.00.0030.07722.44
7.0.200.0170.00716.58
7.0.60.0100.06019.94
7.0.50.0100.08017.97
7.0.40.0030.09020.05
7.0.30.0600.06720.30
7.0.20.0330.06720.26
7.0.10.0400.09320.06
7.0.00.0030.08720.20
5.6.280.0030.03020.82
5.6.210.0070.08020.65
5.6.200.0100.07318.24
5.6.190.0030.06320.34
5.6.180.0270.05320.51
5.6.170.0330.07320.55
5.6.160.0130.07720.53
5.6.150.0100.06718.14
5.6.140.0030.04018.11
5.6.130.0100.06718.23
5.6.120.0030.04321.02
5.6.110.0070.07721.12
5.6.100.0130.08721.03
5.6.90.0130.07720.97
5.6.80.0100.07320.38
5.6.70.3630.02720.38
5.5.350.0170.07020.42
5.5.340.0000.06017.97
5.5.330.0100.07020.43
5.5.320.0400.07720.18
5.5.310.0330.07720.20
5.5.300.0000.04318.06
5.5.290.0170.06317.95
5.5.280.0130.07720.78
5.5.270.0070.03720.80
5.5.260.0300.07020.78
5.5.250.0170.07720.55
5.5.240.0400.07320.20
5.4.450.0330.07019.58
5.4.440.0300.07019.55
5.4.430.0370.06319.33
5.4.420.0230.07319.48
5.4.410.0230.05719.42
5.4.400.0230.05719.23
5.4.390.0200.07718.98
5.4.380.0400.05719.25
5.4.370.0270.06319.13
5.4.360.0170.08019.23
5.4.350.0230.06318.86
5.4.340.0170.07019.13
5.4.320.0130.06318.84
5.4.310.0230.06319.24
5.4.300.0300.05019.29
5.4.290.0130.05719.25
5.4.280.0170.07318.83
5.4.270.0270.06018.86
5.4.260.0370.05018.84
5.4.250.0170.07019.01
5.4.240.0230.06319.12
5.4.230.0330.05319.00
5.4.220.0200.05719.24
5.4.210.0170.06018.87
5.4.200.0230.06316.69
5.4.190.0200.06319.09
5.4.180.0130.06318.99
5.4.170.0130.06719.00
5.4.160.0230.05718.99
5.4.150.0300.06319.04
5.4.140.0130.08016.62
5.4.130.0230.06016.50
5.4.120.0200.07016.61
5.4.110.0100.07016.54
5.4.100.0230.06016.58
5.4.90.0130.06316.77
5.4.80.0230.06016.42
5.4.70.0170.06716.41
5.4.60.0270.04316.49
5.4.50.0000.06316.52
5.4.40.0000.07316.43
5.4.30.0030.03316.34
5.4.20.0300.06016.56

preferences:
55.8 ms | 401 KiB | 5 Q