3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($text = "Bar") { echo $text; } // Pass the function to the array. Do not use () here. $array = array( 'func' => foo ); // And call it. $array['func'](); // Outputs: "Bar" $array['func']("Foo Bar"); // Outputs: "Foo Bar"

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.0100.00716.74
8.3.50.0130.00617.48
8.3.40.0040.01819.02
8.3.30.0140.00018.70
8.3.20.0050.00318.96
8.3.10.0080.00020.48
8.3.00.0110.00719.10
8.2.180.0170.00316.75
8.2.170.0040.01122.96
8.2.160.0140.00021.04
8.2.150.0110.00724.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.25
8.2.110.0070.01022.08
8.2.100.0040.00717.84
8.2.90.0030.00517.97
8.2.80.0090.00017.97
8.2.70.0000.01317.00
8.2.60.0080.00417.91
8.2.50.0030.00618.07
8.2.40.0030.00618.22
8.2.30.0060.00318.07
8.2.20.0000.00717.62
8.2.10.0040.00417.60
8.2.00.0000.00717.64
8.1.280.0130.00325.92
8.1.270.0090.00024.66
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0000.01022.20
8.1.230.0070.00422.14
8.1.220.0000.00917.74
8.1.210.0040.00418.90
8.1.200.0000.00817.35
8.1.190.0000.00817.53
8.1.180.0080.00018.10
8.1.170.0000.00818.89
8.1.160.0000.00718.86
8.1.150.0030.00518.62
8.1.140.0040.00417.38
8.1.130.0000.00717.77
8.1.120.0040.00417.45
8.1.110.0040.00417.39
8.1.100.0070.00017.29
8.1.90.0000.00917.33
8.1.80.0050.00317.37
8.1.70.0030.00317.38
8.1.60.0050.00317.51
8.1.50.0040.00417.41
8.1.40.0040.00417.50
8.1.30.0040.00417.57
8.1.20.0060.00317.40
8.1.10.0000.00717.39
8.1.00.0080.00017.36
8.0.300.0050.00520.03
8.0.290.0040.00416.75
8.0.280.0000.00718.31
8.0.270.0030.00317.25
8.0.260.0050.00316.86
8.0.250.0090.00017.01
8.0.240.0000.00817.02
8.0.230.0040.00417.00
8.0.220.0000.00817.01
8.0.210.0000.00816.95
8.0.200.0000.00716.94
8.0.190.0040.00417.03
8.0.180.0110.00017.01
8.0.170.0090.00016.96
8.0.160.0030.00316.90
8.0.150.0080.00016.88
8.0.140.0030.00716.82
8.0.130.0070.00013.37
8.0.120.0020.00516.87
8.0.110.0000.00816.99
8.0.100.0040.00416.90
8.0.90.0000.00716.87
8.0.80.0060.01017.00
8.0.70.0060.00317.06
8.0.60.0040.00416.71
8.0.50.0000.00816.77
8.0.30.0120.00617.10
8.0.20.0060.01317.08
8.0.10.0040.00416.82
8.0.00.0090.01016.71
7.4.330.0060.00012.96
7.4.320.0000.00616.51
7.4.300.0030.00316.59
7.4.290.0000.00716.40
7.4.280.0080.00016.48
7.4.270.0040.00416.60
7.4.260.0030.00313.26
7.4.250.0000.01016.49
7.4.240.0030.00316.46
7.4.230.0000.00816.58
7.4.220.0150.01316.55
7.4.210.0070.00816.55
7.4.200.0030.00316.58
7.4.190.0070.00016.72
7.4.160.0090.00916.48
7.4.150.0060.01116.51
7.4.140.0130.00516.48
7.4.130.0110.00816.58
7.4.120.0130.00816.49
7.4.110.0100.00716.47
7.4.100.0090.00916.49
7.4.90.0100.01416.61
7.4.80.0140.00619.39
7.4.70.0060.01316.47
7.4.60.0030.02116.57
7.4.50.0060.00016.38
7.4.40.0070.01016.18
7.4.30.0030.01316.41
7.4.00.0070.01014.90
7.3.330.0000.00613.49
7.3.320.0000.00613.33
7.3.310.0000.00616.47
7.3.300.0030.00316.38
7.3.290.0180.00316.33
7.3.280.0080.01016.31
7.3.270.0120.00816.47
7.3.260.0060.01216.55
7.3.250.0140.00316.52
7.3.240.0110.00516.44
7.3.230.0080.00816.64
7.3.210.0040.01316.39
7.3.200.0030.01416.55
7.3.190.0060.01116.55
7.3.180.0030.01316.35
7.3.170.0060.01216.47
7.3.160.0080.00816.48
7.3.120.0110.00315.01
7.2.330.0060.01216.39
7.2.320.0100.01316.81
7.2.310.0050.01516.80
7.2.300.0140.00416.59
7.2.290.0170.00016.46
7.2.60.0090.00616.52
7.2.00.0030.01019.44
7.1.200.0000.01015.68
7.1.100.0030.00918.16
7.1.70.0060.00317.31
7.1.60.0070.01719.40
7.1.50.0040.01516.78
7.1.00.0070.06022.44
7.0.200.0350.00415.00
7.0.140.0000.07722.23
7.0.120.0000.07322.04
7.0.60.0070.07321.88
7.0.50.0130.08017.78
7.0.40.0100.07720.27
7.0.30.0400.07320.23
7.0.20.0300.08320.10
7.0.10.0070.09020.19
7.0.00.0070.07720.07
5.6.280.0000.07321.11
5.6.210.0130.08020.48
5.6.200.0030.09018.18
5.6.190.0070.08720.47
5.6.180.0300.07320.79
5.6.170.0370.07020.51
5.6.160.0000.04720.50
5.6.150.0100.07018.27
5.6.140.0130.07718.28
5.6.130.0070.04018.14
5.6.120.0130.07721.14
5.6.110.0100.03320.99
5.6.100.0130.06721.03
5.6.90.0130.08021.11
5.6.80.0100.05720.42
5.5.350.0100.08720.35
5.5.340.0070.07317.96
5.5.330.0030.07320.32
5.5.320.0300.05020.51
5.5.310.0400.07320.38
5.5.300.0030.05318.09
5.5.290.0030.08717.96
5.5.280.0230.06720.69
5.5.270.0000.08020.89
5.5.260.0170.04020.73
5.5.250.0030.04020.69
5.5.240.0100.04020.36
5.4.450.0100.03319.48
5.4.440.0000.05019.48
5.4.430.0070.04019.48
5.4.420.0000.05319.56
5.4.410.0030.08019.17
5.4.400.0230.05319.12
5.4.390.0070.05019.20
5.4.380.0100.07018.89
5.4.370.0100.06019.25
5.4.360.0000.06019.20
5.4.350.0000.04319.15
5.4.340.0100.05719.22
5.4.320.0070.04719.16
5.4.310.0070.08018.92
5.4.300.0170.04018.92
5.4.290.0170.06719.24
5.4.280.0130.06719.14
5.4.270.0070.06719.11
5.4.260.0130.03719.15
5.4.250.0200.06719.20
5.4.240.0030.04718.83
5.4.230.0070.06319.23
5.4.220.0070.07718.91
5.4.210.0130.03719.14
5.4.200.0030.07019.25
5.4.190.0170.06319.15
5.4.180.0000.05019.23
5.4.170.0130.03319.23
5.4.160.0000.05019.23
5.4.150.0030.08019.22
5.4.140.0070.03316.42
5.4.130.0070.04316.39
5.4.120.0070.06716.42
5.4.110.0100.07016.46
5.4.100.0070.04016.41
5.4.90.0070.04016.30
5.4.80.0000.04016.45
5.4.70.0100.06316.35
5.4.60.0170.06316.33
5.4.50.0100.07316.41
5.4.40.0130.03016.43
5.4.30.0070.05316.31
5.4.20.0100.04316.38
5.4.10.0100.05716.46
5.4.00.0070.04015.77
5.3.290.0130.06714.65
5.3.280.0100.05314.75
5.3.270.0100.06014.75
5.3.260.0070.07714.61
5.3.250.0000.07314.61
5.3.240.0030.06314.61
5.3.230.0170.06014.63
5.3.220.0000.04714.56
5.3.210.0100.07314.57
5.3.200.0030.05014.63
5.3.190.0070.03314.48
5.3.180.0070.04714.57
5.3.170.0030.04714.59
5.3.160.0070.04314.57
5.3.150.0170.06314.59
5.3.140.0100.05714.71
5.3.130.0070.08314.61
5.3.120.0070.06714.58
5.3.110.0100.07014.60
5.3.100.0030.05014.20
5.3.90.0070.07314.16
5.3.80.0000.06314.04
5.3.70.0170.06314.07
5.3.60.0100.07013.95
5.3.50.0070.04713.89
5.3.40.0070.04313.99
5.3.30.0070.07013.94
5.3.20.0070.04313.73
5.3.10.0170.06013.71
5.3.00.0030.04013.69
5.2.170.0030.06011.07
5.2.160.0030.05011.22
5.2.150.0030.03711.20
5.2.140.0030.06011.17
5.2.130.0100.04011.10
5.2.120.0070.04311.11
5.2.110.0200.02011.10
5.2.100.0100.02311.14
5.2.90.0100.06011.14
5.2.80.0100.05711.12
5.2.70.0170.03311.05
5.2.60.0030.03311.10
5.2.50.0000.03711.01
5.2.40.0200.04711.00
5.2.30.0070.06011.02
5.2.20.0100.03310.91
5.2.10.0030.03011.02
5.2.00.0000.04310.74
5.1.60.0070.0339.97
5.1.50.0100.04710.05
5.1.40.0030.0379.88
5.1.30.0070.06010.30
5.1.20.0100.04710.41
5.1.10.0030.05010.09
5.1.00.0070.04310.11
5.0.50.0000.0238.51
5.0.40.0070.0438.38
5.0.30.0030.0338.20
5.0.20.0070.0378.21
5.0.10.0100.0378.17
5.0.00.0030.0638.07
4.4.90.0000.0237.82
4.4.80.0030.0137.82
4.4.70.0000.0337.82
4.4.60.0000.0237.82
4.4.50.0030.0137.82
4.4.40.0100.0377.82
4.4.30.0000.0277.82
4.4.20.0000.0237.82
4.4.10.0070.0277.82
4.4.00.0000.0307.82
4.3.110.0000.0377.82
4.3.100.0030.0237.82
4.3.90.0000.0377.82
4.3.80.0000.0277.82
4.3.70.0000.0237.82
4.3.60.0070.0337.82
4.3.50.0030.0337.82
4.3.40.0100.0337.82
4.3.30.0000.0337.82
4.3.20.0000.0207.82
4.3.10.0000.0377.82
4.3.00.0030.0237.82

preferences:
49.3 ms | 401 KiB | 5 Q