3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array_fill(0, 100000, 'hello'); $start = microtime(true); foreach ($arr as $ar) {} echo 'Array Iteration :' . round(microtime(true) - $start, 4); $start = microtime(true); foreach (SplFixedArray::fromArray($arr) as $ar) {} echo 'SPL Iteration :' . round(microtime(true) - $start, 4);
Output for 7.1.0
Array Iteration :0.0011SPL Iteration :0.0041
Output for 7.0.14
Array Iteration :0.001SPL Iteration :0.004
Output for 7.0.11
Array Iteration :0.0006SPL Iteration :0.049
Output for 7.0.10
Array Iteration :0.0012SPL Iteration :0.0112
Output for 7.0.9
Array Iteration :0.0008SPL Iteration :0.0096
Output for 7.0.8
Array Iteration :0.0008SPL Iteration :0.0098
Output for 7.0.7
Array Iteration :0.0008SPL Iteration :0.0109
Output for 7.0.6
Array Iteration :0.0008SPL Iteration :0.0107
Output for 7.0.5
Array Iteration :0.0007SPL Iteration :0.0096
Output for 7.0.4
Array Iteration :0.0006SPL Iteration :0.0028
Output for 7.0.3
Array Iteration :0.0011SPL Iteration :0.0037
Output for 7.0.2
Array Iteration :0.0009SPL Iteration :0.0038
Output for 7.0.1
Array Iteration :0.0008SPL Iteration :0.0033
Output for 7.0.0
Array Iteration :0.0007SPL Iteration :0.0027
Output for 5.6.28
Array Iteration :0.004SPL Iteration :0.0105
Output for 5.6.26
Array Iteration :0.0044SPL Iteration :0.0119
Output for 5.6.25
Array Iteration :0.0043SPL Iteration :0.0106
Output for 5.6.24
Array Iteration :0.0042SPL Iteration :0.0117
Output for 5.6.15, 5.6.23
Array Iteration :0.0027SPL Iteration :0.0073
Output for 5.6.22
Array Iteration :0.003SPL Iteration :0.0082
Output for 5.4.21, 5.6.21
Array Iteration :0.0024SPL Iteration :0.0065
Output for 5.3.18, 5.6.20
Array Iteration :0.0022SPL Iteration :0.0061
Output for 5.6.19
Array Iteration :0.0047SPL Iteration :0.0138
Output for 5.6.18
Array Iteration :0.0051SPL Iteration :0.0122
Output for 5.6.2, 5.6.17
Array Iteration :0.0024SPL Iteration :0.0067
Output for 5.6.16
Array Iteration :0.0047SPL Iteration :0.0118
Output for 5.6.14
Array Iteration :0.0023SPL Iteration :0.0065
Output for 5.6.13
Array Iteration :0.0025SPL Iteration :0.0068
Output for 5.6.12
Array Iteration :0.0029SPL Iteration :0.0079
Output for 5.6.11
Array Iteration :0.0024SPL Iteration :0.0068
Output for 5.6.10
Array Iteration :0.0031SPL Iteration :0.0089
Output for 5.6.9
Array Iteration :0.0025SPL Iteration :0.0071
Output for 5.6.8
Array Iteration :0.0033SPL Iteration :0.0092
Output for 5.3.20, 5.6.7
Array Iteration :0.0025SPL Iteration :0.0067
Output for 5.6.5 - 5.6.6
Array Iteration :0.0021SPL Iteration :0.006
Output for 5.6.4
Array Iteration :0.0044SPL Iteration :0.0113
Output for 5.6.3
Array Iteration :0.0031SPL Iteration :0.0059
Output for 5.6.1
Array Iteration :0.003SPL Iteration :0.0077
Output for 5.3.3, 5.6.0
Array Iteration :0.0026SPL Iteration :0.0076
Output for 5.5.38
Array Iteration :0.0035SPL Iteration :0.008
Output for 5.5.37
Array Iteration :0.0024SPL Iteration :0.0064
Output for 5.5.27, 5.5.36
Array Iteration :0.0031SPL Iteration :0.0081
Output for 5.5.7, 5.5.35
Array Iteration :0.0023SPL Iteration :0.0066
Output for 5.5.5, 5.5.34
Array Iteration :0.0032SPL Iteration :0.0086
Output for 5.4.42, 5.5.33
Array Iteration :0.0029SPL Iteration :0.0077
Output for 5.5.32
Array Iteration :0.0055SPL Iteration :0.0137
Output for 5.5.31
Array Iteration :0.0036SPL Iteration :0.0076
Output for 5.3.9, 5.4.18, 5.5.30
Array Iteration :0.0025SPL Iteration :0.0066
Output for 5.5.29
Array Iteration :0.0029SPL Iteration :0.0063
Output for 5.5.28
Array Iteration :0.0031SPL Iteration :0.0083
Output for 5.5.26
Array Iteration :0.0041SPL Iteration :0.0096
Output for 5.5.25
Array Iteration :0.0027SPL Iteration :0.0071
Output for 5.5.24
Array Iteration :0.0036SPL Iteration :0.009
Output for 5.5.23
Array Iteration :0.0038SPL Iteration :0.0107
Output for 5.5.22
Array Iteration :0.0034SPL Iteration :0.0079
Output for 5.5.21
Array Iteration :0.0025SPL Iteration :0.0098
Output for 5.5.20
Array Iteration :0.0039SPL Iteration :0.0102
Output for 5.5.19
Array Iteration :0.0037SPL Iteration :0.0098
Output for 5.5.18
Array Iteration :0.0055SPL Iteration :0.0101
Output for 5.3.29, 5.5.16
Array Iteration :0.0039SPL Iteration :0.009
Output for 5.5.15
Array Iteration :0.0032SPL Iteration :0.0092
Output for 5.4.41, 5.5.14
Array Iteration :0.0028SPL Iteration :0.0074
Output for 5.5.13
Array Iteration :0.0034SPL Iteration :0.0094
Output for 5.5.12
Array Iteration :0.0027SPL Iteration :0.0076
Output for 5.5.11
Array Iteration :0.0032SPL Iteration :0.0087
Output for 5.5.10
Array Iteration :0.0029SPL Iteration :0.008
Output for 5.5.9
Array Iteration :0.0031SPL Iteration :0.0086
Output for 5.5.8
Array Iteration :0.0033SPL Iteration :0.0086
Output for 5.5.6
Array Iteration :0.0031SPL Iteration :0.0085
Output for 5.5.4
Array Iteration :0.0037SPL Iteration :0.0078
Output for 5.4.25, 5.5.3
Array Iteration :0.0028SPL Iteration :0.0073
Output for 5.5.2
Array Iteration :0.0024SPL Iteration :0.0069
Output for 5.5.1
Array Iteration :0.0028SPL Iteration :0.0075
Output for 5.5.0
Array Iteration :0.0037SPL Iteration :0.0094
Output for 5.4.45
Array Iteration :0.0025SPL Iteration :0.0064
Output for 5.4.40, 5.4.44
Array Iteration :0.0033SPL Iteration :0.0088
Output for 5.3.19, 5.3.26, 5.4.43
Array Iteration :0.0028SPL Iteration :0.0072
Output for 5.4.39
Array Iteration :0.0026SPL Iteration :0.0085
Output for 5.4.38
Array Iteration :0.0032SPL Iteration :0.0083
Output for 5.3.14, 5.4.37
Array Iteration :0.003SPL Iteration :0.0078
Output for 5.4.36
Array Iteration :0.003SPL Iteration :0.0072
Output for 5.3.25, 5.4.26, 5.4.35
Array Iteration :0.0032SPL Iteration :0.0082
Output for 5.4.34
Array Iteration :0.0037SPL Iteration :0.0119
Output for 5.4.32
Array Iteration :0.0036SPL Iteration :0.0099
Output for 5.4.31
Array Iteration :0.0027SPL Iteration :0.0067
Output for 5.4.30
Array Iteration :0.003SPL Iteration :0.008
Output for 5.4.29
Array Iteration :0.0043SPL Iteration :0.0101
Output for 5.4.28
Array Iteration :0.004SPL Iteration :0.0082
Output for 5.4.27
Array Iteration :0.0038SPL Iteration :0.01
Output for 5.4.24
Array Iteration :0.0027SPL Iteration :0.0065
Output for 5.3.6, 5.4.0, 5.4.23
Array Iteration :0.0024SPL Iteration :0.0063
Output for 5.4.22
Array Iteration :0.0027SPL Iteration :0.0082
Output for 5.4.20
Array Iteration :0.0034SPL Iteration :0.0091
Output for 5.4.19
Array Iteration :0.0036SPL Iteration :0.0101
Output for 5.4.7, 5.4.17
Array Iteration :0.0024SPL Iteration :0.0062
Output for 5.4.16
Array Iteration :0.0036SPL Iteration :0.0083
Output for 5.3.7, 5.4.15
Array Iteration :0.0027SPL Iteration :0.0072
Output for 5.4.14
Array Iteration :0.0029SPL Iteration :0.0088
Output for 5.4.13
Array Iteration :0.0027SPL Iteration :0.0077
Output for 5.4.12
Array Iteration :0.0025SPL Iteration :0.0065
Output for 5.3.2, 5.4.11
Array Iteration :0.0021SPL Iteration :0.0062
Output for 5.4.10
Array Iteration :0.0023SPL Iteration :0.0064
Output for 5.4.3, 5.4.9
Array Iteration :0.0025SPL Iteration :0.0061
Output for 5.4.8
Array Iteration :0.0033SPL Iteration :0.0087
Output for 5.4.6
Array Iteration :0.0036SPL Iteration :0.01
Output for 5.4.5
Array Iteration :0.0031SPL Iteration :0.006
Output for 5.4.4
Array Iteration :0.0051SPL Iteration :0.0083
Output for 5.4.2
Array Iteration :0.0021SPL Iteration :0.0056
Output for 5.3.12, 5.4.1
Array Iteration :0.0025SPL Iteration :0.0063
Output for 5.3.28
Array Iteration :0.0038SPL Iteration :0.0086
Output for 5.3.27
Array Iteration :0.0038SPL Iteration :0.0078
Output for 5.3.24
Array Iteration :0.0038SPL Iteration :0.0093
Output for 5.3.23
Array Iteration :0.0028SPL Iteration :0.0079
Output for 5.3.22
Array Iteration :0.0045SPL Iteration :0.0097
Output for 5.3.21
Array Iteration :0.0027SPL Iteration :0.0062
Output for 5.3.17
Array Iteration :0.0038SPL Iteration :0.0087
Output for 5.3.16
Array Iteration :0.003SPL Iteration :0.0074
Output for 5.3.15
Array Iteration :0.0026SPL Iteration :0.0069
Output for 5.3.13
Array Iteration :0.0026SPL Iteration :0.0066
Output for 5.3.11
Array Iteration :0.0026SPL Iteration :0.0068
Output for 5.3.10
Array Iteration :0.0033SPL Iteration :0.0065
Output for 5.3.8
Array Iteration :0.0022SPL Iteration :0.0056
Output for 5.3.5
Array Iteration :0.0027SPL Iteration :0.007
Output for 5.3.4
Array Iteration :0.0029SPL Iteration :0.0074
Output for 5.3.1
Array Iteration :0.003SPL Iteration :0.0071
Output for 5.3.0
Array Iteration :0.0024SPL Iteration :0.0058
Output for 5.2.4, 5.2.6, 5.2.15, 5.2.17
Array Iteration :0.0037 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.2.13, 5.2.16
Array Iteration :0.0031 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.1.1, 5.2.3, 5.2.5, 5.2.14
Array Iteration :0.0038 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.1.2, 5.1.5 - 5.1.6, 5.2.12
Array Iteration :0.0036 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.2.9, 5.2.11
Array Iteration :0.003 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.1.0, 5.1.3, 5.2.7, 5.2.10
Array Iteration :0.0035 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.2.8
Array Iteration :0.0029 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.2.2
Array Iteration :0.0039 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.2.0 - 5.2.1
Array Iteration :0.004 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.1.4
Array Iteration :0.0034 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.0.5
Array Iteration :0.0141 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.0.4
Array Iteration :0.0161 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.0.3
Array Iteration :0.0251 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.0.2
Array Iteration :0.0242 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.0.1
Array Iteration :0.0257 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 5.0.0
Array Iteration :0.0232 Fatal error: Class 'SplFixedArray' not found in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.4.4, 4.4.9
Array Iteration :0.0072 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.4.1 - 4.4.2, 4.4.8
Array Iteration :0.0069 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.4.5, 4.4.7
Array Iteration :0.0058 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.4.6
Array Iteration :0.0106 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.4.3
Array Iteration :0.0068 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.4.0
Array Iteration :0.0077 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.3.11
Array Iteration :0.007 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.3.10
Array Iteration :0.0071 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.3.9
Array Iteration :0.0284 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.3.8
Array Iteration :0.0198 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.3.3, 4.3.7
Array Iteration :0.0177 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.3.4, 4.3.6
Array Iteration :0.0223 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.3.5
Array Iteration :0.0258 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.3.2
Array Iteration :0.0323 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Process exited with code 255.
Output for 4.3.1
Array Iteration :0.0273 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11
Output for 4.3.0
Array Iteration :0.0209 Fatal error: Undefined class name 'splfixedarray' in /in/PrgPD on line 11