3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentClass { private static $_OBJECTS; public static function Get() { self::$_OBJECTS[1] = new ChildClass(); return self::$_OBJECTS[1]; } } class ChildClass extends ParentClass { public $Manager; function __construct() { $this->Manager = $this; } public static function &GetCurrent() { return ChildClass::Get(); } public static function &Get() { return parent::Get(); } } $staff = ChildClass::GetCurrent();

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.0.0alpha20.0140.00316.77
8.0.0alpha10.0100.00616.62
7.4.80.0090.00919.39
7.4.70.0110.00816.60
7.4.60.0090.00916.39
7.4.50.0030.00516.34
7.4.40.0040.01216.64
7.4.30.0080.00816.74
7.4.00.0080.00714.87
7.3.190.0060.01216.59
7.3.180.0140.00716.38
7.3.170.0150.00716.49
7.3.160.0030.01316.61
7.3.120.0050.01015.03
7.3.110.0060.00914.96
7.3.100.0030.01014.72
7.3.90.0070.01014.70
7.3.80.0080.00815.11
7.3.70.0080.00414.75
7.3.60.0080.00614.91
7.3.50.0030.00614.62
7.3.40.0090.00614.81
7.3.30.0070.01114.87
7.3.20.0040.01116.52
7.3.10.0030.01416.60
7.3.00.0040.01116.49
7.2.310.0130.00316.35
7.2.300.0080.00916.65
7.2.290.0080.00716.43
7.2.250.0090.00915.15
7.2.240.0080.01215.05
7.2.230.0090.00915.02
7.2.220.0040.01415.05
7.2.210.0040.00814.98
7.2.200.0070.00714.90
7.2.190.0030.01315.05
7.2.180.0030.00615.18
7.2.170.0070.01414.74
7.2.60.0060.00616.66
7.2.00.0030.01219.46
7.1.330.0070.00715.88
7.1.320.0000.01415.84
7.1.310.0060.00915.80
7.1.300.0100.00315.83
7.1.290.0030.01215.83
7.1.280.0060.01215.72
7.1.270.0000.01515.84
7.1.260.0000.01315.88
7.1.200.0030.00315.73
7.1.100.0040.00818.08
7.1.70.0040.00416.92
7.1.60.0170.00719.70
7.1.50.0130.01016.70
7.1.00.0030.07722.48
7.0.200.0030.00316.88
7.0.140.0000.07721.98
7.0.60.0000.04319.93
7.0.50.0030.08317.79
7.0.40.0130.06020.18
7.0.30.0470.06720.34
7.0.20.0230.07020.25
7.0.10.0270.08020.09
7.0.00.0030.04020.16
5.6.280.0070.07020.83
5.6.210.0030.08720.48
5.6.200.0070.07318.14
5.6.190.0000.04720.39
5.6.180.0330.06720.61
5.6.170.0370.04320.55
5.6.160.0000.08720.71
5.6.150.0100.08018.29
5.6.140.0130.07718.15
5.6.130.0130.08018.12
5.6.120.0030.05321.12
5.6.110.0030.07020.96
5.6.100.0070.08020.98
5.6.90.0170.07020.99
5.6.80.0130.08320.41
5.6.70.0270.07720.51
5.5.350.0300.07020.36
5.5.340.0100.08018.07
5.5.330.0070.04320.37
5.5.320.0070.08320.26
5.5.310.0130.04320.24
5.5.300.0130.06317.95
5.5.290.0030.04317.96
5.5.280.0130.05320.81
5.5.270.0230.06320.72
5.5.260.0130.06720.94
5.5.250.0000.08320.59
5.5.240.0130.03020.36
5.4.450.0100.03319.45
5.4.440.0100.04019.30
5.4.430.0030.04319.38
5.4.420.0070.03319.47
5.4.410.0030.03719.20
5.4.400.0070.07018.88
5.4.390.0070.06319.11
5.4.380.0070.06019.14
5.4.370.0000.04719.25
5.4.360.0000.04719.24
5.4.350.0130.08318.85
5.4.340.0030.08018.85
5.4.320.0130.06319.20
5.4.310.0000.05319.16
5.4.300.0200.06318.97
5.4.290.0000.04718.84
5.4.280.0100.07018.85
5.4.270.0130.03718.96
5.4.260.0100.06019.25
5.4.250.0030.06719.26
5.4.240.0030.05018.84
5.4.230.0070.07719.23
5.4.220.0070.06319.11
5.4.210.0170.06019.13
5.4.200.0070.04019.14
5.4.190.0130.03719.09
5.4.180.0070.04718.93
5.4.170.0070.07718.95
5.4.160.0030.07718.80
5.4.150.0170.06719.01
5.4.140.0100.07316.28
5.4.130.0100.06316.40
5.4.120.0100.04316.40
5.4.110.0070.03316.52
5.4.100.0100.07316.41
5.4.90.0100.07016.23
5.4.80.0070.07016.40
5.4.70.0100.03716.50
5.4.60.0100.05316.35
5.4.50.0070.04316.39
5.4.40.0070.04316.36
5.4.30.0070.06716.38
5.4.20.0070.07316.25
5.4.10.0030.07716.29
5.4.00.0030.05015.76
5.3.290.0070.07714.67
5.3.280.0070.07014.64
5.3.270.0070.06314.77
5.3.260.0130.07314.67
5.3.250.0070.07714.66
5.3.240.0130.07014.64
5.3.230.0130.04014.60
5.3.220.0030.04014.58
5.3.210.0100.03314.64
5.3.200.0100.06314.63
5.3.190.0130.06014.59
5.3.180.0070.07014.64
5.3.170.0100.06314.58
5.3.160.0030.06314.59
5.3.150.0100.07014.72
5.3.140.0130.05714.56
5.3.130.0130.07014.58
5.3.120.0070.04714.55
5.3.110.0100.05014.55
5.3.100.0100.06714.20
5.3.90.0000.08314.03
5.3.80.0170.05714.07
5.3.70.0030.07314.18
5.3.60.0130.07714.16
5.3.50.0030.08013.96
5.3.40.0100.03714.09
5.3.30.0000.04013.96
5.3.20.0130.03713.73
5.3.10.0030.07313.63
5.3.00.0030.04313.72
5.2.170.0000.06311.20
5.2.160.0100.05711.21
5.2.150.0030.05711.10
5.2.140.0070.04711.29
5.2.130.0100.02711.14
5.2.120.0070.04011.07
5.2.110.0070.06011.12
5.2.100.0030.06311.00
5.2.90.0030.05311.13
5.2.80.0000.06011.26
5.2.70.0030.06011.18
5.2.60.0070.05711.19
5.2.50.0030.06710.98
5.2.40.0170.05011.01
5.2.30.0030.06010.98
5.2.20.0070.02711.01
5.2.10.0070.03710.94
5.2.00.0030.03710.61
5.1.60.0030.03710.16
5.1.50.0000.0279.97
5.1.40.0030.0339.94
5.1.30.0030.05010.41
5.1.20.0070.05310.29
5.1.10.0070.03710.13
5.1.00.0100.03010.21
5.0.50.0100.0239.18
5.0.40.0100.0439.18
5.0.30.0030.0339.18
5.0.20.0070.0409.18
5.0.10.0100.0209.18
5.0.00.0000.0479.18
4.4.90.0030.0239.18
4.4.80.0000.0409.18
4.4.70.0030.0379.18
4.4.60.0070.0209.18
4.4.50.0030.0239.18
4.4.40.0000.0309.18
4.4.30.0000.0379.18
4.4.20.0000.0309.18
4.4.10.0000.0209.18
4.4.00.0000.0279.18
4.3.110.0030.0139.18
4.3.100.0030.0179.18
4.3.90.0030.0379.18
4.3.80.0030.0509.18
4.3.70.0000.0239.18
4.3.60.0000.0309.18
4.3.50.0070.0279.18
4.3.40.0070.0279.18
4.3.30.0000.0279.18
4.3.20.0000.0209.18
4.3.10.0000.0379.18
4.3.00.0030.0339.18