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) { var_dump(get_class($this)); 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.0100.06321.08
5.6.210.0100.07720.48
5.6.200.0070.04018.20
5.6.190.0030.05320.39
5.6.180.0330.07720.51
5.6.170.0270.05020.47
5.6.160.0030.07720.47
5.6.150.0030.08318.12
5.6.140.0100.07718.24
5.6.130.0000.05018.15
5.6.120.0070.08721.03
5.6.110.0070.07020.99
5.6.100.0070.08720.99
5.6.90.0030.09321.00
5.6.80.0130.07020.35
5.5.350.3300.03320.39
5.5.340.0100.08018.07
5.5.330.0070.08320.43
5.5.320.0330.05320.24
5.5.310.0370.06320.27
5.5.300.0170.05018.01
5.5.290.0130.08017.98
5.5.280.0130.08020.91
5.5.270.0100.05020.77
5.5.260.0000.07320.66
5.5.250.0070.08020.70
5.5.240.0030.07720.05
5.4.450.0930.03719.42
5.4.440.0400.04043.88
5.4.430.0270.04738.68
5.4.420.0130.05037.55
5.4.410.0030.04735.13
5.4.400.0270.03031.64
5.4.390.0300.04331.53
5.4.380.0370.05318.75
5.4.370.0170.06318.65
5.4.360.0330.04718.76
5.4.350.0170.06318.59
5.4.340.0400.05018.80
5.4.320.0040.04212.51
5.4.310.0050.03912.50
5.4.300.0070.03612.51
5.4.290.0070.03812.51
5.4.280.0070.03412.40
5.4.270.0110.03212.41
5.4.260.0060.03812.40
5.4.250.0080.03612.41
5.4.240.0030.03912.40
5.4.230.0080.03812.39
5.4.220.0080.03312.39
5.4.210.0030.03812.39
5.4.200.0040.04312.40
5.4.190.0050.03912.39
5.4.180.0070.04112.39
5.4.170.0080.03612.41
5.4.160.0040.03912.40
5.4.150.0070.04212.40
5.4.140.0090.04612.08
5.4.130.0090.04312.07
5.4.120.0080.04512.02
5.4.110.0080.04512.02
5.4.100.0070.03512.02
5.4.90.0070.04012.02
5.4.80.0120.04012.02
5.4.70.0080.03412.02
5.4.60.0080.03712.02
5.4.50.0040.04412.02
5.4.40.0080.03712.01
5.4.30.0110.04212.00
5.4.20.0080.04212.00
5.4.10.0090.04412.00
5.4.00.0090.03911.49
5.3.290.0030.04312.80
5.3.280.0070.03712.71
5.3.270.0050.04012.72
5.3.260.0060.05312.72
5.3.250.0090.04712.71
5.3.240.0120.04512.72
5.3.230.0070.04912.71
5.3.220.0090.04812.68
5.3.210.0090.05112.68
5.3.200.0070.04912.68
5.3.190.0080.04812.68
5.3.180.0100.04712.68
5.3.170.0060.05012.67
5.3.160.0090.04812.68
5.3.150.0100.05012.67
5.3.140.0100.05112.66
5.3.130.0140.04612.66
5.3.120.0120.04712.66
5.3.110.0070.05312.66
5.3.100.0070.04912.13
5.3.90.0120.04212.11
5.3.80.0100.04212.10
5.3.70.0070.04712.10
5.3.60.0090.04612.08
5.3.50.0110.04612.03
5.3.40.0110.04812.03
5.3.30.0130.05011.99
5.3.20.0080.04611.77
5.3.10.0070.05111.73
5.3.00.0090.04911.72
5.2.170.0050.0419.22
5.2.160.0060.0399.22
5.2.150.0080.0409.23
5.2.140.0070.0409.22
5.2.130.0070.0389.18
5.2.120.0070.0399.18
5.2.110.0090.0359.19
5.2.100.0070.0379.18
5.2.90.0070.0389.19
5.2.80.0070.0399.18
5.2.70.0040.0419.18
5.2.60.0070.0409.14
5.2.50.0040.0459.10
5.2.40.0070.0379.08
5.2.30.0090.0389.05
5.2.20.0070.0389.05
5.2.10.0060.0398.95
5.2.00.0070.0378.82
5.1.60.0040.0358.10
5.1.50.0060.0338.09
5.1.40.0050.0358.07
5.1.30.0100.0288.43
5.1.20.0050.0358.45
5.1.10.0060.0318.17
5.1.00.0090.0318.17
5.0.50.0050.0266.65
5.0.40.0050.0256.50
5.0.30.0040.0406.32
5.0.20.0070.0226.29
5.0.10.0050.0246.26
5.0.00.0060.0346.25
4.4.90.0030.0214.78
4.4.80.0030.0214.76
4.4.70.0030.0224.76
4.4.60.0040.0204.75
4.4.50.0030.0214.77
4.4.40.0020.0344.71
4.4.30.0070.0174.76
4.4.20.0050.0204.84
4.4.10.0070.0184.84
4.4.00.0070.0284.76
4.3.110.0040.0214.67
4.3.100.0020.0224.66
4.3.90.0030.0204.64
4.3.80.0030.0324.58
4.3.70.0010.0234.63
4.3.60.0030.0204.63
4.3.50.0040.0204.63
4.3.40.0030.0324.54
4.3.30.0030.0203.30
4.3.20.0020.0213.28
4.3.10.0020.0213.23
4.3.00.0000.02328.65

preferences:
158.92 ms | 1398 KiB | 7 Q