3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __invoke($a, $b) { echo "$a - $b\n"; } } class Bar { public $f; public function __construct() { $this->f = new Foo; } } $b = new Bar; $f = $b->f; $f('hello', 'world'); call_user_func($b->f, 'hello', 'world'); // i assume php assumes that f is a method here, // so this fails! Bar::f() does not exist... // $b->f('hello', 'world'); // php simply cannot parse this for whatever // reason. seems like it shoudl be able to. :) // ($b->f)('hello', 'world');

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.01216.63
8.3.50.0180.00018.06
8.3.40.0060.00918.92
8.3.30.0100.00718.96
8.3.20.0070.00020.21
8.3.10.0070.00023.66
8.3.00.0000.00819.36
8.2.180.0070.00718.30
8.2.170.0040.01122.96
8.2.160.0110.00720.46
8.2.150.0060.00324.18
8.2.140.0100.00324.66
8.2.130.0070.00026.16
8.2.120.0000.00722.30
8.2.110.0030.00622.16
8.2.100.0040.00717.54
8.2.90.0090.00518.88
8.2.80.0050.00317.97
8.2.70.0090.00417.50
8.2.60.0050.00318.05
8.2.50.0000.00819.36
8.2.40.0090.00318.16
8.2.30.0030.00719.84
8.2.20.0060.00317.59
8.2.10.0040.00418.11
8.2.00.0040.00417.63
8.1.270.0040.00423.97
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00618.91
8.1.230.0090.00318.98
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0040.00417.00
8.1.180.0000.00919.01
8.1.170.0050.00218.52
8.1.160.0000.00721.96
8.1.150.0040.00418.50
8.1.140.0000.00717.28
8.1.130.0070.00017.73
8.1.120.0040.00317.39
8.1.110.0040.00417.37
8.1.100.0000.00717.34
8.1.90.0040.00417.36
8.1.80.0070.00317.38
8.1.70.0000.00717.39
8.1.60.0040.00417.46
8.1.50.0040.00417.50
8.1.40.0050.00317.50
8.1.30.0030.00517.64
8.1.20.0040.00417.65
8.1.10.0000.00817.54
8.1.00.0000.00717.42
8.0.300.0070.00018.77
8.0.290.0000.00817.05
8.0.280.0030.00318.44
8.0.270.0070.00017.15
8.0.260.0000.00617.23
8.0.250.0070.00016.85
8.0.240.0070.00016.99
8.0.230.0000.00716.90
8.0.220.0030.00316.86
8.0.210.0000.00916.92
8.0.200.0050.00516.93
8.0.190.0050.00316.95
8.0.180.0040.00416.84
8.0.170.0000.01016.93
8.0.160.0060.00316.75
8.0.150.0000.00816.73
8.0.140.0000.00716.85
8.0.130.0000.00813.30
8.0.120.0080.00016.78
8.0.110.0000.00816.75
8.0.100.0000.00716.70
8.0.90.0070.00016.98
8.0.80.0100.01316.95
8.0.70.0080.00016.91
8.0.60.0000.00816.77
8.0.50.0030.00316.85
8.0.30.0140.00917.21
8.0.20.0180.00317.40
8.0.10.0050.00216.88
8.0.00.0080.01016.86
7.4.330.0000.00515.00
7.4.320.0030.00316.48
7.4.300.0060.00016.51
7.4.290.0040.00416.48
7.4.280.0080.00016.54
7.4.270.0030.00316.57
7.4.260.0000.00716.57
7.4.250.0040.00416.54
7.4.240.0020.00516.48
7.4.230.0000.00716.49
7.4.220.0060.01316.51
7.4.210.0060.01116.59
7.4.200.0040.00416.57
7.4.190.0060.00316.67
7.4.160.0060.00916.22
7.4.150.0120.00617.40
7.4.140.0070.01417.86
7.4.130.0110.00616.44
7.4.120.0050.01316.48
7.4.110.0090.00916.68
7.4.100.0130.00716.38
7.4.90.0110.00516.71
7.4.80.0100.01319.39
7.4.70.0000.01716.52
7.4.60.0140.00716.37
7.4.50.0050.00516.56
7.4.40.0120.01316.47
7.4.30.0090.00916.65
7.4.00.0070.00414.59
7.3.330.0000.00513.20
7.3.320.0020.00213.23
7.3.310.0080.00016.41
7.3.300.0000.00716.41
7.3.290.0040.01116.37
7.3.280.0080.00916.35
7.3.270.0060.01117.40
7.3.260.0110.00716.67
7.3.250.0090.00816.39
7.3.240.0060.01516.30
7.3.230.0090.00916.39
7.3.210.0100.00716.39
7.3.200.0160.00619.39
7.3.190.0090.01016.42
7.3.180.0030.01316.43
7.3.170.0000.01616.27
7.3.160.0150.00016.59
7.3.120.0070.01014.84
7.2.330.0110.01116.82
7.2.320.0040.01616.89
7.2.310.0060.01016.82
7.2.300.0090.00916.79
7.2.290.0060.01716.80
7.1.70.0000.00717.23
7.1.60.0070.01019.46
7.1.50.0130.00716.60
7.1.00.0130.06322.46
7.0.200.0180.00615.00
7.0.140.0070.07022.08
7.0.60.0130.03320.03
7.0.50.0070.08017.84
7.0.40.0130.03720.40
7.0.30.0670.04720.24
7.0.20.0300.06320.33
7.0.10.0030.04020.24
7.0.00.0070.04020.20
5.6.280.0030.07321.10
5.6.210.0170.07020.51
5.6.200.0000.05318.24
5.6.190.0070.08320.41
5.6.180.0200.08320.55
5.6.170.0230.08320.50
5.6.160.0100.08020.39
5.6.150.0100.07318.14
5.6.140.0000.04718.11
5.6.130.0070.05018.23
5.6.120.0170.07721.02
5.6.110.0200.07321.13
5.6.100.0030.04021.09
5.6.90.0200.07021.13
5.6.80.0030.08720.36
5.6.70.4430.03720.41
5.5.350.0100.03320.45
5.5.340.0030.06318.08
5.5.330.0100.03720.42
5.5.320.0430.07320.36
5.5.310.0270.08020.27
5.5.300.0100.04018.01
5.5.290.0100.08017.98
5.5.280.0170.03020.63
5.5.270.0070.08720.73
5.5.260.0030.07020.98
5.5.250.0100.04720.69
5.5.240.0330.06320.16
5.4.450.0700.05719.36
5.4.440.0730.05319.38
5.4.430.0730.06019.45
5.4.420.0630.00019.36
5.4.410.0170.05318.91
5.4.400.0200.05318.77
5.4.390.0070.07318.57
5.4.380.0330.05318.47
5.4.370.0170.06018.75
5.4.360.0170.04718.66
5.4.350.0060.04512.03
5.4.340.0060.03912.02
5.4.320.0030.04212.51
5.4.310.0110.03712.50
5.4.300.0110.03912.50
5.4.290.0050.06112.48
5.4.280.0060.05712.38
5.4.270.0100.05412.38
5.4.260.0090.05612.39
5.4.250.0100.05912.39
5.4.240.0110.07712.38
5.4.230.0100.05112.38
5.4.220.0080.06312.38
5.4.210.0060.04312.38
5.4.200.0170.05212.38
5.4.190.0130.05112.37
5.4.180.0170.07212.37
5.4.170.0070.04412.38
5.4.160.0300.04212.38
5.4.150.0070.03812.37
5.4.140.0070.03912.06
5.4.130.0040.04012.05
5.4.120.0060.03812.00
5.4.110.0080.04312.00
5.4.100.0060.04012.00
5.4.90.0050.04312.00
5.4.80.0040.04312.00
5.4.70.0140.03311.99
5.4.60.0060.03911.99
5.4.50.0070.03812.00
5.4.40.0120.04711.98
5.4.30.0110.04611.98
5.4.20.0070.05011.98
5.4.10.0140.06711.98
5.4.00.0130.05411.47
5.3.290.0100.04512.80
5.3.280.0080.04412.71
5.3.270.0100.03812.72
5.3.260.0140.05012.72
5.3.250.0030.04112.72
5.3.240.0040.04012.72
5.3.230.0070.03712.71
5.3.220.0100.04212.68
5.3.210.0100.04912.68
5.3.200.0130.05912.68
5.3.190.0130.06412.68
5.3.180.0090.05612.67
5.3.170.0090.04412.67
5.3.160.0090.05112.67
5.3.150.0170.06812.67
5.3.140.0130.05812.66
5.3.130.0070.05012.66
5.3.120.0100.03812.65
5.3.110.0070.04312.66
5.3.100.0070.04312.12
5.3.90.0070.03912.12
5.3.80.0060.04012.09
5.3.70.0050.04212.09
5.3.60.0060.04312.08
5.3.50.0080.03812.03
5.3.40.0090.03912.03
5.3.30.0070.03811.98
5.3.20.0080.03711.77
5.3.10.0110.06611.73
5.3.00.0170.08211.72
5.2.170.0080.0509.23
5.2.160.0110.0799.23
5.2.150.0070.0469.23
5.2.140.0090.0439.22
5.2.130.0090.0429.18
5.2.120.0100.0669.19
5.2.110.0120.0639.19
5.2.100.0100.0329.19
5.2.90.0070.0739.19
5.2.80.0190.0949.18
5.2.70.0070.0469.18
5.2.60.0110.0639.14
5.2.50.0060.0429.10
5.2.40.0070.0369.08
5.2.30.0040.0459.05
5.2.20.0050.0509.04
5.2.10.0050.0488.95
5.2.00.0080.0518.82
5.1.60.0080.0708.09
5.1.50.0140.0558.09
5.1.40.0090.0338.07
5.1.30.0060.0398.42
5.1.20.0070.0338.45
5.1.10.0060.0298.17
5.1.00.0090.0558.18
5.0.50.0060.0216.65
5.0.40.0030.0226.50
5.0.30.0060.0466.32
5.0.20.0050.0276.29
5.0.10.0040.0296.27
5.0.00.0040.0426.26
4.4.90.0100.0374.77
4.4.80.0050.0224.76
4.4.70.0030.0224.75
4.4.60.0040.0214.75
4.4.50.0040.0224.77
4.4.40.0070.0454.70
4.4.30.0040.0224.76
4.4.20.0070.0224.85
4.4.10.0050.0294.85
4.4.00.0060.0354.76
4.3.110.0030.0234.67
4.3.100.0050.0204.67
4.3.90.0040.0244.63
4.3.80.0070.0704.58
4.3.70.0100.0404.63
4.3.60.0090.0204.63
4.3.50.0040.0234.63
4.3.40.0060.0404.54
4.3.30.0040.0283.30
4.3.20.0030.0203.28
4.3.10.0080.0223.24
4.3.00.0230.0236.64

preferences:
55.91 ms | 400 KiB | 5 Q