3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = microtime(true); $h = 0; for($i = 0; $i < 10000; $i++) { $h++; } $b = microtime(true); echo 'For: ' . $b - $a; $a = microtime(true); $h = 0; foreach (range(1, 10000) as $index) { $h++; } $b = microtime(true); echo 'Foreach: ' . $b - $a;
Output for 7.1.0
Warning: A non-numeric value encountered in /in/fFd0C on line 14 -1443290536.0041 Warning: A non-numeric value encountered in /in/fFd0C on line 27 -1443290536.0045
Output for 5.4.29, 5.4.36, 5.5.12, 7.0.14
-1443290536.0037-1443290536.0042
Output for 7.0.10
-1443290536.0023-1443290536.0024
Output for 7.0.9
-1443290536.0052-1443290536.0055
Output for 7.0.8
-1443290536.004-1443290536.0042
Output for 7.0.7
-1443290536.0026-1443290536.0028
Output for 7.0.6
-1443290536.0024-1443290536.0026
Output for 7.0.5
-1443290536.0029-1443290536.003
Output for 7.0.4
-1443290536.0038-1443290536.004
Output for 7.0.3
-1443290536.0039-1443290536.0041
Output for 7.0.2
-1443290536.0025-1443290536.0027
Output for 7.0.1
-1443290536.0033-1443290536.0035
Output for 7.0.0
-1443290536.0035-1443290536.0037
Output for hhvm-3.12.0
-1443290536.1855-1443290536.1866
Output for hhvm-3.10.0
-1443290536.1915-1443290536.1925
Output for 5.6.28
-1443290536.0045-1443290536.0055
Output for 5.4.26, 5.5.32, 5.6.2, 5.6.25
-1443290536.0026-1443290536.0029
Output for 5.4.38, 5.6.24
-1443290536.0033-1443290536.0037
Output for 5.6.22 - 5.6.23
-1443290536.0032-1443290536.0035
Output for 5.4.18, 5.6.0, 5.6.7, 5.6.21
-1443290536.0029-1443290536.0033
Output for 5.4.21, 5.5.0, 5.5.25, 5.5.28, 5.5.30, 5.6.20
-1443290536.0027-1443290536.003
Output for 5.5.10 - 5.5.11, 5.6.1, 5.6.13, 5.6.15, 5.6.19
-1443290536.0039-1443290536.0043
Output for 5.6.18
-1443290536.0043-1443290536.0048
Output for 5.6.17
-1443290536.0041-1443290536.0046
Output for 5.5.6, 5.5.22, 5.6.16
-1443290536.0042-1443290536.0047
Output for 5.5.24, 5.6.8, 5.6.12, 5.6.14
-1443290536.0036-1443290536.004
Output for 5.5.34, 5.6.9, 5.6.11
-1443290536.0029-1443290536.0032
Output for 5.5.26, 5.6.10
-1443290536.0033-1443290536.0036
Output for 5.6.5 - 5.6.6
-1443290536.0031-1443290536.0034
Output for 5.6.4
-1443290536.0044-1443290536.0049
Output for 5.5.16, 5.6.3
-1443290536.0038-1443290536.0043
Output for 5.5.3, 5.5.38
-1443290536.004-1443290536.0045
Output for 5.5.37
-1443290536.0055-1443290536.0062
Output for 5.5.36
-1443290536.0034-1443290536.0038
Output for 5.4.37, 5.5.35
-1443290536.0035-1443290536.0039
Output for 5.5.33
-1443290536.0041-1443290536.0045
Output for 5.5.13, 5.5.31
-1443290536.0038-1443290536.0042
Output for 5.4.27, 5.5.29
-1443290536.0041-1443290536.0047
Output for 5.5.18, 5.5.27
-1443290536.0027-1443290536.0029
Output for 5.5.20, 5.5.23
-1443290536.0028-1443290536.0031
Output for 5.4.17, 5.5.21
-1443290536.003-1443290536.0033
Output for 5.5.19
-1443290536.005-1443290536.0058
Output for 5.4.43, 5.5.9, 5.5.15
-1443290536.0039-1443290536.0044
Output for 5.5.14
-1443290536.0043-1443290536.0049
Output for 5.5.8
-1443290536.0042-1443290536.0046
Output for 5.5.2, 5.5.7
-1443290536.003-1443290536.0032
Output for 5.5.5
-1443290536.0048-1443290536.0053
Output for 5.4.16, 5.4.44, 5.5.4
-1443290536.0032-1443290536.0036
Output for 5.5.1
-1443290536.0037-1443290536.0041
Output for 5.4.19, 5.4.23 - 5.4.24, 5.4.41, 5.4.45
-1443290536.0024-1443290536.0027
Output for 5.4.42
-1443290536.0028-1443290536.0033
Output for 5.4.22, 5.4.40
-1443290536.0023-1443290536.0026
Output for 5.4.39
-1443290536.0029-1443290536.0034
Output for 5.4.9, 5.4.13, 5.4.35
-1443290536.0022-1443290536.0027
Output for 5.4.34
-1443290536.0035-1443290536.004
Output for 5.4.28, 5.4.32
-1443290536.0022-1443290536.0025
Output for 5.4.31
-1443290536.006-1443290536.0068
Output for 5.4.30
-1443290536.0058-1443290536.0065
Output for 5.4.25
-1443290536.0025-1443290536.0028
Output for 5.4.20
-1443290536.0024-1443290536.0028
Output for 5.4.15
-1443290536.0036-1443290536.0041
Output for 5.4.14
-1443290536.0019-1443290536.0023
Output for 5.4.1 - 5.4.2, 5.4.12
-1443290536.0016-1443290536.0019
Output for 5.3.10, 5.4.11
-1443290536.0015-1443290536.0019
Output for 5.4.8, 5.4.10
-1443290536.0021-1443290536.0026
Output for 5.3.20, 5.4.7
-1443290536.0016-1443290536.002
Output for 5.4.5 - 5.4.6
-1443290536.0018-1443290536.0022
Output for 5.4.3 - 5.4.4
-1443290536.0013-1443290536.0016
Output for 5.4.0
-1443290536.0012-1443290536.0014
Output for 5.3.8, 5.3.29
-1443290536.0021-1443290536.0028
Output for 5.3.16, 5.3.18, 5.3.28
-1443290536.0022-1443290536.0029
Output for 5.3.27
-1443290536.0248-1443290536.0251
Output for 5.3.26
-1443290536.0014-1443290536.0019
Output for 5.3.25
-1443290536.0011-1443290536.0014
Output for 5.3.3, 5.3.6, 5.3.12 - 5.3.14, 5.3.24
-1443290536.0014-1443290536.0018
Output for 5.3.23
-1443290536.0019-1443290536.0024
Output for 5.3.7, 5.3.19, 5.3.22
-1443290536.002-1443290536.0026
Output for 5.3.21
-1443290536.0017-1443290536.0022
Output for 5.3.2, 5.3.5, 5.3.15, 5.3.17
-1443290536.0013-1443290536.0017
Output for 5.3.11
-1443290536.0015-1443290536.002
Output for 5.3.9
-1443290536.0018-1443290536.0024
Output for 5.3.4
-1443290536.0019-1443290536.0025
Output for 5.3.0 - 5.3.1
-1443290536.002-1443290536.0027
Output for 5.2.17
-1443290536.0012-1443290536.002
Output for 5.2.16
-1443290536.0012-1443290536.0019
Output for 5.2.15
-1443290536.0011-1443290536.0018
Output for 5.2.14
-1443290536.0012-1443290536.0017
Output for 5.2.11 - 5.2.13
-1443290536.0016-1443290536.0025
Output for 5.1.5, 5.2.10
-1443290536.0017-1443290536.0027
Output for 5.2.3, 5.2.7 - 5.2.9
-1443290536.0017-1443290536.0026
Output for 5.2.6
-1443290536.0011-1443290536.0017
Output for 5.2.5
-1443290536.0016-1443290536.0024
Output for 5.2.4
-1443290536.0014-1443290536.0022
Output for 5.2.2
-1443290536.0011-1443290536.0015
Output for 5.2.1
-1443290536.0017-1443290536.0025
Output for 5.2.0
-1443290536.0015-1443290536.0023
Output for 5.1.6
-1443290536.0014-1443290536.0021
Output for 5.1.2, 5.1.4
-1443290536.001-1443290536.0015
Output for 5.1.3
-1443290536.0013-1443290536.002
Output for 5.1.1
-1443290536.0015-1443290536.0025
Output for 5.1.0
-1443290536.0013-1443290536.0022
Output for 5.0.4 - 5.0.5
-1443290536.0004-1443290536.0019
Output for 5.0.3
-1443290536.0004-1443290536.0017
Output for 5.0.2
-1443290536.0006-1443290536.0029
Output for 5.0.1
-1443290536.0004-1443290536.0016
Output for 5.0.0
-1443290536.0005-1443290536.0018
Output for 4.4.9
-0.000128-0.002719
Output for 4.4.8
-0.000116-0.002666
Output for 4.4.7
-0.000126-0.002508
Output for 4.4.6
-0.000125-0.002844
Output for 4.4.5
-6.8E-05-0.001541
Output for 4.4.4
-7.8E-05-0.001404
Output for 4.4.3
-0.000113-0.002724
Output for 4.4.2
-0.000192-0.003434
Output for 4.4.1
-0.000139-0.003393
Output for 4.4.0
-6.7E-05-0.00168
Output for 4.3.11
-0.0001-0.001602
Output for 4.3.10
-8.6E-05-0.001381
Output for 4.3.9
-0.000142-0.003226
Output for 4.3.8
-0.000101-0.002435
Output for 4.3.7
-9.8E-05-0.002133
Output for 4.3.6
-0.000141-0.00299
Output for 4.3.5
-0.000132-0.003046
Output for 4.3.4
-0.000121-0.002572
Output for 4.3.3
-9.5E-05-0.002428
Output for 4.3.2
-6.1E-05-0.001305
Output for 4.3.1
-0.000141-0.002879
Output for 4.3.0
-0.000123-0.002567