<?php
$arr = array_fill(0, 100000, 'hello');
$start = microtime(true);
foreach ($arr as $ar) {}
echo 'Array Iteration :' . round(microtime(true) - $start, 4) . "\n";
$arr = SplFixedArray::fromArray($arr);
$start = microtime(true);
foreach ($arr as $ar) {}
echo 'SPL Iteration :' . round(microtime(true) - $start, 4) . "\n";
- Output for 7.2.0
- Array Iteration :0.0011
SPL Iteration :0.0018
- Output for 7.0.0 - 7.0.2, 7.1.7
- Array Iteration :0.0006
SPL Iteration :0.0017
- Output for 7.1.6
- Array Iteration :0.0019
SPL Iteration :0.0041
- Output for 7.1.5
- Array Iteration :0.0017
SPL Iteration :0.0038
- Output for 7.1.0
- Array Iteration :0.0011
SPL Iteration :0.003
- Output for 7.0.20
- Array Iteration :0.001
SPL Iteration :0.0026
- Output for 7.0.14
- Array Iteration :0.001
SPL Iteration :0.0029
- Output for 7.0.6
- Array Iteration :0.0008
SPL Iteration :0.0023
- Output for 7.0.5
- Array Iteration :0.0008
SPL Iteration :0.0022
- Output for 7.0.4
- Array Iteration :0.0006
SPL Iteration :0.0016
- Output for 7.0.3
- Array Iteration :0.0006
SPL Iteration :0.0018
- Output for 5.6.28
- Array Iteration :0.004
SPL Iteration :0.0083
- Output for 5.6.21
- Array Iteration :0.0036
SPL Iteration :0.0081
- Output for 5.6.20
- Array Iteration :0.0022
SPL Iteration :0.0056
- Output for 5.6.19
- Array Iteration :0.0022
SPL Iteration :0.0058
- Output for 5.6.18
- Array Iteration :0.0029
SPL Iteration :0.0076
- Output for 5.6.17
- Array Iteration :0.0022
SPL Iteration :0.0057
- Output for 5.6.16
- Array Iteration :0.0025
SPL Iteration :0.0072
- Output for 5.6.15
- Array Iteration :0.0026
SPL Iteration :0.0066
- Output for 5.6.14
- Array Iteration :0.0031
SPL Iteration :0.0079
- Output for 5.6.13
- Array Iteration :0.0027
SPL Iteration :0.007
- Output for 5.6.12
- Array Iteration :0.003
SPL Iteration :0.0068
- Output for 5.6.11
- Array Iteration :0.0027
SPL Iteration :0.0074
- Output for 5.6.10
- Array Iteration :0.0023
SPL Iteration :0.006
- Output for 5.6.9
- Array Iteration :0.0024
SPL Iteration :0.0063
- Output for 5.6.8
- Array Iteration :0.0029
SPL Iteration :0.0074
- Output for 5.5.35
- Array Iteration :0.004
SPL Iteration :0.0063
- Output for 5.4.31, 5.5.34
- Array Iteration :0.0025
SPL Iteration :0.0045
- Output for 5.5.33
- Array Iteration :0.003
SPL Iteration :0.006
- Output for 5.5.32
- Array Iteration :0.0023
SPL Iteration :0.0041
- Output for 5.5.31
- Array Iteration :0.0028
SPL Iteration :0.0048
- Output for 5.5.30
- Array Iteration :0.0034
SPL Iteration :0.006
- Output for 5.5.29
- Array Iteration :0.0033
SPL Iteration :0.0058
- Output for 5.5.26, 5.5.28
- Array Iteration :0.0032
SPL Iteration :0.0059
- Output for 5.5.27
- Array Iteration :0.0034
SPL Iteration :0.0059
- Output for 5.5.25
- Array Iteration :0.003
SPL Iteration :0.0052
- Output for 5.5.24
- Array Iteration :0.0029
SPL Iteration :0.0058
- Output for 5.4.45
- Array Iteration :0.0022
SPL Iteration :0.0034
- Output for 5.4.44
- Array Iteration :0.0031
SPL Iteration :0.0053
- Output for 5.4.43
- Array Iteration :0.002
SPL Iteration :0.0036
- Output for 5.4.42
- Array Iteration :0.002
SPL Iteration :0.0051
- Output for 5.4.41
- Array Iteration :0.0038
SPL Iteration :0.0062
- Output for 5.4.40
- Array Iteration :0.0036
SPL Iteration :0.006
- Output for 5.4.39
- Array Iteration :0.004
SPL Iteration :0.0062
- Output for 5.4.38
- Array Iteration :0.0039
SPL Iteration :0.0064
- Output for 5.4.37
- Array Iteration :0.0036
SPL Iteration :0.0065
- Output for 5.4.36
- Array Iteration :0.0034
SPL Iteration :0.0061
- Output for 5.4.35
- Array Iteration :0.0072
SPL Iteration :0.0063
- Output for 5.4.34
- Array Iteration :0.0037
SPL Iteration :0.0057
- Output for 5.4.32
- Array Iteration :0.0024
SPL Iteration :0.0044
- Output for 5.4.30
- Array Iteration :0.0027
SPL Iteration :0.0045
- Output for 5.4.29
- Array Iteration :0.0043
SPL Iteration :0.0046
- Output for 5.4.28
- Array Iteration :0.0026
SPL Iteration :0.0047
- Output for 5.4.27
- Array Iteration :0.0043
SPL Iteration :0.008
- Output for 5.4.26
- Array Iteration :0.0031
SPL Iteration :0.0058
- Output for 5.4.25
- Array Iteration :0.0029
SPL Iteration :0.006
- Output for 5.4.24
- Array Iteration :0.004
SPL Iteration :0.0088
- Output for 5.4.23
- Array Iteration :0.003
SPL Iteration :0.0056
- Output for 5.4.22
- Array Iteration :0.0029
SPL Iteration :0.0051
- Output for 5.4.5, 5.4.13, 5.4.18, 5.4.20 - 5.4.21
- Array Iteration :0.003
SPL Iteration :0.0051
- Output for 5.4.19
- Array Iteration :0.0031
SPL Iteration :0.0054
- Output for 5.4.17
- Array Iteration :0.0026
SPL Iteration :0.0055
- Output for 5.4.16
- Array Iteration :0.004
SPL Iteration :0.008
- Output for 5.4.15
- Array Iteration :0.0038
SPL Iteration :0.008
- Output for 5.4.14
- Array Iteration :0.0039
SPL Iteration :0.0078
- Output for 5.4.12
- Array Iteration :0.0027
SPL Iteration :0.0047
- Output for 5.4.6, 5.4.11
- Array Iteration :0.0028
SPL Iteration :0.0049
- Output for 5.4.10
- Array Iteration :0.003
SPL Iteration :0.0048
- Output for 5.4.9
- Array Iteration :0.0041
SPL Iteration :0.0068
- Output for 5.4.8
- Array Iteration :0.0042
SPL Iteration :0.0082
- Output for 5.4.7
- Array Iteration :0.0039
SPL Iteration :0.0077
- Output for 5.4.0, 5.4.4
- Array Iteration :0.0029
SPL Iteration :0.005
- Output for 5.4.3
- Array Iteration :0.003
SPL Iteration :0.0077
- Output for 5.4.2
- Array Iteration :0.0028
SPL Iteration :0.0056
- Output for 5.3.5, 5.4.1
- Array Iteration :0.0032
SPL Iteration :0.0052
- Output for 5.3.29
- Array Iteration :0.0029
SPL Iteration :0.0047
- Output for 5.3.28
- Array Iteration :0.0044
SPL Iteration :0.0082
- Output for 5.3.27
- Array Iteration :0.0044
SPL Iteration :0.008
- Output for 5.3.26
- Array Iteration :0.0028
SPL Iteration :0.005
- Output for 5.3.25
- Array Iteration :0.0056
SPL Iteration :0.0049
- Output for 5.3.24
- Array Iteration :0.0033
SPL Iteration :0.0063
- Output for 5.3.23
- Array Iteration :0.0032
SPL Iteration :0.0055
- Output for 5.3.22
- Array Iteration :0.0041
SPL Iteration :0.0076
- Output for 5.3.21
- Array Iteration :0.004
SPL Iteration :0.0077
- Output for 5.3.20
- Array Iteration :0.0042
SPL Iteration :0.008
- Output for 5.3.19
- Array Iteration :0.004
SPL Iteration :0.0073
- Output for 5.3.18
- Array Iteration :0.0041
SPL Iteration :0.0082
- Output for 5.3.17
- Array Iteration :0.0041
SPL Iteration :0.0075
- Output for 5.3.16
- Array Iteration :0.0043
SPL Iteration :0.0076
- Output for 5.3.15
- Array Iteration :0.004
SPL Iteration :0.0071
- Output for 5.3.14
- Array Iteration :0.0031
SPL Iteration :0.006
- Output for 5.3.12 - 5.3.13
- Array Iteration :0.0044
SPL Iteration :0.0081
- Output for 5.3.11
- Array Iteration :0.0033
SPL Iteration :0.0051
- Output for 5.3.10
- Array Iteration :0.0031
SPL Iteration :0.0049
- Output for 5.3.9
- Array Iteration :0.0042
SPL Iteration :0.0053
- Output for 5.3.8
- Array Iteration :0.0031
SPL Iteration :0.0052
- Output for 5.3.7
- Array Iteration :0.0037
SPL Iteration :0.0055
- Output for 5.3.6
- Array Iteration :0.003
SPL Iteration :0.0047
- Output for 5.3.4
- Array Iteration :0.004
SPL Iteration :0.0051
- Output for 5.3.3
- Array Iteration :0.0032
SPL Iteration :0.0071
- Output for 5.3.2
- Array Iteration :0.0035
SPL Iteration :0.006
- Output for 5.3.1
- Array Iteration :0.0039
SPL Iteration :0.0056
- Output for 5.3.0
- Array Iteration :0.0035
SPL Iteration :0.0058
- Output for 5.2.17
- Array Iteration :0.0073
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.2.16
- Array Iteration :0.0048
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.2.15
- Array Iteration :0.0062
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.2.12, 5.2.14
- Array Iteration :0.0049
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.2.13
- Array Iteration :0.0045
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.2.11
- Array Iteration :0.0047
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.2.10
- Array Iteration :0.007
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.2.9
- Array Iteration :0.0066
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.2.8
- Array Iteration :0.005
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.2.3, 5.2.7
- Array Iteration :0.0051
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.1.2, 5.2.6
- Array Iteration :0.0046
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.2.5
- Array Iteration :0.0053
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.1.0, 5.2.4
- Array Iteration :0.0068
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.2.2
- Array Iteration :0.0065
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.2.1
- Array Iteration :0.0071
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.1.4, 5.2.0
- Array Iteration :0.0043
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.1.6
- Array Iteration :0.0061
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.1.5
- Array Iteration :0.0044
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.1.3
- Array Iteration :0.0063
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.1.1
- Array Iteration :0.0067
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.0.5
- Array Iteration :0.0235
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.0.4
- Array Iteration :0.0174
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.0.3
- Array Iteration :0.0183
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.0.2
- Array Iteration :0.0185
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.0.1
- Array Iteration :0.0219
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 5.0.0
- Array Iteration :0.0172
Fatal error: Class 'SplFixedArray' not found in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.4.9
- Array Iteration :0.0105
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.4.8
- Array Iteration :0.0086
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.4.7
- Array Iteration :0.0085
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.3.10, 4.4.6
- Array Iteration :0.0077
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.4.2, 4.4.5
- Array Iteration :0.0081
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.4.1, 4.4.3 - 4.4.4
- Array Iteration :0.0083
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.4.0
- Array Iteration :0.0103
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.3.11
- Array Iteration :0.008
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.3.9
- Array Iteration :0.0173
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.3.8
- Array Iteration :0.0176
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.3.7
- Array Iteration :0.0185
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.3.6
- Array Iteration :0.0177
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.3.5
- Array Iteration :0.018
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.3.4
- Array Iteration :0.0191
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.3.3
- Array Iteration :0.0183
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.3.2
- Array Iteration :0.0298
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
Process exited with code 255. - Output for 4.3.1
- Array Iteration :0.0184
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
- Output for 4.3.0
- Array Iteration :0.0136
Fatal error: Undefined class name 'splfixedarray' in /in/XLZFQ on line 10
preferences:
153.84 ms | 401 KiB | 174 Q