3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ public static function Bar($num){ $num*=50; } } $functionname = "Foo::Bar"; $num = 3; echo 'call_user_func_array: '; call_user_func_array($functionname, array(&$num)); echo $num; echo "\n"; $num = 3; echo "other way: "; if (stristr($functionname, '::') !== false) { list($class, $function) = explode('::', $functionname); $class::$function($num); } else { $functionname($num); } echo $num;

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.00916.50
8.3.50.0060.01221.91
8.3.40.0070.00719.01
8.3.30.0120.00319.18
8.3.20.0070.00020.39
8.3.10.0040.00423.48
8.3.00.0030.00620.52
8.2.180.0070.00718.41
8.2.170.0090.00618.95
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00422.11
8.2.110.0070.00322.08
8.2.100.0060.00617.72
8.2.90.0030.00518.03
8.2.80.0050.00317.97
8.2.70.0060.00317.75
8.2.60.0090.00018.04
8.2.50.0060.00318.07
8.2.40.0050.00318.22
8.2.30.0040.00418.04
8.2.20.0030.00517.83
8.2.10.0030.00617.68
8.2.00.0000.00817.74
8.1.280.0110.00425.92
8.1.270.0030.00524.66
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0070.01422.46
8.1.230.0060.00620.92
8.1.220.0040.00417.74
8.1.210.0080.00018.95
8.1.200.0030.00617.35
8.1.190.0030.00517.54
8.1.180.0030.00518.10
8.1.170.0000.01018.55
8.1.160.0040.00422.00
8.1.150.0000.00718.63
8.1.140.0040.00417.45
8.1.130.0030.00317.71
8.1.120.0070.00017.41
8.1.110.0070.00017.38
8.1.100.0040.00417.46
8.1.90.0040.00417.50
8.1.80.0000.00817.38
8.1.70.0000.00717.29
8.1.60.0050.00317.59
8.1.50.0030.00617.42
8.1.40.0040.00417.41
8.1.30.0000.00817.65
8.1.20.0050.00317.60
8.1.10.0050.00217.43
8.1.00.0050.00217.53
8.0.300.0030.00519.93
8.0.290.0000.00717.05
8.0.280.0030.00318.44
8.0.270.0030.00317.19
8.0.260.0060.00016.77
8.0.250.0030.00316.96
8.0.240.0040.00416.98
8.0.230.0000.00716.93
8.0.220.0050.00216.80
8.0.210.0030.00316.86
8.0.200.0040.00416.96
8.0.190.0040.00416.93
8.0.180.0080.00016.88
8.0.170.0030.00616.88
8.0.160.0040.00416.91
8.0.150.0000.00716.80
8.0.140.0030.00716.76
8.0.130.0060.00013.31
8.0.120.0000.00716.89
8.0.110.0050.00316.87
8.0.100.0040.00416.89
8.0.90.0040.00416.75
8.0.80.0130.00316.88
8.0.70.0020.00516.77
8.0.60.0000.01017.01
8.0.50.0070.00016.84
8.0.30.0110.01117.03
8.0.20.0080.01117.40
8.0.10.0000.00816.97
8.0.00.0090.01316.56
7.4.330.0030.00315.09
7.4.320.0000.00616.46
7.4.300.0040.00416.53
7.4.290.0060.00016.52
7.4.280.0000.00716.60
7.4.270.0000.00716.50
7.4.260.0070.00416.42
7.4.250.0040.00416.56
7.4.240.0020.00516.54
7.4.230.0030.00316.44
7.4.220.0110.00716.54
7.4.210.0060.01016.65
7.4.200.0000.00716.34
7.4.190.0030.00516.47
7.4.160.0190.00416.27
7.4.150.0070.01117.40
7.4.140.0140.00617.86
7.4.130.0110.00616.48
7.4.120.0120.00816.63
7.4.110.0110.00716.52
7.4.100.0040.02016.51
7.4.90.0170.00016.63
7.4.80.0120.00916.64
7.4.70.0030.01416.56
7.4.60.0100.00716.64
7.4.50.0090.00016.31
7.4.40.0100.00622.77
7.4.30.0130.00316.66
7.4.00.0030.01214.73
7.3.330.0060.00013.23
7.3.320.0000.00613.36
7.3.310.0060.00016.39
7.3.300.0000.00716.38
7.3.290.0090.00616.35
7.3.280.0110.00516.35
7.3.270.0100.00717.40
7.3.260.0070.01016.42
7.3.250.0090.00816.54
7.3.240.0030.01316.38
7.3.230.0080.00816.56
7.3.210.0070.01016.48
7.3.200.0180.00019.39
7.3.190.0100.00816.48
7.3.180.0040.01216.73
7.3.170.0060.00916.52
7.3.160.0100.00616.48
7.3.120.0060.01014.66
7.3.00.0130.00216.63
7.2.330.0210.00316.43
7.2.320.0040.01316.53
7.2.310.0040.02016.75
7.2.300.0100.00616.67
7.2.290.0060.00916.79
7.2.130.0070.00716.63
7.2.120.0110.00616.80
7.2.110.0110.01016.71
7.2.100.0100.00816.88
7.2.90.0070.01316.84
7.2.80.0150.00416.79
7.2.70.0130.00616.79
7.2.60.0070.01016.81
7.2.50.0070.01217.00
7.2.40.0050.01116.96
7.2.30.0130.00716.77
7.2.20.0070.01116.86
7.2.10.0100.01016.86
7.2.00.0110.00716.84
7.1.250.0100.00615.78
7.1.240.0070.01115.87
7.1.230.0040.00815.81
7.1.220.0110.00615.58
7.1.210.0080.01115.82
7.1.200.0090.01115.70
7.1.190.0080.00815.82
7.1.180.0160.00315.76
7.1.170.0080.00715.60
7.1.160.0090.00715.85
7.1.150.0050.00915.65
7.1.140.0170.00215.58
7.1.130.0090.00915.60
7.1.120.0090.00915.57
7.1.110.0120.00515.81
7.1.100.0090.00915.56
7.1.90.0120.00615.76
7.1.80.0120.00715.75
7.1.70.0090.01016.17
7.1.60.0120.00816.84
7.1.50.0150.00416.16
7.1.40.0100.00615.81
7.1.30.0120.00515.79
7.1.20.0080.00715.75
7.1.10.0070.00815.80
7.1.00.0060.03317.92
7.0.330.0080.00715.28
7.0.320.0060.00615.30
7.0.310.0090.00715.30
7.0.300.0080.00915.30
7.0.290.0080.01115.28
7.0.280.0090.00715.28
7.0.270.0120.00815.24
7.0.260.0130.00015.13
7.0.250.0080.00615.28
7.0.240.0130.00515.31
7.0.230.0140.00315.48
7.0.220.0100.00715.29
7.0.210.0090.01015.51
7.0.200.0120.00815.80
7.0.190.0120.00615.35
7.0.180.0060.00915.21
7.0.170.0090.00715.13
7.0.160.0080.00715.21
7.0.150.0100.00815.19
7.0.140.0090.03017.65
7.0.130.0090.00715.41
7.0.120.0080.00615.39
7.0.110.0060.00815.29
7.0.100.0070.03516.90
7.0.90.0100.03017.00
7.0.80.0080.02916.88
7.0.70.0090.02816.92
7.0.60.0080.02516.87
7.0.50.0160.03116.98
7.0.40.0060.02715.63
7.0.30.0040.03215.67
7.0.20.0080.02215.47
7.0.10.0060.03015.56
7.0.00.0050.02115.55
5.6.380.0100.00314.27
5.6.370.0060.00914.40
5.6.360.0030.01114.24
5.6.350.0100.00514.14
5.6.340.0090.00514.24
5.6.330.0040.00714.19
5.6.320.0050.00714.06
5.6.310.0090.00814.24
5.6.300.0040.01114.20
5.6.290.0020.00914.67
5.6.280.0100.02316.50
5.6.270.0040.01114.43
5.6.260.0030.01114.20
5.6.250.0060.03316.27
5.6.240.0060.03116.48
5.6.230.0070.03216.37
5.6.220.0060.03016.30
5.6.210.0100.02816.50
5.6.200.0090.02816.49
5.6.190.0060.02816.48
5.6.180.0060.03316.53
5.6.170.0060.03116.39
5.6.160.0050.03016.49
5.6.150.0070.02916.44
5.6.140.0090.03016.38
5.6.130.0060.02916.45
5.6.120.0030.03016.38
5.6.110.0060.01916.38
5.6.100.0060.02116.35
5.6.90.0050.02216.55
5.6.80.0100.02416.19
5.6.70.0070.03016.24
5.6.60.0080.02316.28
5.6.50.0040.03016.08
5.6.40.0050.01716.18
5.6.30.0070.02216.28
5.6.20.0060.03116.21
5.6.10.0070.01616.18
5.6.00.0060.01716.25
5.5.380.0070.02614.14
5.5.370.0070.02814.20
5.5.360.0040.03314.20
5.5.350.0030.03414.09
5.5.340.0060.02114.42
5.5.330.0020.03414.32
5.5.320.0010.03314.28
5.5.310.0030.02814.35
5.5.300.0040.02814.17
5.5.290.0040.03214.40
5.5.280.0040.02814.32
5.5.270.0080.01614.47
5.5.260.0070.02914.31
5.5.250.0060.02814.18
5.5.240.0040.03114.07
5.5.230.0080.02114.19
5.5.220.0040.02814.02
5.5.210.0040.02814.01
5.5.200.0090.02414.08
5.5.190.0030.02614.25
5.5.180.0040.02514.00
5.5.170.0060.00511.00
5.5.160.0070.02413.97
5.5.150.0050.02913.97
5.5.140.0070.02314.09
5.5.130.0050.02413.99
5.5.120.0020.01913.88
5.5.110.0040.02614.03
5.5.100.0040.03014.04
5.5.90.0060.02113.96
5.5.80.0090.02513.97
5.5.70.0090.01214.02
5.5.60.0080.01414.15
5.5.50.0060.02813.88
5.5.40.0080.02514.22
5.5.30.0030.02214.03
5.5.20.0050.02113.97
5.5.10.0050.02714.06
5.5.00.0040.03014.18
5.4.450.0070.01813.92
5.4.440.0040.02613.75
5.4.430.0040.03013.83
5.4.420.0030.03213.69
5.4.410.0050.03113.76
5.4.400.0060.02313.65
5.4.390.0050.01313.66
5.4.380.0070.01813.68
5.4.370.0080.02713.64
5.4.360.0040.03013.85
5.4.350.0070.03013.97
5.4.340.0040.03113.58
5.4.330.0060.00511.01
5.4.320.0090.02313.73
5.4.310.0090.02913.81
5.4.300.0060.01513.71
5.4.290.0040.03013.62
5.4.280.0100.02513.64
5.4.270.0060.02613.63
5.4.260.0040.01713.56
5.4.250.0030.03013.66
5.4.240.0070.02513.65
5.4.230.0040.02813.66
5.4.220.0030.02813.63
5.4.210.0050.02813.58
5.4.200.0040.01613.59
5.4.190.0040.01713.60
5.4.180.0080.02313.54
5.4.170.0080.01313.45
5.4.160.0030.02613.54
5.4.150.0080.02713.62
5.4.140.0050.02812.52
5.4.130.0040.02512.75
5.4.120.0040.02912.67
5.4.110.0040.02912.74
5.4.100.0050.02412.69
5.4.90.0050.01512.68
5.4.80.0070.02512.77
5.4.70.0060.02512.65
5.4.60.0070.01212.70
5.4.50.0050.01512.81
5.4.40.0040.02612.71
5.4.30.0060.02612.73
5.4.20.0090.02412.65
5.4.10.0040.01812.82
5.4.00.0070.02412.64
5.3.290.0050.03112.11
5.3.280.0070.02612.03
5.3.270.0030.02811.92
5.3.260.0060.01812.03
5.3.250.0080.01512.13
5.3.240.0020.02812.06
5.3.230.0100.02412.06
5.3.220.0050.03011.99
5.3.210.0060.02811.99
5.3.200.0070.01311.99
5.3.190.0050.02712.03
5.3.180.0050.02711.98
5.3.170.0030.03312.05
5.3.160.0080.02412.02
5.3.150.0050.02611.98
5.3.140.0070.02112.11
5.3.130.0020.03012.01
5.3.120.0040.01711.92
5.3.110.0020.02911.96
5.3.100.0050.02711.83
5.3.90.0030.03411.87
5.3.80.0050.03011.73
5.3.70.0040.02411.82
5.3.60.0060.02611.86
5.3.50.0080.02211.81
5.3.40.0010.03211.78
5.3.30.0070.02011.84
5.3.20.0070.02411.64
5.3.10.0040.02411.72
5.3.00.0060.02011.60
5.2.170.0030.02410.80
5.2.160.0050.02210.73
5.2.150.0030.02210.77
5.2.140.0070.02010.79
5.2.130.0030.02310.77
5.2.120.0070.01110.71
5.2.110.0060.02110.79
5.2.100.0020.02510.70
5.2.90.0020.02110.73
5.2.80.0050.02010.79
5.2.70.0040.01510.77
5.2.60.0020.01810.75
5.2.50.0070.01910.74
5.2.40.0020.01510.69
5.2.30.0050.01710.73
5.2.20.0020.01610.69
5.2.10.0050.02310.66
5.2.00.0060.02210.65
5.1.60.0020.02110.42
5.1.50.0020.02210.41
5.1.40.0030.01110.38
5.1.30.0040.01510.47
5.1.20.0050.02210.46
5.1.10.0040.01210.35
5.1.00.0030.01410.43
5.0.50.0060.0159.90
5.0.40.0030.0079.81
5.0.30.0020.0219.76
5.0.20.0030.0159.82
5.0.10.0040.0139.79
5.0.00.0020.0229.78
4.4.90.0040.0129.76
4.4.80.0020.0099.76
4.4.70.0010.0159.76
4.4.60.0010.0119.76
4.4.50.0030.0129.76
4.4.40.0020.0119.76
4.4.30.0030.0109.76
4.4.20.0020.0089.76
4.4.10.0020.0069.76
4.4.00.0010.0209.76
4.3.110.0030.0139.76
4.3.100.0020.0099.76
4.3.90.0030.0129.76
4.3.80.0040.0199.76
4.3.70.0010.0079.76
4.3.60.0020.0129.76
4.3.50.0010.0129.76
4.3.40.0060.0099.76
4.3.30.0010.0159.76
4.3.20.0010.0089.76
4.3.10.0020.0129.76
4.3.00.0010.0149.76

preferences:
47.64 ms | 401 KiB | 5 Q