3v4l.org

run code in 300+ PHP versions simultaneously
<?php class int extends ArrayIterator { public function __construct() { parent::__construct(range(1, 5)); } public function say($what) { echo "Say $what\n"; } } $i = new IteratorIterator(new int); var_dump(iterator_to_array($i)); $i->say('foo');

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)
5.6.280.0000.07320.88
5.6.210.0130.07320.52
5.6.200.0070.04718.14
5.6.190.0100.08720.41
5.6.180.4100.04020.58
5.6.170.0230.04720.56
5.6.160.0070.07720.54
5.6.150.0000.06318.14
5.6.140.0030.08018.18
5.6.130.0070.03718.18
5.6.120.0200.07020.96
5.6.110.0030.04021.05
5.6.100.0130.07721.04
5.6.90.0130.07720.89
5.6.80.0100.08020.29
5.6.70.0000.08320.39
5.5.350.0200.07720.43
5.5.340.0070.07718.05
5.5.330.0100.08020.21
5.5.320.0300.05720.28
5.5.310.0330.07720.37
5.5.300.0030.04317.93
5.5.290.0070.03718.00
5.5.280.0100.08320.86
5.5.270.0170.05720.73
5.5.260.0070.08720.85
5.5.250.0000.08020.61
5.5.240.0030.07320.16
5.4.450.0800.05319.36
5.4.440.0830.05719.38
5.4.430.0870.06719.54
5.4.420.0670.00019.38
5.4.410.0300.06318.86
5.4.400.0230.05718.77
5.4.390.0200.06318.80
5.4.380.0170.05018.78
5.4.370.0130.04318.58
5.4.360.0130.03318.81
5.4.350.0070.04312.02
5.4.340.0080.03412.02
5.4.320.0060.04112.51
5.4.310.0060.04512.51
5.4.300.0060.05012.51
5.4.290.0070.05312.50
5.4.280.0100.04612.40
5.4.270.0070.04712.40
5.4.260.0060.05212.40
5.4.250.0100.04712.40
5.4.240.0070.04912.41
5.4.230.0100.04812.39
5.4.220.0100.04612.39
5.4.210.0060.04412.39
5.4.200.0090.04012.39
5.4.190.0080.04012.39
5.4.180.0070.03912.39
5.4.170.0060.04112.40
5.4.160.0090.04012.40
5.4.150.0040.04412.39
5.4.140.0070.04312.07
5.4.130.0080.04112.06
5.4.120.0060.04212.03
5.4.110.0070.04012.02
5.4.100.0060.04612.02
5.4.90.0070.05012.02
5.4.80.0130.04412.02
5.4.70.0090.04612.02
5.4.60.0060.05512.01
5.4.50.0070.05612.02
5.4.40.0050.05512.00
5.4.30.0070.05412.00
5.4.20.0100.05212.00
5.4.10.0140.06812.00
5.4.00.0060.06211.49
5.3.290.0080.04812.80
5.3.280.0120.05812.71
5.3.270.0110.06012.72
5.3.260.0090.05712.72
5.3.250.0080.04912.72
5.3.240.0110.04612.71
5.3.230.0130.03912.71
5.3.220.0140.04512.68
5.3.210.0060.05312.68
5.3.200.0070.04612.68
5.3.190.0090.07112.67
5.3.180.0110.05312.67
5.3.170.0150.05112.67
5.3.160.0110.05412.68
5.3.150.0130.04912.68
5.3.140.0070.05012.66
5.3.130.0060.05512.66
5.3.120.0050.05812.66
5.3.110.0100.05012.66
5.3.100.0060.05012.13
5.3.90.0100.05012.11
5.3.80.0080.04712.10
5.3.70.0090.04512.10
5.3.60.0070.04912.09
5.3.50.0090.04112.03
5.3.40.0090.03512.03
5.3.30.0130.03111.99
5.3.20.0070.03511.77
5.3.10.0050.04511.73
5.3.00.0080.04111.72
5.2.170.0030.0339.23
5.2.160.0040.0309.23
5.2.150.0030.0339.22
5.2.140.0090.0319.22
5.2.130.0050.0369.18
5.2.120.0120.0329.18
5.2.110.0080.0339.19
5.2.100.0070.0329.18
5.2.90.0090.0329.18
5.2.80.0080.0369.18
5.2.70.0100.0369.18
5.2.60.0100.0369.13
5.2.50.0100.0369.11
5.2.40.0060.0369.08
5.2.30.0050.0309.06
5.2.20.0050.0309.04
5.2.10.0080.0298.95
5.2.00.0070.0318.81
5.1.60.0060.0238.09
5.1.50.0040.0258.09
5.1.40.0070.0228.07
5.1.30.0020.0288.43
5.1.20.0010.0318.44
5.1.10.0050.0258.17
5.1.00.0060.0238.17
5.0.50.0030.0216.65
5.0.40.0050.0216.50
5.0.30.0030.0366.32
5.0.20.0070.0206.28
5.0.10.0040.0236.26
5.0.00.0050.0306.25
4.4.90.0000.0184.78
4.4.80.0070.0114.75
4.4.70.0030.0164.75
4.4.60.0040.0144.75
4.4.50.0060.0164.77
4.4.40.0030.0294.71
4.4.30.0020.0164.76
4.4.20.0060.0134.84
4.4.10.0040.0164.85
4.4.00.0030.0264.76
4.3.110.0040.0164.67
4.3.100.0030.0224.66
4.3.90.0030.0224.63
4.3.80.0020.0344.59
4.3.70.0030.0204.63
4.3.60.0040.0194.63
4.3.50.0060.0204.62
4.3.40.0040.0254.54
4.3.30.0030.0173.30
4.3.20.0040.0153.28
4.3.10.0010.0223.24
4.3.00.0170.0176.41

preferences:
135.87 ms | 1394 KiB | 7 Q