3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar(Bar $bar) { $bar->baz([$this, 'baz']); } protected function baz() { print 'Foobar!'.PHP_EOL; } } class Bar { public function baz(callable $baz) { $baz(); } } $foo = new Foo; $bar = new Bar; $foo->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.70.0070.01116.50
8.3.60.0110.00718.50
8.3.50.0110.00821.09
8.3.40.0110.00318.88
8.3.30.0060.00918.72
8.3.20.0040.00420.17
8.3.10.0040.00423.65
8.3.00.0040.00419.79
8.2.180.0120.00616.63
8.2.170.0070.01022.96
8.2.160.0100.00320.39
8.2.150.0050.00324.18
8.2.140.0070.01024.66
8.2.130.0030.00526.16
8.2.120.0070.00417.50
8.2.110.0090.00022.29
8.2.100.0060.00617.63
8.2.90.0040.00419.16
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0000.00717.91
8.2.50.0000.00918.07
8.2.40.0040.00419.28
8.2.30.0070.00418.06
8.2.20.0030.00517.74
8.2.10.0050.00217.88
8.2.00.0040.00418.00
8.1.280.0080.00625.92
8.1.270.0070.00720.33
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0070.00322.42
8.1.230.0040.00817.42
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0050.00317.22
8.1.180.0050.00218.10
8.1.170.0040.00418.50
8.1.160.0040.00421.88
8.1.150.0000.00718.74
8.1.140.0030.00517.44
8.1.130.0000.00717.66
8.1.120.0040.00317.40
8.1.110.0000.00717.39
8.1.100.0080.00017.44
8.1.90.0030.00517.36
8.1.80.0000.00817.39
8.1.70.0000.00717.29
8.1.60.0050.00317.47
8.1.50.0040.00417.57
8.1.40.0080.00017.54
8.1.30.0220.00717.61
8.1.20.0040.00417.64
8.1.10.0000.00817.44
8.1.00.0050.00317.47
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0000.00718.40
8.0.270.0000.00717.20
8.0.260.0000.01017.12
8.0.250.0030.00516.85
8.0.240.0000.00716.92
8.0.230.0030.00616.88
8.0.220.0000.00716.94
8.0.210.0030.00516.91
8.0.200.0000.00616.98
8.0.190.0040.00416.89
8.0.180.0030.00516.96
8.0.170.0060.00316.92
8.0.160.0070.00016.82
8.0.150.0040.00416.86
8.0.140.0080.00016.89
8.0.130.0000.00613.36
8.0.120.0030.00516.90
8.0.110.0050.00316.84
8.0.100.0070.00016.95
8.0.90.0030.00316.80
8.0.80.0090.00916.86
8.0.70.0000.00716.78
8.0.60.0040.00416.78
8.0.50.0040.00416.89
8.0.30.0140.00517.16
8.0.20.0070.01417.40
8.0.10.0070.00016.82
8.0.00.0080.01016.74
7.4.330.0000.00615.08
7.4.320.0020.00516.57
7.4.300.0000.00616.65
7.4.290.0060.00316.50
7.4.280.0100.00016.51
7.4.270.0070.00016.53
7.4.260.0000.00513.28
7.4.250.0000.00716.49
7.4.240.0030.00316.63
7.4.230.0070.00016.59
7.4.220.0040.01516.36
7.4.210.0120.00316.68
7.4.200.0070.00016.59
7.4.160.0130.00316.46
7.4.150.0110.00717.40
7.4.140.0030.01617.86
7.4.130.0130.00816.46
7.4.120.0110.00916.46
7.4.110.0060.01616.52
7.4.100.0070.01116.40
7.4.90.0030.01316.60
7.4.80.0070.01019.39
7.4.70.0170.00616.57
7.4.60.0090.00616.59
7.4.50.0000.00616.53
7.4.40.0100.00716.57
7.4.30.0110.00716.42
7.4.00.0110.00514.83
7.3.330.0000.00513.13
7.3.320.0030.00613.23
7.3.310.0030.00316.19
7.3.300.0040.00416.25
7.3.290.0120.00416.27
7.3.280.0070.01016.29
7.3.270.0090.01217.40
7.3.260.0130.00416.28
7.3.250.0080.01116.38
7.3.240.0070.01016.36
7.3.230.0080.00916.39
7.3.210.0030.01316.28
7.3.200.0060.00916.38
7.3.190.0100.00616.42
7.3.180.0030.01416.57
7.3.170.0140.00716.35
7.3.160.0100.01016.31
7.3.120.0030.01614.73
7.3.110.0040.01414.52
7.3.100.0110.00414.85
7.3.90.0030.00614.84
7.3.80.0050.00514.74
7.3.70.0070.00314.66
7.3.60.0030.01014.72
7.3.50.0060.00614.87
7.3.40.0000.01114.67
7.3.30.0040.00814.77
7.3.20.0090.00616.57
7.3.10.0060.00616.66
7.3.00.0040.00816.59
7.2.330.0130.00316.56
7.2.320.0150.00416.66
7.2.310.0060.01216.56
7.2.300.0040.01316.25
7.2.290.0090.00916.74
7.2.250.0070.01114.80
7.2.240.0070.01015.05
7.2.230.0000.01515.16
7.2.220.0000.01315.08
7.2.210.0030.01414.93
7.2.200.0100.00314.85
7.2.190.0090.00314.75
7.2.180.0060.00615.07
7.2.170.0030.01014.57
7.2.80.0060.00616.45
7.2.60.0090.00616.67
7.2.00.0000.01519.48
7.1.330.0040.01215.52
7.1.320.0110.00415.23
7.1.310.0060.00615.70
7.1.300.0110.00415.21
7.1.290.0070.00315.66
7.1.280.0040.00715.68
7.1.270.0090.00015.75
7.1.260.0100.00715.63
7.1.200.0000.01315.70
7.1.100.0040.00418.06
7.1.70.0080.00816.78
7.1.60.0100.01019.17
7.1.50.0040.02116.62
7.1.00.0030.07722.37
7.0.200.0080.00316.49
7.0.60.0130.07319.94
7.0.50.0070.08017.86
7.0.40.0030.09020.27
7.0.30.0330.04020.14
7.0.20.0200.04320.23
7.0.10.0030.05020.26
7.0.00.0100.06720.09
5.6.280.0030.03021.07
5.6.210.0100.03320.73
5.6.200.0000.05018.15
5.6.190.0070.04020.57
5.6.180.3500.04320.67
5.6.170.0270.08020.55
5.6.160.0030.08720.39
5.6.150.0000.05018.14
5.6.140.0100.07718.21
5.6.130.0130.07318.15
5.6.120.0030.08321.00
5.6.110.0030.08320.96
5.6.100.0070.08321.03
5.6.90.0070.04020.88
5.6.80.0030.03720.51
5.6.70.4370.04020.40
5.5.350.0030.07320.45
5.5.340.0070.03318.07
5.5.330.0030.06320.29
5.5.320.0270.05320.38
5.5.310.0270.04720.34
5.5.300.0130.04718.07
5.5.290.0070.08017.93
5.5.280.0070.06320.97
5.5.270.0170.04320.72
5.5.260.0130.07320.97
5.5.250.0170.06320.66
5.5.240.0300.06020.27
5.4.450.0130.07719.23
5.4.440.1030.07719.24
5.4.430.0830.05719.27
5.4.420.0800.05319.27
5.4.410.0930.05019.32
5.4.400.0300.04319.10
5.4.390.0230.06018.97
5.4.380.1030.07718.95
5.4.370.0500.05018.95
5.4.360.0200.05019.16
5.4.350.0630.06718.73
5.4.340.0870.05318.71
5.4.320.0700.07019.12
5.4.310.0970.06718.90
5.4.300.0970.07019.16
5.4.290.0870.06719.21
5.4.280.0730.06018.77
5.4.270.0900.05319.13
5.4.260.0630.06718.90
5.4.250.0830.05718.94
5.4.240.0700.06718.70
5.4.230.1100.06318.95
5.4.220.0730.05719.13
5.4.210.0730.05718.94
5.4.200.0770.05718.95
5.4.190.0770.06318.93
5.4.180.0830.06019.09
5.4.170.0970.05318.96
5.4.160.0800.05319.08
5.4.150.0770.08718.92
5.4.140.0770.08016.50
5.4.130.0870.07316.50
5.4.120.0770.06016.48
5.4.110.0800.05316.33
5.4.100.0900.05016.50
5.4.90.0700.05716.52
5.4.80.0700.05716.40
5.4.70.0230.07316.29
5.4.60.0230.03716.25
5.4.50.0030.03316.55
5.4.40.0130.04716.54
5.4.30.0000.07716.22
5.4.20.0370.06016.50

preferences:
60.97 ms | 401 KiB | 5 Q