3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'foo', 'bar' ]; function foo($array) { static $index = 0; if (!isset($array[$index])) { return array(); } $bar[$array[$index]] = foo($array) and ++$index; return $bar; } foo($array);

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.0330.02075.98
8.3.50.0260.01379.13
8.3.40.0300.03044.96
8.3.30.0320.01045.02
8.3.20.0130.01046.15
8.3.10.0140.00447.27
8.3.00.0140.01048.38
8.2.180.0590.03373.53
8.2.170.0360.01045.08
8.2.160.0160.01349.30
8.2.150.0220.00344.77
8.2.140.0040.01548.44
8.2.130.0200.00746.10
8.2.120.0180.00049.66
8.2.110.0260.00045.79
8.2.100.0270.00744.16
8.2.90.0140.00745.17
8.2.80.0160.00643.63
8.2.70.0190.00643.75
8.2.60.0150.00644.04
8.2.50.0100.01443.63
8.2.40.0150.00646.38
8.2.30.0110.01145.30
8.2.20.0100.01043.70
8.2.10.0070.01444.04
8.2.00.0140.00743.84
8.1.280.0530.02374.39
8.1.270.0310.01048.80
8.1.260.0130.00749.38
8.1.250.0110.01147.14
8.1.240.0200.00349.02
8.1.230.0110.02143.76
8.1.220.0210.00043.65
8.1.210.0040.01843.35
8.1.200.0160.00643.35
8.1.190.0100.01443.22
8.1.180.0070.01443.23
8.1.170.0090.01244.65
8.1.160.0170.00346.75
8.1.150.0030.01645.66
8.1.140.0070.01445.56
8.1.130.0100.01043.64
8.1.120.0130.00743.41
8.1.110.0130.00743.51
8.1.100.0090.01243.41
8.1.90.0100.01043.47
8.1.80.0170.00343.40
8.1.70.0140.00743.36
8.1.60.0030.02043.53
8.1.50.0120.01243.54
8.1.40.0180.00643.46
8.1.30.0100.01343.61
8.1.20.0040.01943.40
8.1.10.0100.02973.13
8.1.00.0200.02073.09
8.0.300.0250.01172.66
8.0.290.0270.01072.63
8.0.280.0280.00674.02
8.0.270.0110.02572.75
8.0.260.0380.00672.79
8.0.250.0250.01072.48
8.0.240.0190.01672.53
8.0.230.0170.01772.56
8.0.220.0150.01572.39
8.0.210.0190.01672.41
8.0.200.0200.01372.41
8.0.190.0140.02772.47
8.0.180.0240.01772.38
8.0.170.0210.02172.51
8.0.160.0160.02072.42
8.0.150.0230.01672.53
8.0.140.0200.02072.30
8.0.130.0640.037121.80
8.0.120.0240.01772.29
8.0.110.0190.01972.42
8.0.100.0360.00772.33
8.0.90.0110.02872.34
8.0.80.0430.04372.38
8.0.70.0130.02372.31
8.0.60.0160.02272.41
8.0.50.0190.01972.48
8.0.30.0530.02672.54
8.0.20.0610.03272.54
8.0.10.0180.02172.61
8.0.00.0580.03772.38
7.4.330.0100.01375.69
7.4.320.0260.00672.00
7.4.300.0220.00971.96
7.4.290.0290.01372.15
7.4.280.0160.02371.94
7.4.270.0300.00772.11
7.4.260.0330.02372.15
7.4.250.0230.01371.96
7.4.240.0190.01971.86
7.4.230.0270.01071.92
7.4.220.0520.04672.00
7.4.210.0390.03971.99
7.4.200.0230.01372.16
7.4.160.0450.03472.11
7.4.150.0660.02772.00
7.4.140.0560.03772.11
7.4.130.0600.04871.96
7.4.120.0590.03271.99
7.4.110.0690.02871.98
7.4.100.0520.04272.02
7.4.90.0580.03472.18
7.4.80.0630.02571.94
7.4.70.0580.02772.08
7.4.60.0660.02671.97
7.4.50.0340.02072.16
7.4.40.0630.02671.85
7.4.30.0620.02672.12
7.4.00.0270.04070.60
7.3.330.0300.033121.80
7.3.320.0570.023121.60
7.3.310.0250.01271.84
7.3.300.0190.01671.66
7.3.290.0530.04171.87
7.3.280.0590.02771.84
7.3.270.0470.04071.84
7.3.260.0510.03871.82
7.3.250.0720.03571.86
7.3.240.0670.02671.81
7.3.230.0800.03371.75
7.3.210.0520.03671.75
7.3.200.0670.02871.77
7.3.190.0570.03071.79
7.3.180.0630.03371.81
7.3.170.0510.03571.72
7.3.160.0520.03271.77
7.3.120.0210.04170.34
7.3.110.0390.03370.32
7.3.100.0300.02670.08
7.3.90.0330.03370.35
7.3.80.0290.02970.30
7.3.70.0160.03570.45
7.3.60.0290.03270.39
7.3.50.0260.02670.14
7.3.40.0360.01370.37
7.3.30.0350.02370.42
7.3.20.0070.02778.57
7.3.10.0060.02978.59
7.3.00.0140.01778.54
7.2.330.0480.04272.16
7.2.320.0820.03972.03
7.2.310.0540.03772.22
7.2.300.0520.03972.25
7.2.290.0810.04572.12
7.2.250.0460.03070.68
7.2.240.0320.03970.32
7.2.230.0300.03670.72
7.2.220.0460.03070.77
7.2.210.0230.03970.18
7.2.200.0360.02070.43
7.2.190.0270.02770.48
7.2.180.0440.02370.64
7.2.170.0220.02970.42
7.2.60.0690.02378.89
7.2.01.1960.02376.57
7.1.330.0040.04678.07
7.1.320.0040.04277.68
7.1.310.0100.03977.63
7.1.300.0130.03477.66
7.1.290.0130.04377.70
7.1.280.0690.03077.74
7.1.270.0160.02977.77
7.1.260.0070.04277.54
7.1.200.1480.02077.68
7.1.100.1230.00312.11
7.1.70.1120.02079.03
7.1.60.0140.03879.16
7.1.50.0330.01578.96
7.1.00.0170.08784.24
7.0.200.3650.02370.59
7.0.60.1300.10375.98
7.0.50.0230.06373.30
7.0.40.0130.08320.11
7.0.30.0330.06020.06
7.0.20.0370.06020.22
7.0.10.0170.09020.05
7.0.00.0070.06020.33
5.6.280.0270.08385.75
5.6.210.0200.07385.27
5.6.200.0300.11782.80
5.6.190.0330.10385.06
5.6.180.0530.04385.11
5.6.170.0230.08785.06
5.6.160.0300.06085.10
5.6.150.0300.11082.70
5.6.140.0170.08782.68
5.6.130.0230.06082.93
5.6.120.0200.07785.85
5.6.110.0470.10385.74
5.6.100.0470.09385.84
5.6.90.0330.06085.83
5.6.80.0330.10385.09
5.5.350.0470.11085.03
5.5.340.0300.05382.71
5.5.330.0200.07384.92
5.5.320.0330.07084.84
5.5.310.0470.10084.81
5.5.300.0170.07382.66
5.5.290.0200.06382.60
5.5.280.0170.06385.39
5.5.270.0400.10385.35
5.5.260.0270.08385.58
5.5.250.0400.11085.48
5.5.240.0330.10385.06

preferences:
86.87 ms | 400 KiB | 5 Q