3v4l.org

run code in 300+ PHP versions simultaneously
<?php class NestedFunctions { public function fn1() { function nested_fn() { echo 'yay' . "\n"; } nested_fn(); } public function fn2() { nested_fn(); } } $nested = new NestedFunctions(); $nested->fn1(); $nested->fn2();

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.0000.01518.14
8.3.50.0120.00722.11
8.3.40.0050.01018.61
8.3.30.0120.00318.73
8.3.20.0080.00020.58
8.3.10.0050.00321.09
8.3.00.0030.00523.61
8.2.180.0180.00016.50
8.2.170.0040.01122.96
8.2.160.0080.00620.44
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0050.00321.19
8.2.110.0040.00422.11
8.2.100.0060.00619.23
8.2.90.0080.00017.91
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0030.00517.75
8.2.50.0040.00417.63
8.2.40.0040.00418.05
8.2.30.0060.00619.41
8.2.20.0080.00317.64
8.2.10.0040.00617.53
8.2.00.0050.00717.59
8.1.280.0150.00325.92
8.1.270.0040.00423.99
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0040.00423.92
8.1.230.0110.00020.98
8.1.220.0070.00017.79
8.1.210.0030.00518.77
8.1.200.0000.00917.41
8.1.190.0050.00517.10
8.1.180.0000.00818.10
8.1.170.0060.00317.62
8.1.160.0030.00818.12
8.1.150.0090.00018.04
8.1.140.0040.00717.40
8.1.130.0050.00717.53
8.1.120.0060.00617.42
8.1.110.0070.00417.43
8.1.100.0120.00017.43
8.1.90.0090.00217.45
8.1.80.0070.00517.46
8.1.70.0060.00617.39
8.1.60.0080.00517.55
8.1.50.0060.00617.43
8.1.40.0120.00117.58
8.1.30.0110.00217.60
8.1.20.0110.00117.59
8.1.10.0120.00117.49
8.1.00.0080.00017.46
8.0.300.0030.00320.07
8.0.290.0040.00416.75
8.0.280.0050.00317.59
8.0.270.0050.00317.05
8.0.260.0050.00616.85
8.0.250.0050.00516.94
8.0.240.0030.00516.89
8.0.230.0080.00116.89
8.0.220.0080.00316.80
8.0.210.0120.00016.80
8.0.200.0050.00616.82
8.0.190.0060.00516.90
8.0.180.0070.00616.85
8.0.170.0070.00416.82
8.0.160.0080.00316.85
8.0.150.0080.00416.83
8.0.140.0050.00616.81
8.0.130.0080.00114.96
8.0.120.0060.00416.83
8.0.110.0060.00416.77
8.0.100.0050.00516.78
8.0.90.0070.00316.80
8.0.80.0080.00916.80
8.0.70.0070.00416.84
8.0.60.0090.00216.76
8.0.50.0050.00516.76
8.0.30.0100.00717.12
8.0.20.0100.00817.20
8.0.10.0070.00416.88
8.0.00.0130.00516.90
7.4.330.0020.00416.22
7.4.320.0050.00716.43
7.4.300.0040.00716.40
7.4.290.0080.00416.45
7.4.280.0070.00816.52
7.4.270.0050.00616.52
7.4.260.0080.00314.89
7.4.250.0090.00316.38
7.4.240.0040.00716.48
7.4.230.0110.00016.40
7.4.220.0070.01016.56
7.4.210.0060.00916.53
7.4.200.0100.00016.46
7.4.190.0020.00916.54
7.4.180.0110.00316.51
7.4.160.0100.00516.59
7.4.150.0120.00616.88
7.4.140.0060.01017.39
7.4.130.0120.00316.46
7.4.120.0090.00716.49
7.4.110.0070.00816.45
7.4.100.0160.00016.49
7.4.90.0070.00916.43
7.4.80.0130.00417.91
7.4.70.0080.00716.33
7.4.60.0070.00716.48
7.4.50.0050.00616.39
7.4.40.0040.01019.50
7.4.30.0060.01016.39
7.4.20.0060.00916.31
7.4.10.0130.00016.41
7.4.00.0060.00815.52
7.3.330.0040.00514.70
7.3.320.0040.00614.71
7.3.310.0060.00516.26
7.3.300.0040.00716.23
7.3.290.0120.00516.14
7.3.280.0070.00916.33
7.3.270.0120.00316.78
7.3.260.0100.00717.70
7.3.250.0110.00416.40
7.3.240.0040.01216.28
7.3.230.0090.00916.23
7.3.220.0140.00016.04
7.3.210.0050.01116.33
7.3.200.0120.00417.74
7.3.190.0120.00616.29
7.3.180.0100.00716.30
7.3.170.0080.00616.34
7.3.160.0080.00816.29
7.3.150.0050.00916.08
7.3.140.0100.00316.22
7.3.130.0090.00516.04
7.3.120.0060.00715.49
7.3.110.0130.00115.42
7.3.100.0080.00515.29
7.3.90.0070.00915.54
7.3.80.0050.00915.63
7.3.70.0050.00815.36
7.3.60.0110.00315.59
7.3.50.0100.00515.58
7.3.40.0080.00715.54
7.3.30.0080.00715.56
7.3.20.0100.00516.34
7.3.10.0110.00316.25
7.3.00.0110.00316.44
7.2.340.0090.00516.30
7.2.330.0110.00616.32
7.2.320.0060.01316.45
7.2.310.0080.00816.42
7.2.300.0080.00716.34
7.2.290.0050.00916.35
7.2.280.0040.00916.27
7.2.270.0070.00716.14
7.2.260.0130.00016.30
7.2.250.0050.00915.67
7.2.240.0080.00715.55
7.2.230.0130.00115.62
7.2.220.0100.00515.43
7.2.210.0100.00515.70
7.2.200.0090.00615.70
7.2.190.0100.00615.67
7.2.180.0110.00715.64
7.2.170.0070.00915.59
7.2.160.0090.00715.72
7.2.150.0070.00816.76
7.2.140.0130.00216.72
7.2.130.0090.00616.76
7.2.120.0100.00516.69
7.2.110.0090.00516.72
7.2.100.0080.00516.55
7.2.90.0110.00516.76
7.2.80.0060.00816.69
7.2.70.0100.00416.73
7.2.60.0080.00916.84
7.2.50.0100.00616.83
7.2.40.0080.00816.74
7.2.30.0080.00616.72
7.2.20.0080.00516.70
7.2.10.0090.00616.76
7.2.00.0100.00516.77
7.1.330.0090.00415.53
7.1.320.0100.00615.40
7.1.310.0110.00515.43
7.1.300.0070.00715.54
7.1.290.0100.00715.47
7.1.280.0080.00515.48
7.1.270.0060.00715.33
7.1.260.0110.01015.45
7.1.250.0110.00415.42
7.1.240.0100.00515.55
7.1.230.0080.00615.60
7.1.220.0100.00615.48
7.1.210.0130.00515.44
7.1.200.0100.00515.52
7.1.190.0070.00815.43
7.1.180.0090.00715.59
7.1.170.0050.01015.51
7.1.160.0070.00915.59
7.1.150.0150.00315.41
7.1.140.0120.00515.45
7.1.130.0080.01115.56
7.1.120.0090.00615.57
7.1.110.0100.00515.37
7.1.100.0090.00616.16
7.1.90.0110.00515.33
7.1.80.0120.00915.46
7.1.70.0070.00715.90
7.1.60.0110.00716.48
7.1.50.0080.00915.86
7.1.40.0120.00515.53
7.1.30.0090.00715.48
7.1.20.0060.00715.41
7.1.10.0070.00715.57
7.1.00.0070.01417.24
7.0.330.0120.00315.08
7.0.320.0090.00415.21
7.0.310.0140.00315.23
7.0.300.0110.00414.96
7.0.290.0090.00414.89
7.0.280.0090.00415.17
7.0.270.0080.00615.00
7.0.260.0090.00615.18
7.0.250.0110.00415.24
7.0.240.0200.00515.26
7.0.230.0090.00815.29
7.0.220.0080.00715.16
7.0.210.0140.00215.14
7.0.200.0100.00415.52
7.0.190.0130.00515.18
7.0.180.0100.00515.20
7.0.170.0090.00615.26
7.0.160.0090.00615.11
7.0.150.0130.00215.15
7.0.140.0070.02316.89
7.0.130.0100.00515.05
7.0.120.0060.00715.25
7.0.110.0100.02116.41
7.0.100.0080.02416.36
7.0.90.0090.01616.34
7.0.80.0080.01516.32
7.0.70.0100.01216.39
7.0.60.0090.01616.32
7.0.50.0100.01416.33
7.0.40.0090.01715.91
7.0.30.0080.01715.81
7.0.20.0050.01915.78
7.0.10.0040.02015.75
7.0.00.0080.01715.83
5.6.400.0120.00515.03
5.6.390.0130.00415.18
5.6.380.0090.00714.78
5.6.370.0070.00814.75
5.6.360.0110.00614.77
5.6.350.0060.00814.84
5.6.340.0070.00814.84
5.6.330.0080.00814.84
5.6.320.0110.00514.69
5.6.310.0140.00314.80
5.6.300.0150.00214.64
5.6.290.0100.00714.81
5.6.280.0090.02016.30
5.6.270.0050.01014.79
5.6.260.0090.01616.22
5.6.250.0080.01416.24
5.6.240.0110.01616.21
5.6.230.0100.02116.35
5.6.220.0080.02116.31
5.6.210.0060.02316.13
5.6.200.0090.01416.32
5.6.190.0100.01516.27
5.6.180.0110.01216.28
5.6.170.0080.01516.27
5.6.160.0090.01516.26
5.6.150.0090.02516.18
5.6.140.0080.02516.39
5.6.130.0080.01516.22
5.6.120.0080.02216.28
5.6.110.0100.01816.28
5.6.100.0050.03016.15
5.6.90.0130.01816.16
5.6.80.0080.02416.09
5.6.70.0060.01816.07
5.6.60.0090.02016.06
5.6.50.0050.01816.06
5.6.40.0110.01716.04
5.6.30.0070.01816.00
5.6.20.0080.01516.11
5.6.10.0090.01716.02
5.6.00.0060.01615.96
5.5.380.0090.02114.71
5.5.370.0080.01914.68
5.5.360.0060.01914.64
5.5.350.0050.02014.58
5.5.340.0060.01514.78
5.5.330.0090.01214.67
5.5.320.0070.01214.76
5.5.310.0050.01714.88
5.5.300.0110.01614.73
5.5.290.0070.01614.81
5.5.280.0040.01914.80
5.5.270.0080.01614.85
5.5.260.0100.01514.85
5.5.250.0080.01914.70
5.5.240.0070.02314.67
5.5.230.0080.01514.70
5.5.220.0080.01414.67
5.5.210.0080.01514.63
5.5.200.0080.01414.65
5.5.190.0090.02214.56
5.5.180.0050.01714.63
5.5.170.0060.00913.71
5.5.160.0050.01714.64
5.5.150.0070.02114.54
5.5.140.0080.01114.66
5.5.130.0090.01714.65
5.5.120.0070.01814.65
5.5.110.0080.01314.71
5.5.100.0070.01614.65
5.5.90.0090.01114.55
5.5.80.0070.01614.64
5.5.70.0080.01514.54
5.5.60.0090.01114.50
5.5.50.0060.01414.59
5.5.40.0060.01314.62
5.5.30.0060.01314.55
5.5.20.0090.01114.61
5.5.10.0080.01214.51
5.5.00.0080.01214.48
5.4.450.0090.01914.40
5.4.440.0050.01414.40
5.4.430.0060.01514.40
5.4.420.0080.01114.27
5.4.410.0060.02214.29
5.4.400.0040.02014.23
5.4.390.0090.01114.27
5.4.380.0070.01814.18
5.4.370.0090.01014.20
5.4.360.0070.01214.23
5.4.350.0070.01514.17
5.4.340.0050.02214.22
5.4.330.0080.00412.46
5.4.320.0050.01514.21
5.4.310.0090.02014.29
5.4.300.0040.01514.27
5.4.290.0040.01514.25
5.4.280.0050.01214.20
5.4.270.0060.01514.26
5.4.260.0050.01314.23
5.4.250.0040.01714.24
5.4.240.0080.01214.25
5.4.230.0060.01514.31
5.4.220.0080.01014.20
5.4.210.0070.01214.25
5.4.200.0060.01214.16
5.4.190.0040.01314.22
5.4.180.0080.01214.22
5.4.170.0080.01014.16
5.4.160.0050.01114.22
5.4.150.0110.00714.17
5.4.140.0040.01313.61
5.4.130.0080.00913.53
5.4.120.0050.01213.65
5.4.110.0100.00813.49
5.4.100.0040.01213.62
5.4.90.0040.01113.62
5.4.80.0070.00913.57
5.4.70.0070.01213.53
5.4.60.0020.01513.52
5.4.50.0060.01013.59
5.4.40.0060.01513.57
5.4.30.0090.00813.56
5.4.20.0040.01413.64
5.4.10.0060.02213.62
5.4.00.0100.01413.34
5.3.290.0040.02213.00
5.3.280.0070.01212.92
5.3.270.0040.01212.99
5.3.260.0060.01313.09
5.3.250.0070.01012.99
5.3.240.0060.01112.98
5.3.230.0050.01413.04
5.3.220.0050.01212.94
5.3.210.0050.01112.88
5.3.200.0090.00812.95
5.3.190.0070.01012.98
5.3.180.0070.01012.99
5.3.170.0060.01212.99
5.3.160.0060.01413.01
5.3.150.0080.00912.98
5.3.140.0040.01312.91
5.3.130.0070.01112.95
5.3.120.0050.01912.96
5.3.110.0100.01012.98
5.3.100.0080.01012.84
5.3.90.0040.01312.85
5.3.80.0060.01912.79
5.3.70.0060.00912.83
5.3.60.0020.01412.81
5.3.50.0070.01712.84
5.3.40.0070.01212.82
5.3.30.0070.01012.75
5.3.20.0040.01212.78
5.3.10.0040.01212.66
5.3.00.0080.01112.64

preferences:
72.73 ms | 401 KiB | 5 Q