3v4l.org

run code in 300+ PHP versions simultaneously
<?php $anon = function($arg1, $arg2 = 2) { var_dump($this->mine, $arg1, $arg2); }; class Me { protected $mine = 8; } $me = new Me; $args = [4, 2]; // This is ugly, and doesn't take a variable number of args $anon->call($me, $args[0], $args[1]); // This doesn't exist =( // $anon->apply($me, $args); // We took .bind() and .call() from JS, why not .apply()? // This is ugly too, but takes a variable number of args call_user_func_array(array($anon, 'call'), array_merge(array($me), $args));

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.0110.01116.75
8.3.50.0290.00822.00
8.3.40.0170.00318.87
8.3.30.0090.00618.89
8.3.20.0040.00420.18
8.3.10.0040.00423.54
8.3.00.0000.00819.66
8.2.180.0000.01516.75
8.2.170.0070.00722.96
8.2.160.0030.01019.46
8.2.150.0090.00024.18
8.2.140.0050.00324.66
8.2.130.0000.01019.21
8.2.120.0050.00326.35
8.2.110.0030.00620.56
8.2.100.0060.00617.93
8.2.90.0080.00019.25
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0070.00317.93
8.2.50.0030.00618.07
8.2.40.0080.00022.38
8.2.30.0040.00420.50
8.2.20.0040.00417.79
8.2.10.0000.00818.01
8.2.00.0040.00418.10
8.1.280.0090.00925.92
8.1.270.0080.00020.08
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0040.00422.20
8.1.230.0130.00017.79
8.1.220.0000.00917.79
8.1.210.0000.00918.77
8.1.200.0000.00917.35
8.1.190.0000.00817.22
8.1.180.0000.00818.10
8.1.170.0000.00718.65
8.1.160.0000.00720.73
8.1.150.0050.00218.80
8.1.140.0030.00519.59
8.1.130.0070.00017.57
8.1.120.0040.00417.40
8.1.110.0030.00517.41
8.1.100.0040.00417.48
8.1.90.0030.00517.48
8.1.80.0030.00517.40
8.1.70.0000.00717.35
8.1.60.0040.00417.61
8.1.50.0030.00617.56
8.1.40.0050.00217.57
8.1.30.0050.00317.69
8.1.20.0050.00317.58
8.1.10.0050.00217.61
8.1.00.0040.00417.55
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0000.00718.50
8.0.270.0030.00317.27
8.0.260.0030.00318.36
8.0.250.0030.00316.88
8.0.240.0070.00016.96
8.0.230.0000.00716.88
8.0.220.0040.00316.76
8.0.210.0000.00716.77
8.0.200.0040.00416.91
8.0.190.0030.00716.84
8.0.180.0040.00416.90
8.0.170.0050.00316.92
8.0.160.0030.00316.98
8.0.150.0000.00716.83
8.0.140.0000.00816.72
8.0.130.0030.00313.29
8.0.120.0070.00016.77
8.0.110.0070.00016.73
8.0.100.0000.00716.84
8.0.90.0000.00716.89
8.0.80.0060.00916.99
8.0.70.0070.00016.91
8.0.60.0040.00416.73
8.0.50.0040.00416.84
8.0.30.0110.00716.97
8.0.20.0160.00417.40
8.0.10.0000.00717.04
8.0.00.0080.00916.75
7.4.330.0020.00216.71
7.4.320.0030.00316.58
7.4.300.0030.00316.61
7.4.290.0000.00716.52
7.4.280.0080.00016.63
7.4.270.0000.00716.54
7.4.260.0030.00316.59
7.4.250.0040.00416.56
7.4.240.0050.00216.58
7.4.230.0070.00016.49
7.4.220.0070.01016.48
7.4.210.0070.01016.64
7.4.200.0000.00716.36
7.4.160.0060.01016.55
7.4.150.0070.01017.40
7.4.140.0070.01117.86
7.4.130.0060.01016.51
7.4.120.0060.01116.54
7.4.110.0120.00616.46
7.4.100.0140.00316.50
7.4.90.0090.01216.52
7.4.80.0060.01319.39
7.4.70.0040.01716.47
7.4.60.0120.00616.39
7.4.50.0030.01016.42
7.4.40.0140.00716.36
7.4.30.0100.00616.47
7.4.00.0070.01114.96
7.3.330.0050.00013.13
7.3.320.0050.00013.35
7.3.310.0000.00816.21
7.3.300.0030.00316.29
7.3.290.0070.01016.37
7.3.280.0070.00916.38
7.3.270.0070.01017.40
7.3.260.0100.00616.52
7.3.250.0090.01216.36
7.3.240.0080.00916.47
7.3.230.0120.00916.54
7.3.210.0070.01016.64
7.3.200.0090.00916.39
7.3.190.0030.01416.38
7.3.180.0160.00616.57
7.3.170.0080.00816.65
7.3.160.0120.00616.39
7.3.120.0090.00714.84
7.3.110.0030.00914.90
7.3.100.0090.00614.74
7.3.90.0070.00814.88
7.3.80.0070.00614.82
7.3.70.0040.01114.80
7.3.60.0040.00714.58
7.3.50.0090.00314.71
7.3.40.0040.00614.74
7.3.30.0090.00314.76
7.3.20.0060.00516.83
7.3.10.0070.00716.63
7.3.00.0070.00916.53
7.2.330.0100.00716.61
7.2.320.0000.01816.65
7.2.310.0100.00716.68
7.2.300.0000.01816.51
7.2.290.0130.01016.71
7.2.250.0040.01115.16
7.2.240.0080.00814.96
7.2.230.0080.00714.96
7.2.220.0080.00615.22
7.2.210.0000.01215.02
7.2.200.0030.01214.94
7.2.190.0020.01015.02
7.2.180.0100.00414.89
7.2.170.0030.01014.87
7.2.160.0060.00514.81
7.2.150.0110.00516.96
7.2.140.0040.00616.66
7.2.130.0060.00916.70
7.2.120.0050.01016.50
7.2.110.0060.01116.91
7.2.100.0080.00816.64
7.2.90.0080.00816.67
7.2.80.0070.00916.69
7.2.70.0100.00616.89
7.2.60.0070.00816.72
7.2.50.0070.00716.72
7.2.40.0120.00416.65
7.2.30.0100.00616.60
7.2.20.0080.00916.90
7.2.10.0060.01016.73
7.2.00.0080.00717.43
7.1.330.0030.01015.93
7.1.320.0030.00815.91
7.1.310.0030.01215.74
7.1.300.0090.00515.51
7.1.290.0080.00515.90
7.1.280.0070.00715.78
7.1.270.0060.00415.83
7.1.260.0060.00315.78
7.1.250.0050.00915.60
7.1.240.0060.00615.59
7.1.230.0060.00915.68
7.1.220.0130.00015.85
7.1.210.0040.00415.93
7.1.200.0080.00815.91
7.1.190.0090.00015.82
7.1.180.0030.01015.99
7.1.170.0090.00615.80
7.1.160.0070.00715.93
7.1.150.0030.01015.82
7.1.140.0060.00615.78
7.1.130.0030.00615.79
7.1.120.0000.00815.70
7.1.110.0000.01015.95
7.1.100.0110.00816.72
7.1.90.0000.01415.60
7.1.80.0110.00015.79
7.1.70.0050.00716.58
7.1.60.0110.01017.65
7.1.50.0130.00925.39
7.1.40.0080.00415.37
7.1.30.0100.00316.02
7.1.20.0090.00315.93
7.1.10.0060.00615.95
7.1.00.0050.04119.01
7.0.330.0060.00915.37
7.0.320.0000.01415.33
7.0.310.0030.01015.39
7.0.300.0040.00715.51
7.0.290.0060.00615.38
7.0.280.0000.01315.53
7.0.270.0040.00715.36
7.0.260.0030.00915.20
7.0.250.0090.00315.42
7.0.240.0030.00615.16
7.0.230.0000.00915.20
7.0.220.0060.00615.66
7.0.210.0040.00815.57
7.0.200.0040.00416.06
7.0.190.0090.00315.40
7.0.180.0040.00815.29
7.0.170.0000.00915.22
7.0.160.0030.00615.38
7.0.150.0040.01115.50
7.0.140.0110.00415.36
7.0.130.0070.01015.45
7.0.120.0000.01215.57
7.0.110.0030.00815.37
7.0.100.0100.00315.52
7.0.90.0080.00815.17
7.0.80.0030.00615.55
7.0.70.0000.01415.65
7.0.60.0100.04317.48
7.0.50.0060.03816.72
7.0.40.0050.04516.76
7.0.30.0170.03716.94
7.0.20.0180.03716.77
7.0.10.0050.03716.80
7.0.00.0020.02616.68
5.6.400.0060.00614.30
5.6.390.0110.00414.62
5.6.380.0000.00914.64
5.6.370.0040.01114.27
5.6.360.0130.00014.61
5.6.350.0110.00314.14
5.6.340.0060.00914.32
5.6.330.0060.00614.30
5.6.320.0040.01114.16
5.6.310.0140.00413.98
5.6.300.0080.00814.28
5.6.290.0100.00314.26
5.6.280.0000.02117.52
5.6.270.0060.00814.18
5.6.260.0030.00614.22
5.6.250.0100.00314.31
5.6.240.0130.00314.37
5.6.230.0040.00414.40
5.6.220.0060.00314.18
5.6.210.0060.03017.38
5.6.200.0110.04016.26
5.6.190.0120.04317.34
5.6.180.0200.02317.42
5.6.170.0190.04117.37
5.6.160.0080.03817.40
5.6.150.0070.04016.17
5.6.140.0020.04616.39
5.6.130.0050.04816.21
5.6.120.0080.02317.72
5.6.110.0020.04217.56
5.6.100.0070.04717.58
5.6.90.0130.03817.54
5.6.80.0070.04117.19
5.6.70.0000.01014.08
5.6.60.0040.01114.17
5.6.50.0040.00714.16
5.6.40.0030.00814.24
5.6.30.0030.01213.96
5.6.20.0090.00314.46
5.6.10.0000.01314.19
5.6.00.0040.01214.29
5.5.380.0050.00514.39
5.5.370.0030.00814.46
5.5.360.0030.01014.51
5.5.350.0120.02717.33
5.5.340.0080.03816.23
5.5.330.0030.02917.25
5.5.320.0130.02317.25
5.5.310.0100.03617.36
5.5.300.0020.02515.99
5.5.290.0030.02816.19
5.5.280.0080.04317.47
5.5.270.0010.03917.64
5.5.260.0090.04017.33
5.5.250.0050.04517.35
5.5.240.0120.04417.20
5.5.230.0100.00314.18
5.5.220.0000.00914.19
5.5.210.0070.00714.41
5.5.200.0030.01014.02
5.5.190.0040.00713.96
5.5.180.0000.00914.22
5.5.170.0040.01214.04
5.5.160.0030.01013.92
5.5.150.0070.00714.03
5.5.140.0070.00714.02
5.5.130.0040.01114.02
5.5.120.0000.00914.16
5.5.110.0030.01013.97
5.5.100.0000.00813.79
5.5.90.0000.01414.07
5.5.80.0030.01214.08
5.5.70.0000.01414.38
5.5.60.0030.01014.38
5.5.50.0080.00413.86
5.5.40.0090.00914.41
5.5.30.0030.00714.37
5.5.20.0100.00313.87
5.5.10.0040.01114.23
5.5.00.0070.00713.89

preferences:
63.32 ms | 401 KiB | 5 Q