3v4l.org

run code in 200+ PHP versions simultaneously
<?php $test_array = array('Element 1', 'Element 2', 'Element 3', 'Element 4', 'Element 5', 'Element 6'); $infArray = array(1, 2, 3); $arrayIterator = new ArrayIterator($infArray); var_dump($arrayIterator->current()); $infiniteIterator = new InfiniteIterator(new ArrayIterator($infArray)); var_dump($infiniteIterator->current()); foreach($test_array as $test){ echo $test . ' ' . $infiniteIterator->current() . '<br/>' . PHP_EOL; $infiniteIterator->next(); } echo phpversion();

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.4.10.0090.00514.80
7.4.00.0080.00614.88
7.3.130.0120.00414.44
7.3.120.0080.00914.53
7.3.110.0110.00514.81
7.3.100.0100.00714.68
7.3.90.0160.00914.66
7.3.80.0110.00714.92
7.3.70.0080.00814.63
7.3.60.0100.00614.63
7.3.50.0560.00914.61
7.3.40.0410.00814.62
7.3.30.0140.00614.55
7.3.20.0390.00914.65
7.3.10.0340.00914.79
7.3.00.0310.00614.77
7.2.260.0040.01615.14
7.2.250.0100.00615.19
7.2.240.0070.00914.91
7.2.230.0080.00915.00
7.2.220.0240.00714.96
7.2.210.0480.00415.07
7.2.200.0370.00714.88
7.2.190.0350.00714.98
7.2.180.0100.00814.95
7.2.170.0130.00814.82
7.2.160.0110.00814.90
7.2.150.0450.00714.83
7.2.140.0230.00914.96
7.2.130.0340.01015.04
7.2.120.0360.01015.03
7.2.110.0320.00714.97
7.2.100.0310.00815.00
7.2.90.0610.00715.08
7.2.80.0300.00915.04
7.2.70.0400.00715.10
7.2.60.0330.01115.14
7.2.50.0350.00915.09
7.2.40.0300.00515.13
7.2.30.0290.00615.05
7.2.20.0240.00915.02
7.2.10.0460.00814.96
7.2.00.0170.00915.73
7.1.330.0090.00813.81
7.1.320.0290.00513.92
7.1.310.0350.00913.88
7.1.300.0200.00513.69
7.1.290.0240.00613.89
7.1.280.0240.00913.75
7.1.270.0470.00813.70
7.1.260.0350.00813.79
7.1.250.0440.00413.76
7.1.240.0420.00613.94
7.1.230.0430.00513.72
7.1.220.0560.00513.81
7.1.210.0230.01013.85
7.1.200.0380.00613.70
7.1.190.0350.00713.71
7.1.180.0360.00913.82
7.1.170.0430.00813.81
7.1.160.0240.00614.00
7.1.150.0230.01013.78
7.1.140.0210.00713.86
7.1.130.0400.00813.88
7.1.120.0360.00713.86
7.1.110.0410.00413.93
7.1.100.0240.00814.68
7.1.90.0250.00713.93
7.1.80.0250.00613.84
7.1.70.0150.00714.41
7.1.60.0220.00714.59
7.1.50.0240.00914.52
7.1.40.0180.00814.38
7.1.30.0240.00914.23
7.1.20.0240.01114.41
7.1.10.0240.00614.37
7.1.00.0270.00514.40
7.0.330.0400.00513.40
7.0.320.0300.00813.47
7.0.310.0330.00713.56
7.0.300.0260.01013.58
7.0.290.0630.00713.48
7.0.280.0260.00613.46
7.0.270.0280.00713.49
7.0.260.0270.01113.42
7.0.250.0260.01013.52
7.0.240.0450.00313.59
7.0.230.0240.00713.57
7.0.220.0290.00713.49
7.0.210.0250.00813.54
7.0.200.0250.00914.15
7.0.190.0280.00814.13
7.0.180.0200.00814.13
7.0.170.0240.00814.08
7.0.160.0260.00814.03
7.0.150.0220.00614.07
7.0.140.0180.00514.18
7.0.130.0220.01014.21
7.0.120.0200.00814.11
7.0.110.0180.00914.08
7.0.100.0140.01014.09
7.0.90.0310.00714.04
7.0.80.0230.00714.05
7.0.70.0220.00614.08
7.0.60.0140.00914.02
7.0.50.0250.00414.11
7.0.40.0430.00714.01
7.0.30.0350.00813.85
7.0.20.0150.00613.87
7.0.10.0220.00613.87
7.0.00.0210.00713.95
5.6.400.0120.00914.22
5.6.390.0120.00814.36
5.6.380.0110.00714.35
5.6.370.0110.00714.24
5.6.360.0110.00814.25
5.6.350.0110.00814.41
5.6.340.0120.00714.30
5.6.330.0160.00514.32
5.6.320.0130.00514.24
5.6.310.0150.00614.09
5.6.300.0090.01715.60
5.6.290.0130.01615.71
5.6.280.0200.01815.67
5.6.270.0140.02215.67
5.6.260.0430.01415.71
5.6.250.0100.01715.56
5.6.240.0130.02415.56
5.6.230.0150.01215.65
5.6.220.0110.01415.58
5.6.210.0340.01915.47
5.6.200.0080.01915.50
5.6.190.0110.01415.47
5.6.180.0100.01415.55
5.6.170.0130.01515.57
5.6.160.0140.01415.55
5.6.150.0150.01315.46
5.6.140.0120.02015.57
5.6.130.0130.01415.59
5.6.120.0400.01615.54
5.6.110.0130.02415.62
5.6.100.0140.01315.68
5.6.90.0120.01515.61
5.6.80.0170.01315.23
5.6.70.0130.02015.45
5.6.60.0130.01615.36
5.6.50.0120.01915.36
5.6.40.0120.01815.31
5.6.30.0080.01715.33
5.6.20.0090.01615.34
5.6.10.0100.01915.41
5.6.00.0120.01415.30
5.5.380.0090.02614.89
5.5.370.0120.01414.93
5.5.360.0120.01514.91
5.5.350.0140.01414.99
5.5.340.0290.02414.95
5.5.330.0100.01515.04
5.5.320.0110.02314.74
5.5.310.0090.01614.86
5.5.300.0130.01714.96
5.5.290.0100.01714.83
5.5.280.0230.01214.81
5.5.270.0130.01714.96
5.5.260.0130.01514.88
5.5.250.0460.01214.83
5.5.240.0250.01114.79
5.5.230.0150.02214.80
5.5.220.0120.01714.73
5.5.210.0330.01514.85
5.5.200.0100.01714.66
5.5.190.0090.01714.87
5.5.180.0670.01614.69
5.5.170.0150.00714.08
5.5.160.0130.01214.80
5.5.150.0100.02614.75
5.5.140.0260.01414.77
5.5.130.0150.01214.70
5.5.120.0090.01914.79
5.5.110.0100.01514.74
5.5.100.0130.01314.57
5.5.90.0400.01114.79
5.5.80.0130.01814.73
5.5.70.0140.01414.80
5.5.60.0110.01414.61
5.5.50.0100.01414.73
5.5.40.0120.01314.72
5.5.30.0110.01314.66
5.5.20.0090.01614.74
5.5.10.0090.01714.73
5.5.00.0400.01414.72
5.4.450.0130.00913.43
5.4.440.0090.02113.38
5.4.430.0100.01213.40
5.4.420.0140.01113.42
5.4.410.0110.01313.43
5.4.400.0130.01113.32
5.4.390.0130.01713.37
5.4.380.0080.01513.28
5.4.370.0210.01313.26
5.4.360.0090.01513.33
5.4.350.0090.01313.34
5.4.340.0220.01213.36
5.4.330.0080.00511.93
5.4.320.0080.01213.33
5.4.310.0200.02113.33
5.4.300.0120.01313.37
5.4.290.0030.01813.32
5.4.280.0100.01113.31
5.4.270.0110.00913.38
5.4.260.0070.01413.33
5.4.250.0130.02113.30
5.4.240.0090.01313.37
5.4.230.0110.01113.36
5.4.220.0100.01713.29
5.4.210.0080.01313.30
5.4.200.0080.01213.36
5.4.190.0090.01213.30
5.4.180.0080.01213.31
5.4.170.0120.01113.32
5.4.160.0110.01713.30
5.4.150.0070.01613.37
5.4.140.0060.01412.85
5.4.130.0090.01112.90
5.4.120.0120.01112.81
5.4.110.0080.01312.78
5.4.100.0080.01412.88
5.4.90.0260.01412.76
5.4.80.0250.01312.75
5.4.70.0030.01512.85
5.4.60.0050.01312.85
5.4.50.0080.01212.83
5.4.40.0090.01212.87
5.4.30.0080.01312.82
5.4.20.0140.01312.87
5.4.10.0090.01012.81
5.4.00.0090.01212.66
5.3.290.0100.01712.50
5.3.280.0330.01212.44
5.3.270.0100.01312.48
5.3.260.0120.01112.48
5.3.250.0060.01412.50
5.3.240.0080.01312.47
5.3.230.0110.01512.49
5.3.220.0110.01012.44
5.3.210.0090.01212.45
5.3.200.0070.01512.43
5.3.190.0410.01212.45
5.3.180.0090.01512.47
5.3.170.0090.01512.47
5.3.160.0070.01212.44
5.3.150.0090.01312.49
5.3.140.0070.01312.46
5.3.130.0070.01312.46
5.3.120.0260.01212.44
5.3.110.0090.01312.44
5.3.100.0120.01112.46
5.3.90.0080.01212.46
5.3.80.0070.01412.44
5.3.70.0050.01412.43
5.3.60.0080.00912.43
5.3.50.0080.01112.46
5.3.40.0080.01112.42
5.3.30.0070.01212.47
5.3.20.0090.01012.45
5.3.10.0080.01312.44
5.3.00.0120.00912.40
5.2.170.0100.00912.46
5.2.160.0070.01412.45
5.2.150.0080.01112.45
5.2.140.0030.01612.35
5.2.130.0050.02612.39
5.2.120.0050.01912.45
5.2.110.0080.01512.46
5.2.100.0040.01612.42
5.2.90.0450.01312.44
5.2.80.0530.01512.41
5.2.70.0240.01412.38
5.2.60.0030.01712.30
5.2.50.0030.01812.41
5.2.40.0060.01412.43
5.2.30.0080.01412.39
5.2.20.0030.02312.32
5.2.10.0060.01612.37
5.2.00.0070.02012.29
5.1.60.0070.01812.16
5.1.50.0030.01512.04
5.1.40.0240.00812.06
5.1.30.0270.01612.22
5.1.20.0110.01112.16
5.1.10.0050.01212.11
5.1.00.0050.01412.12
5.0.50.0060.00811.75
5.0.40.0040.01011.79
5.0.30.0070.01411.75
5.0.20.0060.01111.77
5.0.10.0050.01411.75
5.0.00.0070.01611.75
4.4.90.0060.00711.75
4.4.80.0060.00611.75
4.4.70.0030.00811.75
4.4.60.0060.00911.75
4.4.50.0050.01011.75
4.4.40.0040.01311.75
4.4.30.0020.00911.75
4.4.20.0040.00711.75
4.4.10.0030.00911.75
4.4.00.0020.01111.75
4.3.110.0060.00411.75
4.3.100.0050.00611.75
4.3.90.0030.01211.75
4.3.80.0020.02211.75
4.3.70.0060.01111.75
4.3.60.0040.00811.75
4.3.50.0060.00711.75
4.3.40.0040.01011.75
4.3.30.0020.00811.75
4.3.20.0040.00811.75
4.3.10.0010.01111.75
4.3.00.0020.00811.75