3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($reset = FALSE) { static $i; if ($reset) { unset($i); return; } if (!isset($i)) $i = 3; if ($i <= 0) return; return array('id' => $i--, 'someValue' => mt_rand()); } $rappels = array(); $i = 0; while($row = test()) { foreach($row as $key=>$val) { $rappels[$i][$key] = $val; } $i++; } var_dump($rappels); test(TRUE); $rappels = array(); while($row = test()) { $rappels[] = $val; } var_dump($rappels);

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)
7.2.00.0060.00319.32
7.1.70.0070.01017.10
7.1.60.0150.00417.25
7.1.50.0040.01817.04
7.1.00.0000.08322.45
7.0.200.0040.00416.68
7.0.140.0000.07722.21
7.0.60.0070.07719.94
7.0.50.0030.05717.94
7.0.40.0070.05320.11
7.0.30.0500.06020.27
7.0.20.0300.07720.08
7.0.10.0070.04320.19
7.0.00.0130.07320.08
5.6.280.0130.06321.00
5.6.210.0100.08320.47
5.6.200.0100.03318.18
5.6.190.0100.08320.48
5.6.180.0300.07720.62
5.6.170.0270.03020.47
5.6.160.0130.07320.61
5.6.150.0100.08018.18
5.6.140.0100.06018.15
5.6.130.0030.06318.21
5.6.120.0000.06021.02
5.6.110.0030.08321.12
5.6.100.0170.06320.96
5.6.90.0130.03321.13
5.6.80.0070.08020.29
5.5.350.0000.08320.37
5.5.340.0100.07318.09
5.5.330.0100.07320.45
5.5.320.0330.04720.32
5.5.310.0430.07320.30
5.5.300.0100.08318.01
5.5.290.0070.04317.98
5.5.280.0230.04020.77
5.5.270.0070.04020.84
5.5.260.0100.04020.76
5.5.250.0030.08320.46
5.5.240.3900.04320.18
5.4.450.0630.04019.48
5.4.440.0700.06319.61
5.4.430.0070.05719.52
5.4.420.0100.05319.51
5.4.410.0130.05019.41
5.4.400.0130.05019.29
5.4.390.0230.04018.98
5.4.380.0300.06018.77
5.4.370.0270.05318.80
5.4.360.0230.05718.52
5.4.350.0300.05318.63
5.4.340.0430.05318.84
5.4.320.0120.03212.50
5.4.310.0050.04012.50
5.4.300.0070.04212.50
5.4.290.0080.04412.48
5.4.280.0070.03612.38
5.4.270.0040.03912.38
5.4.260.0030.04212.38
5.4.250.0090.03712.38
5.4.240.0070.03712.39
5.4.230.0030.04112.38
5.4.220.0050.05512.38
5.4.210.0090.05012.38
5.4.200.0070.04112.38
5.4.190.0050.03812.37
5.4.180.0040.04012.37
5.4.170.0070.04412.38
5.4.160.0060.05612.37
5.4.150.0080.04912.38
5.4.140.0100.04812.05
5.4.130.0050.03712.04
5.4.120.0040.03712.00
5.4.110.0040.03912.00
5.4.100.0070.03712.00
5.4.90.0100.04912.00
5.4.80.0080.03812.00
5.4.70.0080.03212.00
5.4.60.0020.03911.99
5.4.50.0060.03511.99
5.4.40.0050.03511.98
5.4.30.0080.03411.98
5.4.20.0070.03411.98
5.4.10.0010.04711.98
5.4.00.0100.03311.47
5.3.290.0140.05312.80
5.3.280.0050.03912.71
5.3.270.0080.04112.73
5.3.260.0100.03512.72
5.3.250.0060.03812.72
5.3.240.0050.03912.72
5.3.230.0060.03812.71
5.3.220.0080.03612.68
5.3.210.0060.04112.68
5.3.200.0060.03512.68
5.3.190.0050.03912.68
5.3.180.0060.03612.68
5.3.170.0050.03712.67
5.3.160.0080.03412.67
5.3.150.0050.03912.67
5.3.140.0090.03312.66
5.3.130.0080.03812.66
5.3.120.0060.03812.66
5.3.110.0120.03312.66
5.3.100.0050.03712.12
5.3.90.0070.03812.11
5.3.80.0050.03812.09
5.3.70.0030.04012.10
5.3.60.0070.03612.08
5.3.50.0070.03512.02
5.3.40.0060.03812.02
5.3.30.0070.03411.99
5.3.20.0030.04711.77
5.3.10.0070.03711.73
5.3.00.0080.03811.72
5.2.170.0050.0319.21
5.2.160.0060.0309.22
5.2.150.0040.0319.22
5.2.140.0030.0319.22
5.2.130.0020.0319.18
5.2.120.0020.0319.18
5.2.110.0040.0309.19
5.2.100.0030.0309.18
5.2.90.0050.0299.18
5.2.80.0050.0309.18
5.2.70.0030.0329.18
5.2.60.0040.0389.13
5.2.50.0070.0289.10
5.2.40.0070.0279.07
5.2.30.0050.0299.05
5.2.20.0020.0359.04
5.2.10.0040.0298.95
5.2.00.0030.0318.81
5.1.60.0050.0268.09
5.1.50.0040.0258.09
5.1.40.0040.0298.06
5.1.30.0080.0248.42
5.1.20.0080.0328.43
5.1.10.0040.0288.17
5.1.00.0080.0248.16
5.0.50.0030.0226.64
5.0.40.0050.0196.50
5.0.30.0030.0376.31
5.0.20.0040.0246.28
5.0.10.0040.0216.25
5.0.00.0020.0336.25
4.4.90.0060.0134.78
4.4.80.0040.0154.75
4.4.70.0030.0164.75
4.4.60.0040.0154.76
4.4.50.0030.0164.77
4.4.40.0020.0274.71
4.4.30.0030.0164.76
4.4.20.0030.0164.84
4.4.10.0000.0194.85
4.4.00.0040.0254.76
4.3.110.0050.0144.66
4.3.100.0040.0144.66
4.3.90.0030.0144.64
4.3.80.0040.0234.58
4.3.70.0030.0144.63
4.3.60.0030.0144.63
4.3.50.0030.0154.62
4.3.40.0040.0234.54
4.3.30.0010.0173.30
4.3.20.0020.0173.28
4.3.10.0010.0213.24
4.3.00.0170.0308.16

preferences:
36.85 ms | 401 KiB | 5 Q