3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* PHP 5.3.5 */ class Foo { static $foo = 0; Function bar ($func) { $this->callback = $func; echo self::$foo++ . "\n"; call_user_func ($this->callback, $this); } } $callback = Function ($_this) { return call_user_func ($_this->callback, $_this); }; $obj = new Foo (); $obj->bar ($callback);

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.0580.02074.02
8.3.50.0550.04073.86
8.3.40.0330.01144.79
8.3.30.0290.01645.34
8.3.20.0100.01446.50
8.3.10.0060.01250.41
8.3.00.0220.00446.64
8.2.180.0660.02372.38
8.2.170.0420.00644.82
8.2.160.0290.01047.68
8.2.150.0130.01345.02
8.2.140.0190.00645.21
8.2.130.0190.00646.52
8.2.120.0190.00647.05
8.2.110.0130.01048.72
8.2.100.0350.01343.84
8.2.90.0100.01345.09
8.2.80.0170.00744.16
8.2.70.0170.00743.48
8.2.60.0200.00743.80
8.2.50.0200.00743.63
8.2.40.0120.01245.39
8.2.30.0180.00743.90
8.2.20.0100.01343.50
8.2.10.0160.00644.30
8.2.00.0250.00743.64
8.1.280.0440.03772.13
8.1.270.0140.02149.07
8.1.260.0180.00745.05
8.1.250.0280.00048.19
8.1.240.0030.01652.05
8.1.230.0190.01645.16
8.1.220.0100.01443.68
8.1.210.0100.01643.35
8.1.200.0220.00443.47
8.1.190.0130.01343.66
8.1.180.0210.00343.10
8.1.170.0210.00344.65
8.1.160.0030.02448.07
8.1.150.0070.02044.64
8.1.140.0090.01543.50
8.1.130.0100.01643.80
8.1.120.0200.00343.50
8.1.110.0120.01243.46
8.1.100.0070.01843.40
8.1.90.0160.00743.54
8.1.80.0090.01543.49
8.1.70.0070.01443.47
8.1.60.0180.01143.52
8.1.50.0060.01943.53
8.1.40.0150.01243.64
8.1.30.0130.01343.63
8.1.20.0130.01343.70
8.1.10.0400.01673.18
8.1.00.0140.03773.14
8.0.300.0180.02172.97
8.0.290.0160.02372.79
8.0.280.0240.01474.09
8.0.270.0260.01772.84
8.0.260.0380.01072.33
8.0.250.0180.01872.50
8.0.240.0130.02872.57
8.0.230.0170.02072.59
8.0.220.0340.00772.55
8.0.210.0200.01772.50
8.0.200.0190.02272.42
8.0.190.0290.01672.42
8.0.180.0230.02972.51
8.0.170.0230.03072.38
8.0.160.0260.02372.34
8.0.150.0170.02872.37
8.0.140.0310.02172.34
8.0.130.0360.039121.74
8.0.120.0230.02472.37
8.0.110.0220.01972.45
8.0.100.0300.01772.30
8.0.90.0230.02072.28
8.0.80.0720.03272.45
8.0.70.0270.01772.27
8.0.60.0200.02372.57
8.0.50.0330.01072.30
8.0.30.0520.05172.57
8.0.20.0500.05072.53
8.0.10.0100.03472.55
8.0.00.0670.03272.19
7.4.330.0190.02373.23
7.4.320.0270.01072.01
7.4.300.0100.02771.93
7.4.290.0200.02772.16
7.4.280.0200.02372.19
7.4.270.0220.02272.20
7.4.260.0230.02372.00
7.4.250.0200.02472.02
7.4.240.0180.02572.11
7.4.230.0270.01772.14
7.4.220.0730.07371.97
7.4.210.0700.03872.11
7.4.200.0210.02171.90
7.4.190.0160.02672.19
7.4.160.0620.03871.98
7.4.150.0800.04072.00
7.4.140.0740.04172.03
7.4.130.0610.05472.03
7.4.120.0570.06272.02
7.4.110.0560.03972.08
7.4.100.0570.08272.10
7.4.90.0800.06071.93
7.4.80.0620.04072.02
7.4.70.0510.06472.18
7.4.60.0550.04871.85
7.4.50.0230.02972.17
7.4.40.0410.02271.75
7.4.30.0660.05671.98
7.4.00.0380.03570.50
7.3.330.0500.034121.79
7.3.320.0370.044121.81
7.3.310.0230.02071.84
7.3.300.0230.02071.91
7.3.290.1050.04371.79
7.3.280.0570.05871.75
7.3.270.0520.05272.05
7.3.260.0610.04471.93
7.3.250.0560.04671.93
7.3.240.0430.05272.17
7.3.230.0520.04672.03
7.3.210.0630.03271.81
7.3.200.0600.05371.82
7.3.190.0510.04371.87
7.3.180.0460.04972.16
7.3.170.0640.03071.84
7.3.160.0520.04571.80
7.3.120.0270.04970.31
7.3.110.0230.04570.08
7.3.100.0360.02870.38
7.3.90.0270.03370.39
7.3.80.0290.03570.47
7.3.70.0220.04070.04
7.3.60.0320.03270.23
7.3.50.0290.02970.16
7.3.40.0290.03270.17
7.3.30.0260.03470.44
7.3.20.0230.02478.59
7.3.10.0230.02378.38
7.3.00.0240.03078.43
7.2.330.0460.05972.17
7.2.320.0700.07371.99
7.2.310.0620.04972.18
7.2.300.0540.04772.02
7.2.290.0520.04672.07
7.2.250.0480.02670.82
7.2.240.0320.04570.64
7.2.230.0360.03070.56
7.2.220.0310.03870.83
7.2.210.0330.03370.62
7.2.200.0270.03470.69
7.2.190.0350.02970.63
7.2.180.0320.03070.61
7.2.170.0230.04770.61
7.2.160.0100.05270.62
7.2.150.0310.03478.96
7.2.140.0350.02678.64
7.2.130.0480.04578.97
7.2.120.0670.02878.80
7.2.110.0510.04779.02
7.2.100.0520.04579.04
7.2.90.0680.04778.91
7.2.80.0270.07379.00
7.2.70.1110.03278.41
7.2.60.0900.02278.77
7.2.50.0710.02478.84
7.2.40.0780.02678.88
7.2.30.0540.04078.68
7.2.20.0630.03679.09
7.2.10.0720.02278.75
7.2.00.2060.03580.11
7.1.330.0210.03977.72
7.1.320.0180.04377.78
7.1.310.0200.04977.93
7.1.300.0450.04677.63
7.1.290.0290.03677.86
7.1.280.0700.04077.60
7.1.270.0230.04677.63
7.1.260.0730.04777.90
7.1.250.0510.04877.84
7.1.200.1390.01377.61
7.1.100.0990.02134.11
7.1.70.0820.01678.94
7.1.60.0130.05479.16
7.1.50.0560.04578.59
7.1.00.0100.10384.27
7.0.200.3960.02077.20
7.0.140.0070.10084.21
7.0.70.0700.10077.11
7.0.60.0600.07777.67
7.0.50.0570.11377.49
7.0.40.0170.10720.11
7.0.30.0070.06320.09
7.0.20.0170.11020.18
7.0.10.0030.11319.99
7.0.00.0100.09320.09
5.6.280.0070.07733.15
5.6.220.0100.09032.61
5.6.210.0000.07732.59
5.6.200.0200.07732.96
5.6.190.0130.09033.09
5.6.180.0000.05033.07
5.6.170.0100.08733.11
5.6.160.0130.08033.07
5.6.150.0070.05733.13
5.6.140.0070.08733.12
5.6.130.0070.08733.04
5.6.120.0030.05732.93
5.6.110.0170.03333.11
5.6.100.0130.03733.14
5.6.90.0070.04333.02
5.6.80.0070.03332.47
5.6.70.0000.04732.42
5.6.60.0000.04732.47
5.6.50.0070.06732.43
5.6.40.0030.04332.37
5.6.30.0070.05732.44
5.6.20.0070.04332.29
5.6.10.0070.06732.46
5.6.00.0170.07332.38
5.5.360.0100.07032.52
5.5.350.0170.08332.44
5.5.340.0030.04732.91
5.5.330.0030.09332.85
5.5.320.0030.08332.88
5.5.310.0200.07332.91
5.5.300.0070.05732.89
5.5.290.0070.04332.93
5.5.280.0000.05032.91
5.5.270.0170.06732.65
5.5.260.0130.08032.92
5.5.250.0030.06032.63
5.5.240.0100.04332.29
5.5.230.0000.04732.16
5.5.220.0030.05032.22
5.5.210.0000.04732.32
5.5.200.0030.04032.13
5.5.190.0030.03732.20
5.5.180.0100.04032.29
5.5.160.0130.04732.15
5.5.150.0030.03732.29
5.5.140.0070.06332.14
5.5.130.0100.08332.14
5.5.120.0000.04332.11
5.5.110.0070.03332.20
5.5.100.0130.03732.10
5.5.90.0070.04732.04
5.5.80.0070.03332.04
5.5.70.0000.04732.11
5.5.60.0000.04332.11
5.5.50.0130.03332.02
5.5.40.0070.03732.07
5.5.30.0100.07332.01
5.5.20.0070.04732.10
5.5.10.0070.04032.15
5.5.00.0130.04331.98
5.4.450.0070.09031.50
5.4.440.0030.04331.50
5.4.430.0070.04331.51
5.4.420.0030.04331.37
5.4.410.0070.07331.53
5.4.400.0100.03731.18
5.4.390.0000.04331.19
5.4.380.0100.06731.04
5.4.370.0070.03731.16
5.4.360.0030.04031.24
5.4.350.0100.06331.19
5.4.340.0070.06031.17
5.4.320.0070.04031.26
5.4.310.0100.03331.28
5.4.300.0030.03331.32
5.4.290.0030.04030.98
5.4.280.0030.04031.33
5.4.270.0000.06731.14
5.4.260.0030.04031.20
5.4.250.0130.05731.04
5.4.240.0030.04031.16
5.4.230.0100.03331.00
5.4.220.0070.03731.13
5.4.210.0070.03331.32
5.4.200.0030.03730.99
5.4.190.0000.03731.19
5.4.180.0070.06031.04
5.4.170.0030.04030.98
5.4.160.0070.04331.02
5.4.150.0130.03331.16
5.4.140.0030.07028.29
5.4.130.0070.03328.33
5.4.120.0030.03728.39
5.4.110.0000.04328.70
5.4.100.0070.03028.52
5.4.90.0030.04328.47
5.4.80.0130.03328.53
5.4.70.0030.03328.54
5.4.60.0000.04028.54
5.4.50.0170.07028.49
5.4.40.0100.07028.49
5.4.30.0100.07728.59
5.4.20.0100.07028.51
5.4.10.0170.07328.61
5.4.00.0130.05727.78
5.3.290.0000.06726.82
5.3.280.0100.03326.38
5.3.270.0000.07326.27
5.3.260.0100.03326.41
5.3.250.0100.03326.27
5.3.240.0100.03326.31
5.3.230.0030.04026.26
5.3.220.0030.08726.29
5.3.210.0030.04026.23
5.3.200.0030.07726.41
5.3.190.0070.03026.32
5.3.180.0030.04326.29
5.3.170.0000.03726.25
5.3.160.0030.03326.21
5.3.150.0100.04726.29
5.3.140.0170.07326.25
5.3.130.0070.07026.29
5.3.120.0170.07726.42
5.3.110.0100.05326.25
5.3.100.0070.07725.70
5.3.90.0000.08325.92
5.3.80.0070.07325.74
5.3.70.0200.05725.68
5.3.60.0130.05325.77
5.3.50.0000.06325.67
5.3.40.0030.07725.70
5.3.30.0030.06025.59
5.3.20.0300.06325.47
5.3.10.0070.07725.41
5.3.00.0130.08025.56
5.2.170.0030.06712.43
5.2.160.0030.05312.43
5.2.150.0070.06312.43
5.2.140.0030.03012.43
5.2.130.0000.06312.43
5.2.120.0030.04712.43
5.2.110.0000.05012.43
5.2.100.0070.05312.43
5.2.90.0030.04012.43
5.2.80.0030.07012.43
5.2.70.0000.06712.43
5.2.60.0000.06012.43
5.2.50.0030.03012.43
5.2.40.0100.05312.43
5.2.30.0100.05312.43
5.2.20.0030.05312.43
5.2.10.0030.04712.43
5.2.00.0070.03712.43
5.1.60.0000.05012.43
5.1.50.0000.06012.43
5.1.40.0000.05012.43
5.1.30.0000.04312.43
5.1.20.0000.05712.43
5.1.10.0000.05712.43
5.1.00.0030.04712.43
5.0.50.0170.04012.43
5.0.40.0070.03312.43
5.0.30.0070.05712.43
5.0.20.0000.04712.43
5.0.10.0030.04312.43
5.0.00.0000.03712.43
4.4.90.0000.03712.43
4.4.80.0030.02012.43
4.4.70.0030.02712.43
4.4.60.0030.03012.43
4.4.50.0000.01712.43
4.4.40.0000.03312.43
4.4.30.0000.03712.43
4.4.20.0000.03012.43
4.4.10.0000.04012.43
4.4.00.0000.05012.43
4.3.110.0030.03312.43
4.3.100.0000.03312.43
4.3.90.0000.03312.43
4.3.80.0000.05312.43
4.3.70.0000.02712.43
4.3.60.0000.03312.43
4.3.50.0030.03312.43
4.3.40.0030.04312.43
4.3.30.0000.03712.43
4.3.20.0030.03712.43
4.3.10.0070.03012.43
4.3.00.0000.03312.43

preferences:
41.98 ms | 401 KiB | 5 Q