3v4l.org

run code in 300+ PHP versions simultaneously
<?php class EmptyObj{ protected function __construct(){} public static function get(){ static $obj; if(!$obj) $obj = new EmptyObj; return $obj; } public function __call($n, $a){ return $this; } public function __toString(){ return ''; } } class SomeClass{ public $image; public function __construct(){ $this->image = EmptyObj::get(); }} $a = new SomeClass; echo $a->image->oopsForgotToSetImage(); echo $a->image->ExecSomeFnWithExpectedObject()->getSomethingFromObj()->expectVal;

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.0060.00918.68
8.3.50.0210.01021.15
8.3.40.0140.00018.77
8.3.30.0130.00720.17
8.3.20.0040.00420.24
8.3.10.0080.00020.95
8.3.00.0040.00422.42
8.2.180.0140.00716.75
8.2.170.0120.00322.96
8.2.160.0120.00322.02
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00020.78
8.2.110.0030.00719.21
8.2.100.0110.00417.87
8.2.90.0040.00419.28
8.2.80.0040.00417.97
8.2.70.0000.00817.38
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0080.00018.11
8.2.30.0040.00419.36
8.2.20.0050.00217.73
8.2.10.0080.00017.79
8.2.00.0000.00817.69
8.1.280.0150.00325.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0080.00022.54
8.1.230.0070.00420.95
8.1.220.0040.00418.77
8.1.210.0040.00420.80
8.1.200.0100.00017.35
8.1.190.0040.00417.55
8.1.180.0030.00618.10
8.1.170.0040.00418.70
8.1.160.0000.00718.80
8.1.150.0070.00018.58
8.1.140.0030.00617.36
8.1.130.0030.00717.75
8.1.120.0070.00017.38
8.1.110.0040.00417.38
8.1.100.0000.00717.43
8.1.90.0040.00417.34
8.1.80.0040.00417.35
8.1.70.0070.00017.45
8.1.60.0080.00017.60
8.1.50.0040.00417.43
8.1.40.0030.00617.52
8.1.30.0050.00317.59
8.1.20.0000.00817.70
8.1.10.0040.00417.57
8.1.00.0040.00417.56
8.0.300.0040.00419.98
8.0.290.0040.00417.05
8.0.280.0000.00718.44
8.0.270.0040.00417.16
8.0.260.0040.00416.85
8.0.250.0030.00316.99
8.0.240.0030.00517.06
8.0.230.0040.00417.03
8.0.220.0060.00016.84
8.0.210.0000.00716.95
8.0.200.0060.00016.99
8.0.190.0040.00416.86
8.0.180.0000.00816.86
8.0.170.0080.00016.90
8.0.160.0040.00416.93
8.0.150.0040.00416.95
8.0.140.0000.00716.82
8.0.130.0030.00313.38
8.0.120.0030.00616.95
8.0.110.0040.00416.96
8.0.100.0000.00716.95
8.0.90.0040.00416.94
8.0.80.0110.00417.00
8.0.70.0000.00816.79
8.0.60.0040.00416.76
8.0.50.0070.00016.84
8.0.30.0060.01317.15
8.0.20.0080.01017.40
8.0.10.0000.00717.05
8.0.00.0080.01016.86
7.4.330.0070.00014.88
7.4.320.0070.00016.44
7.4.300.0070.00016.49
7.4.290.0020.00516.61
7.4.280.0040.00416.40
7.4.270.0080.00016.59
7.4.260.0000.00613.28
7.4.250.0030.00516.57
7.4.240.0050.00216.45
7.4.230.0030.00316.39
7.4.220.0030.01316.62
7.4.210.0100.00616.59
7.4.200.0030.00316.63
7.4.190.0000.00816.67
7.4.160.0140.00716.56
7.4.150.0060.01217.40
7.4.140.0090.00817.86
7.4.130.0110.00616.56
7.4.120.0080.00816.48
7.4.110.0120.01316.74
7.4.100.0120.00616.57
7.4.90.0190.00616.46
7.4.80.0070.01119.39
7.4.70.0140.00316.52
7.4.60.0080.00816.67
7.4.50.0040.00416.64
7.4.40.0040.01122.77
7.4.30.0030.01716.51
7.4.00.0100.00715.08
7.3.330.0050.00013.30
7.3.320.0050.00013.41
7.3.310.0030.00416.46
7.3.300.0060.00016.25
7.3.290.0090.00616.45
7.3.280.0120.00516.38
7.3.270.0110.00617.40
7.3.260.0120.00518.24
7.3.250.0080.01116.35
7.3.240.0150.00316.61
7.3.230.0130.00616.48
7.3.210.0060.01216.61
7.3.200.0070.01419.39
7.3.190.0140.00316.54
7.3.180.0100.00716.41
7.3.170.0130.00316.46
7.3.160.0070.00716.54
7.3.120.0030.01014.94
7.2.330.0110.00616.49
7.2.320.0190.00416.38
7.2.310.0150.00316.80
7.2.300.0130.00316.46
7.2.290.0030.01316.42
7.2.60.0030.01016.67
7.1.200.0070.00315.90
7.1.100.0030.01018.09
7.1.70.0030.00517.24
7.1.60.0070.01519.17
7.1.50.0080.00316.96
7.1.00.0000.07722.48
7.0.200.0000.01016.73
7.0.140.0100.06321.92
7.0.100.0170.06019.84
7.0.90.0030.08719.79
7.0.80.0230.03319.91
7.0.70.0170.07019.88
7.0.60.0130.07719.88
7.0.50.0070.08020.19
7.0.40.0130.07020.03
7.0.30.0070.06720.13
7.0.20.0070.07720.04
7.0.10.0000.04320.04
7.0.00.0070.05320.04
5.6.280.0030.09720.83
5.6.250.0130.08020.62
5.6.240.0170.08720.65
5.6.230.0130.08020.68
5.6.220.0070.08320.45
5.6.210.0100.07320.56
5.6.200.0030.08320.99
5.6.190.0070.08320.91
5.6.180.0030.03720.88
5.6.170.0030.04320.99
5.6.160.0100.08021.06
5.6.150.0100.07721.07
5.6.140.0100.08320.96
5.6.130.0100.08021.12
5.6.120.0070.08720.95
5.6.110.0070.05321.05
5.6.100.0030.08720.96
5.6.90.0070.04721.10
5.6.80.0000.05020.39
5.6.70.0030.04020.38
5.6.60.0070.09720.34
5.6.50.0130.07720.36
5.6.40.0030.08720.36
5.6.30.0170.06720.38
5.6.20.0070.07720.34
5.6.10.0170.07720.25
5.6.00.0070.07020.37
5.5.380.0170.03720.41
5.5.370.0100.07720.30
5.5.360.0100.07020.32
5.5.350.0130.07720.36
5.5.340.0130.08020.79
5.5.330.0100.07020.76
5.5.320.0030.05020.82
5.5.310.0070.03720.83
5.5.300.0200.07020.79
5.5.290.0000.09020.89
5.5.280.0130.07320.78
5.5.270.0030.04320.71
5.5.260.0130.04720.87
5.5.250.0170.05320.60
5.5.240.0130.07320.24
5.5.230.0100.05020.22
5.5.220.0070.03720.26
5.5.210.0030.08320.17
5.5.200.0000.08720.23
5.5.190.0100.04720.15
5.5.180.0200.05720.10
5.5.160.0030.05020.25
5.5.150.0100.07320.20
5.5.140.0170.06720.16
5.5.130.0100.07020.18
5.5.120.0130.06720.07
5.5.110.0030.04020.22
5.5.100.0130.03320.00
5.5.90.0070.03720.00
5.5.80.0070.04019.97
5.5.70.0100.03320.02
5.5.60.0070.04020.04
5.5.50.0130.03720.11
5.5.40.0130.03020.09
5.5.30.0070.04020.01
5.5.20.0000.04020.04
5.5.10.0030.04020.02
5.5.00.0030.07720.02
5.4.450.0100.07719.37
5.4.440.0100.04019.42
5.4.430.0100.07019.35
5.4.420.0130.07319.53
5.4.410.0030.04019.14
5.4.400.0070.06018.88
5.4.390.0070.06719.04
5.4.380.0000.06719.09
5.4.370.0070.07319.12
5.4.360.0070.06719.18
5.4.350.0030.04019.05
5.4.340.0100.07719.23
5.4.320.0070.08018.87
5.4.310.0070.08018.85
5.4.300.0030.07718.94
5.4.290.0030.07019.03
5.4.280.0130.04719.22
5.4.270.0100.05018.87
5.4.260.0100.03019.10
5.4.250.0070.03719.17
5.4.240.0130.03019.04
5.4.230.0030.04018.94
5.4.220.0070.03319.14
5.4.210.0070.03318.87
5.4.200.0000.04019.04
5.4.190.0070.03719.14
5.4.180.0070.02719.12
5.4.170.0070.04318.84
5.4.160.0030.04019.21
5.4.150.0070.08019.01
5.4.140.0030.08316.50
5.4.130.0030.06716.25
5.4.120.0030.05016.42
5.4.110.0070.05016.40
5.4.100.0000.07716.48
5.4.90.0100.05316.54
5.4.80.0000.03716.51
5.4.70.0000.07016.55
5.4.60.0070.03016.37
5.4.50.0070.03316.47
5.4.40.0070.04316.54
5.4.30.0030.03716.46
5.4.20.0070.03016.39
5.4.10.0100.03016.29
5.4.00.0000.05015.58
5.3.290.0070.07714.81
5.3.280.0070.03314.70
5.3.270.0000.04014.73
5.3.260.0000.04014.54
5.3.250.0030.04314.71
5.3.240.0030.06714.68
5.3.230.0030.05314.66
5.3.220.0030.04714.54
5.3.210.0100.03014.59
5.3.200.0070.03014.54
5.3.190.0030.05014.56
5.3.180.0100.06314.66
5.3.170.0030.03314.63
5.3.160.0000.04014.69
5.3.150.0000.04014.70
5.3.140.0070.03014.50
5.3.130.0070.03314.60
5.3.120.0070.03714.54
5.3.110.0000.04014.64
5.3.100.0070.03714.01
5.3.90.0100.04014.01
5.3.80.0030.04014.02
5.3.70.0030.03714.16
5.3.60.0030.03714.09
5.3.50.0070.02713.97
5.3.40.0030.03714.02
5.3.30.0070.03014.05
5.3.20.0070.03313.75
5.3.10.0070.03313.77
5.3.00.0070.03713.63
5.2.170.0030.03311.01
5.2.160.0030.02711.05
5.2.150.0000.03311.14
5.2.140.0070.02311.08
5.2.130.0000.03311.00
5.2.120.0000.03011.13
5.2.110.0030.02711.14
5.2.100.0070.02311.20
5.2.90.0070.02711.02
5.2.80.0000.03011.16
5.2.70.0000.03011.24
5.2.60.0000.03311.06
5.2.50.0030.02711.16
5.2.40.0070.02311.07
5.2.30.0000.03011.05
5.2.20.0030.02711.00
5.2.10.0030.02710.93
5.2.00.0000.03310.66
5.1.60.0030.0279.96
5.1.50.0000.0339.99
5.1.40.0100.03310.05
5.1.30.0000.03310.40
5.1.20.0000.02710.42
5.1.10.0030.0609.89
5.1.00.0030.05010.18
5.0.50.0070.0338.40
5.0.40.0030.0338.48
5.0.30.0030.0638.08
5.0.20.0030.0338.32
5.0.10.0070.0378.28
5.0.00.0000.0578.26
4.4.90.0070.0137.51
4.4.80.0000.0177.51
4.4.70.0030.0107.51
4.4.60.0000.0177.51
4.4.50.0030.0137.51
4.4.40.0000.0337.51
4.4.30.0000.0177.51
4.4.20.0030.0137.51
4.4.10.0030.0337.51
4.4.00.0000.0277.51
4.3.110.0000.0237.51
4.3.100.0070.0337.51
4.3.90.0030.0337.51
4.3.80.0000.0607.51
4.3.70.0030.0207.51
4.3.60.0030.0337.51
4.3.50.0070.0307.51
4.3.40.0000.0407.51
4.3.30.0000.0377.51
4.3.20.0000.0377.51
4.3.10.0000.0277.51
4.3.00.0030.0337.51

preferences:
46.81 ms | 401 KiB | 5 Q