3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ERROR); class B { /** * @param string $p * @return string */ function g($p) { if (!$p) { return null; } return $p; } } class C extends B { function f($p) { return $this->$p[0]; } /** * @param int $p * @return int */ function g($p) { $this->p = $p; $this->property = [42]; return $this->f($p); } } print (new C)->g('property' . $undeclared_global) . "\n";

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.0040.01818.50
8.3.50.0130.00621.97
8.3.40.0160.00018.63
8.3.30.0120.00318.67
8.3.20.0080.00020.32
8.3.10.0040.00421.76
8.3.00.0080.00020.86
8.2.180.0100.01016.32
8.2.170.0070.00722.96
8.2.160.0070.00719.25
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00720.43
8.2.120.0080.00026.35
8.2.110.0110.00019.19
8.2.100.0080.00418.16
8.2.90.0050.00319.23
8.2.80.0050.00317.97
8.2.70.0030.00617.75
8.2.60.0040.00418.03
8.2.50.0110.00018.10
8.2.40.0040.00420.42
8.2.30.0000.00719.39
8.2.20.0040.00417.69
8.2.10.0030.00518.00
8.2.00.0040.00418.20
8.1.280.0110.00325.92
8.1.270.0070.00024.02
8.1.260.0030.00628.09
8.1.250.0000.00728.09
8.1.240.0030.00621.35
8.1.230.0110.00017.70
8.1.220.0000.00817.77
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0040.00417.10
8.1.180.0040.00418.10
8.1.170.0060.00618.65
8.1.160.0070.00019.01
8.1.150.0050.00218.80
8.1.140.0040.00419.49
8.1.130.0030.00317.63
8.1.120.0070.00017.36
8.1.110.0040.00417.42
8.1.100.0030.00517.36
8.1.90.0030.00617.47
8.1.80.0000.00817.47
8.1.70.0050.00317.39
8.1.60.0040.00417.54
8.1.50.0000.00817.43
8.1.40.0060.00317.48
8.1.30.0090.00017.59
8.1.20.0030.00517.61
8.1.10.0040.00517.49
8.1.00.0040.00417.34
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0030.00318.45
8.0.270.0030.00316.88
8.0.260.0030.00317.26
8.0.250.0030.00316.89
8.0.240.0020.00516.99
8.0.230.0030.00316.85
8.0.220.0000.00816.94
8.0.210.0030.00316.93
8.0.200.0030.00316.93
8.0.190.0040.00416.84
8.0.180.0040.00416.93
8.0.170.0050.00316.92
8.0.160.0050.00316.82
8.0.150.0000.00716.82
8.0.140.0090.00416.80
8.0.130.0000.00713.43
8.0.120.0030.00516.94
8.0.110.0040.00416.90
8.0.100.0000.00716.78
8.0.90.0040.00416.79
8.0.80.0120.00317.00
8.0.70.0040.00416.82
8.0.60.0000.00716.89
8.0.50.0000.00816.91
8.0.30.0050.01217.00
8.0.20.0080.00917.40
8.0.10.0070.00017.11
8.0.00.0090.00916.63
7.4.330.0050.00015.08
7.4.320.0000.00716.49
7.4.300.0030.00316.54
7.4.290.0030.00316.52
7.4.280.0030.00616.33
7.4.270.0070.00316.42
7.4.260.0080.00316.43
7.4.250.0030.00316.50
7.4.240.0070.00016.55
7.4.230.0000.00816.65
7.4.220.0120.00616.50
7.4.210.0110.00316.56
7.4.200.0030.00316.39
7.4.160.0110.00416.34
7.4.150.0140.00317.40
7.4.140.0070.00917.86
7.4.130.0090.00816.55
7.4.120.0090.01016.62
7.4.110.0150.00716.64
7.4.100.0090.01216.56
7.4.90.0120.00616.66
7.4.80.0170.00319.39
7.4.70.0130.00316.40
7.4.60.0100.00616.48
7.4.50.0100.00716.33
7.4.40.0100.00716.45
7.4.30.0130.00316.36
7.4.00.0000.01614.95
7.3.330.0020.00213.30
7.3.320.0000.00513.36
7.3.310.0000.00716.48
7.3.300.0000.00716.30
7.3.290.0070.00016.38
7.3.280.0070.01216.41
7.3.270.0090.00817.40
7.3.260.0200.01716.52
7.3.250.0120.00616.48
7.3.240.0080.00916.38
7.3.230.0030.01516.47
7.3.210.0180.00316.59
7.3.200.0100.00616.37
7.3.190.0100.00716.66
7.3.180.0100.00716.50
7.3.170.0100.00716.43
7.3.160.0150.02516.66
7.3.40.0130.00614.80
7.3.30.0080.00814.66
7.3.20.0040.00916.44
7.3.10.0120.00416.53
7.3.00.0260.00415.91
7.2.330.0110.00616.60
7.2.320.0080.00916.48
7.2.310.0080.01116.51
7.2.300.0060.00916.36
7.2.290.0160.00616.74
7.2.220.0100.00416.25
7.2.170.0080.00414.71
7.2.160.0130.00414.65
7.2.150.0100.00316.66
7.2.140.0050.01016.55
7.2.130.0280.00715.85
7.2.120.0270.00915.96
7.2.110.0240.00915.87
7.2.100.0360.00515.73
7.2.90.0340.00915.88
7.2.80.0380.00815.84
7.2.70.0260.01015.92
7.2.60.0190.00816.07
7.2.50.0290.00815.89
7.2.40.0230.00816.07
7.2.30.0270.01116.08
7.2.20.0290.00816.06
7.2.10.0240.00816.10
7.2.00.0310.00916.08
7.1.280.0100.00515.57
7.1.270.0150.00315.71
7.1.260.0090.00815.39
7.1.250.0260.00814.87
7.1.240.0250.00514.80
7.1.230.0320.00714.77
7.1.220.0230.00714.75
7.1.210.0290.00814.66
7.1.200.0280.00515.00
7.1.190.0290.00514.89
7.1.180.0360.00514.93
7.1.170.0300.00615.01
7.1.160.0290.00614.97
7.1.150.0270.00614.96
7.1.140.0400.00915.10
7.1.130.0360.00515.01
7.1.120.0370.00515.06
7.1.110.0290.01015.05
7.1.100.0290.00815.09
7.1.90.0330.00915.00
7.1.80.0330.00715.14
7.1.70.0340.00515.35
7.1.60.0320.00818.35
7.1.50.0330.01018.32
7.1.40.0230.00918.12
7.1.30.0260.00918.17
7.1.20.0290.00918.31
7.1.10.0500.00815.16
7.1.00.0240.00815.23
7.0.330.0280.00614.44
7.0.320.0420.00814.39
7.0.310.0290.00914.37
7.0.300.0230.00914.70
7.0.290.0260.00614.54
7.0.280.0370.00914.43
7.0.270.0350.00714.57
7.0.260.0330.00714.67
7.0.250.0320.00714.70
7.0.240.0370.00614.68
7.0.230.0430.00814.61
7.0.220.0410.00914.67
7.0.210.0480.00614.60
7.0.200.0300.00614.94
7.0.190.0200.01014.95
7.0.180.0200.00614.83
7.0.170.0280.00814.83
7.0.160.0190.00614.92
7.0.150.0250.00714.86
7.0.140.0200.00914.75
7.0.130.0230.00814.90
7.0.120.0210.00514.94
7.0.110.0190.00714.89
7.0.100.0180.00714.94
7.0.90.0200.00614.84
7.0.80.0190.00814.76
7.0.70.0180.00614.87
7.0.60.0530.00614.83
7.0.50.0290.00714.95
7.0.40.0200.00814.60
7.0.30.0170.00814.59
7.0.20.0190.00614.68
7.0.10.0170.00914.73
7.0.00.0180.00614.72
5.6.400.0110.00614.14
5.6.390.0050.00814.29
5.6.380.0100.00614.26
5.6.370.0140.00814.26
5.6.360.0100.00914.10
5.6.350.0130.00514.28
5.6.340.0170.00314.35
5.6.330.0140.00714.17
5.6.320.0140.00514.27
5.6.310.0120.00514.30
5.6.300.0130.00915.26
5.6.290.0110.01315.32
5.6.280.0080.01815.37
5.6.270.0120.01215.37
5.6.260.0140.01015.38
5.6.250.0090.01715.34
5.6.240.0100.01415.29
5.6.230.0110.01515.26
5.6.220.0080.01815.27
5.6.210.0100.01415.26
5.6.200.0110.01315.40
5.6.190.0120.01415.36
5.6.180.0100.01615.41
5.6.170.0080.01715.41
5.6.160.0110.01415.40
5.6.150.0100.01515.31
5.6.140.0090.01615.33
5.6.130.0070.01515.36
5.6.120.0090.01415.29
5.6.110.0130.01415.46
5.6.100.0080.01315.24
5.6.90.0110.01415.40
5.6.80.0110.01415.26
5.6.70.0080.01815.12
5.6.60.0110.01615.12
5.6.50.0120.00915.33
5.6.40.0090.01415.15
5.6.30.0100.01615.24
5.6.20.0110.01715.33
5.6.10.0080.01715.21
5.6.00.0080.02015.25
5.5.380.0050.01713.15
5.5.370.0090.01313.22
5.5.360.0080.01413.21
5.5.350.0070.01513.24
5.5.340.0100.01513.41
5.5.330.0100.01313.29
5.5.320.0120.01413.19
5.5.310.0120.01013.24
5.5.300.0140.01213.31
5.5.290.0090.01313.38
5.5.280.0120.01013.28
5.5.270.0100.01413.26
5.5.260.0120.01813.22
5.5.250.0070.01413.19
5.5.240.0090.01813.06
5.5.230.0110.01213.03
5.5.220.0080.01713.21
5.5.210.0110.01913.13
5.5.200.0090.01813.13
5.5.190.0090.01213.20
5.5.180.0120.01213.21
5.5.170.0160.00212.69
5.5.160.0120.01113.21
5.5.150.0100.01713.25
5.5.140.0080.01613.13
5.5.130.0140.01113.18
5.5.120.0080.01413.08
5.5.110.0100.02113.25
5.5.100.0100.01913.19
5.5.90.0100.01213.18
5.5.80.0140.01513.25
5.5.70.0130.01213.11
5.5.60.0100.01913.14
5.5.50.0080.01513.07
5.5.40.0080.01513.12
5.5.30.0090.01313.03
5.5.20.0090.02213.10
5.5.10.0080.01313.11
5.5.00.0120.00913.19
5.4.450.0080.01612.66
5.4.440.0060.01312.75
5.4.430.0110.01212.75
5.4.420.0090.01412.81
5.4.410.0100.01012.84
5.4.400.0090.01212.75
5.4.390.0070.01612.80
5.4.380.0110.01212.60
5.4.370.0120.01112.63
5.4.360.0110.02112.61
5.4.350.0090.01212.77
5.4.340.0090.01112.67
5.4.330.0090.00910.98
5.4.320.0120.02012.60
5.4.310.0060.01712.64
5.4.300.0070.01512.67
5.4.290.0100.01212.61
5.4.280.0070.01312.73
5.4.270.0110.01812.68
5.4.260.0090.02012.66
5.4.250.0120.01412.75
5.4.240.0110.01412.70
5.4.230.0120.00912.59
5.4.220.0110.01912.60
5.4.210.0120.01212.73
5.4.200.0100.01212.65
5.4.190.0080.01812.73
5.4.180.0090.01212.70
5.4.170.0090.01212.68
5.4.160.0070.01212.61
5.4.150.0110.01712.64
5.4.140.0070.01712.21
5.4.130.0080.01312.28
5.4.120.0070.01812.20
5.4.110.0050.01612.20
5.4.100.0060.01312.22
5.4.90.0050.01812.08
5.4.80.0080.01512.26
5.4.70.0100.01212.18
5.4.60.0080.00912.17
5.4.50.0090.01112.10
5.4.40.0080.01812.14
5.4.30.0080.01512.12
5.4.20.0100.01112.26
5.4.10.0080.01312.26
5.4.00.0090.01011.97
5.3.290.0030.01611.13
5.3.280.0060.01411.12
5.3.270.0070.01411.25
5.3.260.0070.01211.26
5.3.250.0120.00911.18
5.3.240.0080.01411.12
5.3.230.0070.01111.17
5.3.220.0100.02011.11
5.3.210.0080.01411.15
5.3.200.0050.02111.19
5.3.190.0100.01511.06
5.3.180.0060.01511.24
5.3.170.0090.01111.22
5.3.160.0050.01611.29
5.3.150.0100.01411.24
5.3.140.0090.01011.19
5.3.130.0080.01211.15
5.3.120.0080.01311.20
5.3.110.0110.01411.15
5.3.100.0080.01811.22
5.3.90.0100.01511.08
5.3.80.0090.01911.11
5.3.70.0140.01611.07
5.3.60.0070.01711.11
5.3.50.0090.01111.05
5.3.40.0110.01011.06
5.3.30.0060.01111.12
5.3.20.0060.01211.13
5.3.10.0070.01510.84
5.3.00.0070.01210.93
5.2.170.0090.00910.33
5.2.160.0070.01110.33
5.2.150.0050.01010.30
5.2.140.0060.01110.26
5.2.130.0080.00810.31
5.2.120.0060.01010.35
5.2.110.0060.01010.36
5.2.100.0060.01010.24
5.2.90.0050.01210.27
5.2.80.0050.01610.30
5.2.70.0090.01010.18
5.2.60.0080.00910.17
5.2.50.0080.01110.23
5.2.40.0050.01110.26
5.2.30.0070.00910.23
5.2.20.0050.00910.09
5.2.10.0080.00610.05
5.2.00.0050.01110.07
5.1.60.0080.01210.02
5.1.50.0070.00610.02
5.1.40.0030.01210.02
5.1.30.0060.00710.02
5.1.20.0060.00810.02
5.1.10.0030.01110.02
5.1.00.0070.01210.02
5.0.50.0080.00510.02
5.0.40.0050.01010.02
5.0.30.0040.01110.02
5.0.20.0050.00710.02
5.0.10.0070.00610.02
5.0.00.0050.01410.02
4.4.90.0060.00410.02
4.4.80.0040.00610.02
4.4.70.0020.00810.02
4.4.60.0030.00810.02
4.4.50.0040.00510.02
4.4.40.0030.01010.02
4.4.30.0030.00810.02
4.4.20.0050.00510.02
4.4.10.0050.00910.02
4.4.00.0030.00910.02
4.3.110.0060.00410.02
4.3.100.0040.00710.02
4.3.90.0030.00810.02
4.3.80.0030.00910.02
4.3.70.0050.00610.02
4.3.60.0030.00910.02
4.3.50.0040.01010.02
4.3.40.0040.00710.02
4.3.30.0020.00710.02
4.3.20.0040.01010.02
4.3.10.0010.00710.02
4.3.00.0020.00710.02

preferences:
60.07 ms | 401 KiB | 5 Q