3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(md5((string)null));die; class T { private $attr = [1,2,3]; } $t = function(){ var_dump($this->attr); return $this; }; $t = $t->bindTo(new T(), 'T'); //$c1 = Closure::bind($t, new T(), 'T'); $t(); var_dump($t()); 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.0070.01018.30
8.3.50.0100.00921.09
8.3.40.0070.01418.90
8.3.30.0150.00618.71
8.3.20.0030.01520.31
8.3.10.0110.00423.48
8.3.00.0050.00322.32
8.2.180.0110.01118.41
8.2.170.0080.00822.96
8.2.160.0180.00322.20
8.2.150.0030.00524.18
8.2.140.0000.00924.66
8.2.130.0040.00426.16
8.2.120.0050.00317.63
8.2.110.0030.00622.13
8.2.100.0100.00317.75
8.2.90.0030.00619.23
8.2.80.0070.00317.97
8.2.70.0080.00017.63
8.2.60.0000.00817.55
8.2.50.0000.00918.07
8.2.40.0040.00421.11
8.2.30.0040.00419.77
8.2.20.0040.00417.60
8.2.10.0040.00418.14
8.2.00.0000.00817.95
8.1.280.0110.00425.92
8.1.270.0040.00420.23
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00423.92
8.1.230.0120.00017.42
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0070.00417.25
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0040.00418.58
8.1.160.0030.00521.86
8.1.150.0040.00418.68
8.1.140.0000.00817.24
8.1.130.0070.00017.50
8.1.120.0040.00317.29
8.1.110.0040.00417.36
8.1.100.0040.00417.45
8.1.90.0000.00717.36
8.1.80.0000.00717.37
8.1.70.0070.00017.41
8.1.60.0060.00317.40
8.1.50.0000.00817.48
8.1.40.0000.00717.48
8.1.30.0090.00017.48
8.1.20.0040.00417.50
8.1.10.0000.00717.48
8.1.00.0030.00617.39
8.0.300.0030.00618.77
8.0.290.0040.00416.75
8.0.280.0000.00718.23
8.0.270.0000.00717.17
8.0.260.0070.00017.09
8.0.250.0000.00716.97
8.0.240.0000.00816.94
8.0.230.0030.00316.82
8.0.220.0000.00816.72
8.0.210.0000.00716.85
8.0.200.0030.00316.97
8.0.190.0050.00316.95
8.0.180.0070.00016.87
8.0.170.0000.00716.93
8.0.160.0030.00316.88
8.0.150.0040.00416.66
8.0.140.0070.00016.76
8.0.130.0060.00013.26
8.0.120.0000.00816.74
8.0.110.0040.00416.78
8.0.100.0050.00216.81
8.0.90.0040.00416.88
8.0.80.0030.01216.83
8.0.70.0000.00816.94
8.0.60.0000.00716.86
8.0.50.0000.00816.88
8.0.30.0060.01316.84
8.0.20.0090.00917.40
8.0.10.0070.00016.88
8.0.00.0100.01116.90
7.4.330.0020.00215.08
7.4.320.0030.00316.51
7.4.300.0060.00016.46
7.4.290.0000.00716.34
7.4.280.0050.00316.54
7.4.270.0000.00716.42
7.4.260.0000.00716.55
7.4.250.0050.00316.45
7.4.240.0020.00516.48
7.4.230.0030.00316.45
7.4.220.0140.01016.55
7.4.210.0000.01516.38
7.4.200.0000.00716.49
7.4.160.0030.01216.42
7.4.150.0100.00717.40
7.4.140.0140.00817.86
7.4.130.0050.01216.35
7.4.120.0150.00416.38
7.4.110.0130.00316.57
7.4.100.0090.00916.23
7.4.90.0120.00616.47
7.4.80.0130.01019.39
7.4.70.0060.01216.61
7.4.60.0090.00916.59
7.4.50.0050.00316.54
7.4.40.0070.01116.50
7.4.30.0120.01216.59
7.4.00.0070.00714.91
7.3.330.0000.00513.20
7.3.320.0000.00513.22
7.3.310.0070.00016.30
7.3.300.0060.00016.30
7.3.290.0080.00916.24
7.3.280.0060.01016.25
7.3.270.0100.00717.40
7.3.260.0130.00316.10
7.3.250.0080.00916.36
7.3.240.0100.00716.45
7.3.230.0070.01016.41
7.3.210.0030.01316.26
7.3.200.0150.00619.39
7.3.190.0060.00916.15
7.3.180.0070.01416.38
7.3.170.0060.00916.27
7.3.160.0070.01016.36
7.2.330.0040.01516.23
7.2.320.0180.04316.36
7.2.310.0120.00616.57
7.2.300.0090.01316.56
7.2.290.0120.00616.70
7.2.60.0110.00316.78
7.2.00.0060.00919.19
7.1.200.0090.00315.68
7.1.100.0120.00417.83
7.1.70.0000.00716.89
7.1.60.0050.01617.24
7.1.50.0070.01516.74
7.1.00.0030.07722.45
7.0.200.0030.01216.79
7.0.60.0130.07019.93
7.0.50.0030.04017.88
7.0.40.0030.04720.40
7.0.30.0230.08720.17
7.0.20.0300.07020.23
7.0.10.0230.08320.19
7.0.00.0030.05320.33
5.6.280.0000.07721.03
5.6.210.0000.07320.51
5.6.200.0070.04718.27
5.6.190.0170.05320.65
5.6.180.0300.07720.48
5.6.170.0130.04320.57
5.6.160.0070.07020.51
5.6.150.0070.08018.14
5.6.140.0100.03318.26
5.6.130.0030.08318.18
5.6.120.0030.07321.14
5.6.110.0170.07720.99
5.6.100.0100.07721.00
5.6.90.0100.06721.01
5.6.80.0000.04320.54
5.6.70.4470.04020.41
5.5.350.0100.07020.36
5.5.340.0130.03317.99
5.5.330.0130.07720.32
5.5.320.0470.06720.35
5.5.310.0270.08020.41
5.5.300.0070.05318.04
5.5.290.0170.06317.98
5.5.280.0070.08320.89
5.5.270.0070.08320.88
5.5.260.0070.08320.80
5.5.250.0100.07720.67
5.5.240.0070.03720.16
5.4.450.1000.07719.58
5.4.440.0930.07319.45
5.4.430.0800.06719.57
5.4.420.0700.07719.50
5.4.410.0670.07719.34
5.4.400.0030.08019.25
5.4.390.0170.07019.20
5.4.380.0970.07719.23
5.4.370.0830.05719.18
5.4.360.0930.07019.25
5.4.350.1200.07019.23
5.4.340.0800.05719.12
5.4.320.0900.04719.28
5.4.310.0730.07019.29
5.4.300.0630.04719.14
5.4.290.0030.06318.84
5.4.280.0130.06019.12
5.4.270.0570.04719.08
5.4.260.1000.05019.30
5.4.250.1100.06319.14
5.4.240.0870.04319.27
5.4.230.0900.05319.13
5.4.220.0930.04019.20
5.4.210.0830.05019.00
5.4.200.0730.06316.82
5.4.190.1000.05318.98
5.4.180.0900.05719.16
5.4.170.1100.05719.02
5.4.160.0900.05019.00
5.4.150.0970.07319.30
5.4.140.0600.05316.41
5.4.130.0270.04016.57
5.4.120.0330.05316.38
5.4.110.0700.04316.77
5.4.100.1130.04716.38
5.4.90.1000.05316.39
5.4.80.0830.04316.47
5.4.70.0700.05316.54
5.4.60.0000.05016.53
5.4.50.0000.07716.43
5.4.40.0000.04016.22
5.4.30.0200.06016.53
5.4.20.0300.04016.50

preferences:
41.08 ms | 401 KiB | 5 Q