3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bench { private $closure; public function __construct() { $this->closure = function ($foo) {}; } /** * @iterations 100000 */ public function nativeCall() { $this->closure->__invoke('test'); } /** * @iterations 100000 */ public function callUserFuncCall() { call_user_func($this->closure, 'test'); } } $bench = new Bench(); for($i=0;$i != 100000;$i++){ $bench->nativeCall(); }

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.0070.02418.20
8.3.50.0080.02621.92
8.3.40.0070.02318.84
8.3.30.0090.01618.86
8.3.20.0030.01020.31
8.3.10.0070.00723.71
8.3.00.0030.01019.22
8.2.180.0200.01616.75
8.2.170.0090.01622.96
8.2.160.0120.01222.10
8.2.150.0130.02024.18
8.2.140.0040.01124.66
8.2.130.0070.00726.16
8.2.120.0040.01121.04
8.2.110.0060.01220.52
8.2.100.0090.01517.84
8.2.90.0030.01617.50
8.2.80.0030.01618.78
8.2.70.0030.01718.03
8.2.60.0060.01318.22
8.2.50.0060.01218.10
8.2.40.0070.01019.33
8.2.30.0030.01619.21
8.2.20.0030.01617.61
8.2.10.0060.01318.18
8.2.00.0060.01217.66
8.1.280.0130.01325.92
8.1.270.0030.01118.84
8.1.260.0000.01426.35
8.1.250.0030.01028.09
8.1.240.0070.01323.91
8.1.230.0060.01620.92
8.1.220.0080.01117.74
8.1.210.0030.01718.77
8.1.200.0030.01717.36
8.1.190.0030.01617.38
8.1.180.0060.01318.97
8.1.170.0060.01318.65
8.1.160.0060.01318.89
8.1.150.0060.01218.86
8.1.140.0030.01517.47
8.1.130.0030.01417.73
8.1.120.0000.01917.52
8.1.110.0040.01417.43
8.1.100.0000.01717.51
8.1.90.0060.01217.51
8.1.80.0030.01517.46
8.1.70.0040.01517.50
8.1.60.0060.01517.59
8.1.50.0000.02017.48
8.1.40.0070.01317.54
8.1.30.0070.01417.55
8.1.20.0040.01517.55
8.1.10.0000.02017.39
8.1.00.0040.01617.42
8.0.300.0000.02018.77
8.0.290.0060.01316.75
8.0.280.0030.01518.29
8.0.270.0000.01817.10
8.0.260.0000.01817.19
8.0.250.0000.01816.80
8.0.240.0060.01316.78
8.0.230.0070.01316.88
8.0.220.0000.01816.76
8.0.210.0000.01816.81
8.0.200.0070.01116.95
8.0.190.0080.01217.00
8.0.180.0060.01216.94
8.0.170.0000.01916.93
8.0.160.0040.01516.86
8.0.150.0060.01916.87
8.0.140.0060.01616.92
8.0.130.0000.01713.27
8.0.120.0030.02016.88
8.0.110.0040.01516.85
8.0.100.0030.01616.87
8.0.90.0000.01916.84
8.0.80.0100.04016.86
8.0.70.0040.01516.71
8.0.60.0030.01516.85
8.0.50.0040.01516.88
8.0.30.0080.03817.09
8.0.20.0080.04217.40
8.0.10.0070.01417.05
8.0.00.0130.02116.71
7.4.330.0070.01015.09
7.4.320.0060.01016.51
7.4.300.0070.01016.63
7.4.290.0030.01516.42
7.4.280.0000.01916.50
7.4.270.0000.01716.51
7.4.260.0100.01316.49
7.4.250.0030.01616.46
7.4.240.0030.01516.55
7.4.230.0000.02016.68
7.4.220.0100.02616.38
7.4.210.0070.03616.67
7.4.200.0090.00916.62
7.4.160.0130.01716.36
7.4.150.0080.03217.40
7.4.140.0080.03217.86
7.4.130.0120.02916.52
7.4.120.0090.02216.53
7.4.110.0110.04016.44
7.4.100.0100.02616.50
7.4.90.0110.02116.51
7.4.80.0120.03719.39
7.4.70.0090.02516.58
7.4.60.0060.02716.54
7.4.50.0000.02316.34
7.4.40.0140.01816.59
7.4.30.0090.02816.56
7.4.00.0050.02514.85
7.3.330.0070.01013.16
7.3.320.0030.01413.24
7.3.310.0030.01516.28
7.3.300.0040.01516.18
7.3.290.0060.02316.33
7.3.280.0090.02816.26
7.3.270.0180.02517.40
7.3.260.0110.02216.41
7.3.250.0090.03416.43
7.3.240.0130.01916.40
7.3.230.0070.03116.39
7.3.210.0120.04016.38
7.3.200.0070.02719.39
7.3.190.0040.02816.47
7.3.180.0120.01916.23
7.3.170.0090.02416.31
7.3.160.0060.02416.50
7.3.120.0030.03914.79
7.3.110.0070.03714.91
7.3.100.0030.02114.86
7.3.90.0100.02014.58
7.3.80.0070.01814.70
7.3.70.0030.02414.88
7.3.60.0030.02614.93
7.3.50.0030.02514.61
7.3.40.0090.01514.63
7.3.30.0030.02314.71
7.3.20.0120.01816.46
7.3.10.0030.02316.33
7.3.00.0030.02416.75
7.2.330.0060.03216.50
7.2.320.0100.04316.79
7.2.310.0120.02516.53
7.2.300.0030.03016.86
7.2.290.0070.03016.70
7.2.250.0070.04015.16
7.2.240.0070.02615.14
7.2.230.0000.02714.95
7.2.220.0070.02014.79
7.2.210.0060.01914.69
7.2.200.0110.02115.11
7.2.190.0030.02614.83
7.2.180.0030.03015.02
7.2.170.0000.02714.77
7.2.00.0070.02319.03
7.1.330.0000.04115.34
7.1.320.0000.03915.69
7.1.310.0030.04015.90
7.1.300.0060.02915.74
7.1.290.0000.03815.70
7.1.280.0030.03915.63
7.1.270.0070.03015.51
7.1.260.0030.03715.46
7.1.100.0990.00411.91
7.1.70.0250.02516.81
7.1.60.0030.02017.30
7.1.50.0030.02016.56
7.1.00.0100.09322.45
7.0.200.0000.05116.82
7.0.140.0030.09322.00
7.0.60.0100.08719.91
7.0.50.0000.10717.84
7.0.40.0170.09720.18
7.0.30.0270.07320.17
7.0.20.0330.10320.23
7.0.10.0100.10720.09
7.0.00.0070.10720.22
5.6.280.0100.11720.83
5.6.210.0100.07020.52
5.6.200.0070.12318.22
5.6.190.0100.08020.57
5.6.180.0230.09020.46
5.6.170.0230.08020.55
5.6.160.0000.08020.50
5.6.150.0030.07718.20
5.6.140.0030.12318.18
5.6.130.0100.13718.28
5.6.120.0200.12721.19
5.6.110.0030.11721.00
5.6.100.0070.07720.98
5.6.90.0030.11321.12
5.6.80.0100.12320.39
5.5.350.0130.07720.34
5.5.340.0000.07717.99
5.5.330.0170.11020.27
5.5.320.0370.13020.38
5.5.310.0330.11020.51
5.5.300.0070.11018.08
5.5.290.0030.13017.99
5.5.280.0000.11720.98
5.5.270.0100.09720.90
5.5.260.0070.11720.97
5.5.250.0070.12720.79
5.5.240.0030.13320.28
5.4.450.0100.11019.63
5.4.440.0130.10319.21
5.4.430.0230.10319.23
5.4.420.0300.12719.53
5.4.410.0070.11019.45
5.4.400.0170.10018.89
5.4.390.0130.10718.73
5.4.380.0130.11018.78
5.4.370.0170.10018.69
5.4.360.0100.11018.51
5.4.350.0030.11718.58
5.4.340.0170.10018.75
5.4.320.0170.10018.53
5.4.310.0130.10718.84
5.4.300.0100.11018.61
5.4.290.0170.10018.58
5.4.280.0100.10718.57
5.4.270.0170.09718.70
5.4.260.0130.11318.71
5.4.250.0230.09318.64
5.4.240.0170.10018.76
5.4.230.0100.11318.56
5.4.220.0170.10318.82
5.4.210.0200.09718.56
5.4.200.0170.09716.69
5.4.190.0130.10018.79
5.4.180.0170.09718.52
5.4.170.0070.11018.76
5.4.160.0130.09718.56
5.4.150.0170.10318.72
5.4.140.0100.10716.35
5.4.130.0170.09716.32
5.4.120.0130.10016.27
5.4.110.0100.10016.28
5.4.100.0170.09716.29
5.4.90.0130.09716.29
5.4.80.0130.11016.27
5.4.70.0200.10016.23
5.4.60.0130.10016.44
5.4.50.0100.09716.17
5.4.40.0130.09716.29
5.4.30.0070.10316.21
5.4.20.0170.09716.20
5.4.10.0130.10016.21
5.4.00.0130.10015.91
5.3.290.0130.12714.74
5.3.280.0130.12314.73
5.3.270.0100.11714.66
5.3.260.0130.11314.74
5.3.250.0100.12014.82
5.3.240.0130.12314.63
5.3.230.0170.10314.73
5.3.220.0100.11714.79
5.3.210.0170.11714.61
5.3.200.0230.11714.79
5.3.190.0200.11714.62
5.3.180.0170.11014.70
5.3.170.0170.12714.58
5.3.160.0030.12014.59
5.3.150.0170.10714.57
5.3.140.0130.11314.80
5.3.130.0170.11314.59
5.3.120.0170.11314.75
5.3.110.0100.12014.53
5.3.100.0200.10714.21
5.3.90.0100.11714.16
5.3.80.0170.11714.20
5.3.70.0130.11014.13
5.3.60.0100.11314.08
5.3.50.0100.11713.99
5.3.40.0070.12314.14
5.3.30.0170.10714.04
5.3.20.0100.11313.77
5.3.10.0130.11713.76
5.3.00.0170.11013.77
5.2.170.0030.04711.25
5.2.160.0130.04011.13
5.2.150.0070.04311.24
5.2.140.0130.04311.26
5.2.130.0170.03711.11
5.2.120.0200.03011.20
5.2.110.0030.04711.23
5.2.100.0130.03311.18
5.2.90.0030.04711.13
5.2.80.0170.03711.15
5.2.70.0130.03711.11
5.2.60.0100.04011.07
5.2.50.0130.03711.05
5.2.40.0070.04011.23
5.2.30.0070.04311.02
5.2.20.0170.03010.94
5.2.10.0030.04310.88
5.2.00.0070.04010.90
5.1.60.0070.03310.20
5.1.50.0130.03010.18
5.1.40.0100.03310.02
5.1.30.0100.03310.38
5.1.20.0070.04010.39
5.1.10.0100.03310.11
5.1.00.0130.03310.16
5.0.50.0000.0338.53
5.0.40.0030.0308.44
5.0.30.0100.0378.22
5.0.20.0100.0238.33
5.0.10.0030.0308.20
5.0.00.0100.0438.18
4.4.90.0070.0205.88
4.4.80.0000.0275.88
4.4.70.0000.0275.90
4.4.60.0000.0275.87
4.4.50.0000.0275.88
4.4.40.0070.0335.92
4.4.30.0030.0235.98
4.4.20.0030.0235.93
4.4.10.0000.0235.97
4.4.00.0070.0305.90
4.3.110.0030.0275.81
4.3.100.0100.0175.79
4.3.90.0000.0235.78
4.3.80.0070.0335.78
4.3.70.0000.0235.81
4.3.60.0070.0175.80
4.3.50.0070.0205.80
4.3.40.0030.0335.79
4.3.30.0000.0234.54
4.3.20.0130.0134.52
4.3.10.0070.0204.48
4.3.00.0000.0277.30

preferences:
57.17 ms | 401 KiB | 5 Q