3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $nums = \range(0, 25000); $starts = []; $ends = []; for ($i = 0; $i < 10; ++$i) { $starts[] = \microtime(true); $fout = []; foreach ($nums as $item) { $fout[] = (string)$item . 'f'; } $ends[] = \microtime(true); } $total = 0; for ($i = 0; $i < 10; ++$i) { $total += $ends[$i] * 1000 - $starts[$i] * 1000; } \var_dump(\round($total / 10, 2));
Output for 7.0.4, 7.3.5
float(2.28)
Output for 7.3.4
float(1.61)
Output for 7.2.18 - 7.3.0, 7.3.3
float(2.27)
Output for 7.3.2
float(1.51)
Output for 7.0.16, 7.2.0, 7.3.1
float(1.92)
Output for 7.2.13, 7.2.17
float(1.62)
Output for 7.0.18, 7.2.16
float(1.81)
Output for 7.1.28, 7.2.15
float(1.78)
Output for 7.0.6, 7.2.14
float(2.7)
Output for 7.1.25, 7.2.12
float(1.7)
Output for 7.2.11
float(1.89)
Output for 7.2.10
float(2.08)
Output for 7.2.9
float(2.55)
Output for 7.1.16, 7.2.8
float(2.06)
Output for 7.2.7
float(2.84)
Output for 7.1.23, 7.2.6
float(1.69)
Output for 7.2.5
float(2.07)
Output for 7.1.22, 7.2.4
float(1.84)
Output for 7.2.3
float(2.45)
Output for 7.2.2
float(1.99)
Output for 7.2.1
float(1.96)
Output for 7.1.27
float(1.71)
Output for 7.1.26
float(3.18)
Output for 7.0.21, 7.1.24
float(2.14)
Output for 7.1.20 - 7.1.21
float(2.56)
Output for 7.0.23, 7.1.19
float(2.48)
Output for 7.0.24, 7.1.18
float(3.02)
Output for 7.0.3, 7.1.17
float(2.42)
Output for 7.1.15
float(2.74)
Output for 7.1.14
float(2.52)
Output for 7.1.13
float(1.77)
Output for 7.1.12
float(2.18)
Output for 7.1.11
float(1.87)
Output for 7.1.10
float(2.3)
Output for 7.1.9
float(2.35)
Output for 7.1.8
float(2.03)
Output for 7.1.7
float(2.22)
Output for 7.0.0, 7.1.6
float(2.25)
Output for hhvm-3.15.4, 7.0.9, 7.0.12, 7.1.5
float(2.54)
Output for 7.0.14, 7.1.4
float(1.65)
Output for 7.1.3
float(2.59)
Output for hhvm-3.20.2, 7.0.1, 7.1.2
float(2.58)
Output for 7.1.1
float(2.34)
Output for 7.1.0
float(2.21)
Output for 7.0.33
float(2.19)
Output for 7.0.32
float(1.9)
Output for 7.0.31
float(2.66)
Output for 7.0.30
float(2.62)
Output for 7.0.29
float(2.15)
Output for 7.0.28
float(2.29)
Output for 7.0.27
float(2.44)
Output for 7.0.26
float(2.79)
Output for 7.0.25
float(1.72)
Output for 7.0.22
float(3.05)
Output for 7.0.20
float(2.5)
Output for 7.0.19
float(2.47)
Output for 7.0.17
float(2.67)
Output for 7.0.15
float(2.24)
Output for 7.0.13
float(2.17)
Output for 7.0.11
float(2.46)
Output for 7.0.10
float(2.2)
Output for 7.0.8
float(1.66)
Output for 7.0.7
float(2.97)
Output for 7.0.5
float(2.92)
Output for 7.0.2
float(2.69)
Output for hhvm-3.22.0
float(2.95)
Output for hhvm-3.21.3
float(3.37)
Output for hhvm-3.21.0
float(3.28)
Output for hhvm-3.19.2
float(4.33)
Output for hhvm-3.18.5
float(3.94)
Output for hhvm-3.18.4
float(3.01)
Output for hhvm-3.17.3
float(2.43)
Output for hhvm-3.13.2
float(2.39)
Output for hhvm-3.12.14
float(2.76)
Output for hhvm-3.11.1
float(3.07)
Output for hhvm-3.10.1
float(3.08)
Output for 5.6.40
float(6.47)
Output for 5.6.39
float(6.31)
Output for 5.5.36, 5.6.23, 5.6.26, 5.6.38
float(6.58)
Output for 5.6.37
float(7.3)
Output for 5.6.36
float(9.82)
Output for 5.5.22, 5.6.35
float(6.42)
Output for 5.4.4, 5.4.21, 5.6.6, 5.6.34
float(6.05)
Output for 5.5.38, 5.6.33
float(8.03)
Output for 5.6.32
float(7.43)
Output for 5.6.31
float(10.87)
Output for 5.5.5, 5.6.30
float(6.2)
Output for 5.6.29
float(6.57)
Output for 5.6.28
float(7.47)
Output for 5.4.31, 5.6.27
float(6.19)
Output for 5.6.25
float(7.82)
Output for 5.6.24
float(6.34)
Output for 5.5.25, 5.6.22
float(6.48)
Output for 5.6.21
float(10.24)
Output for 5.6.20
float(11.26)
Output for 5.4.18, 5.4.38, 5.6.19
float(6.1)
Output for 5.5.14, 5.6.18
float(7.27)
Output for 5.6.17
float(5.84)
Output for 5.6.16
float(6.12)
Output for 5.6.15
float(8.22)
Output for 5.6.14
float(9.54)
Output for 5.6.13
float(10.44)
Output for 5.5.7, 5.5.33, 5.6.12
float(6.28)
Output for 5.6.11
float(6.51)
Output for 5.5.28, 5.6.10
float(6.5)
Output for 5.6.9
float(8.82)
Output for 5.5.2, 5.6.8
float(5.95)
Output for 5.4.0, 5.5.15, 5.6.7
float(6.37)
Output for 5.4.44, 5.6.5
float(6.09)
Output for 5.6.4
float(10.09)
Output for 5.5.9, 5.6.3
float(9.09)
Output for 5.6.2
float(9.1)
Output for 5.6.1
float(8.62)
Output for 5.6.0
float(8.04)
Output for 5.5.37
float(6.74)
Output for 5.5.35
float(7.54)
Output for 5.5.27, 5.5.34
float(6.46)
Output for 5.5.32
float(10.37)
Output for 5.5.17, 5.5.31
float(6.79)
Output for 5.5.30
float(6.71)
Output for 5.5.3, 5.5.12, 5.5.29
float(6.17)
Output for 5.5.26
float(8.87)
Output for 5.5.24
float(7.14)
Output for 5.5.23
float(6.24)
Output for 5.5.21
float(6.94)
Output for 5.5.20
float(6.66)
Output for 5.5.19
float(9.29)
Output for 5.5.18
float(6.86)
Output for 5.4.2, 5.5.16
float(6.18)
Output for 5.4.36, 5.5.13
float(6.11)
Output for 5.5.11
float(6.08)
Output for 5.5.10
float(6.98)
Output for 5.4.12, 5.5.8
float(8.07)
Output for 5.5.6
float(6.25)
Output for 5.5.4
float(5.96)
Output for 5.5.1
float(6.67)
Output for 5.5.0
float(6.54)
Output for 5.4.45
float(8.11)
Output for 5.4.43
float(6.59)
Output for 5.4.42
float(9)
Output for 5.4.41
float(8.56)
Output for 5.4.40
float(6.01)
Output for 5.4.39
float(5.82)
Output for 5.4.37
float(8.01)
Output for 5.4.35
float(6.6)
Output for 5.4.34
float(6.02)
Output for 5.4.33
float(6.06)
Output for 5.4.32
float(6.32)
Output for 5.4.30
float(6.82)
Output for 5.4.29
float(9.19)
Output for 5.4.28
float(5.98)
Output for 5.4.27
float(9.96)
Output for 5.4.26
float(7.42)
Output for 5.4.25
float(6.49)
Output for 5.4.24
float(5.73)
Output for 5.4.23
float(7.52)
Output for 5.4.22
float(5.79)
Output for 5.4.20
float(6.16)
Output for 5.4.19
float(7.85)
Output for 5.4.17
float(9.74)
Output for 5.4.16
float(6.14)
Output for 5.4.15
float(5.78)
Output for 5.4.14
float(6.03)
Output for 5.4.13
float(5.87)
Output for 5.4.11
float(9.03)
Output for 5.4.10
float(6.26)
Output for 5.4.9
float(7.61)
Output for 5.4.8
float(5.72)
Output for 5.4.7
float(8.44)
Output for 5.4.6
float(7.97)
Output for 5.4.5
float(5.83)
Output for 5.4.3
float(7.57)
Output for 5.4.1
float(7.74)
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/8QMFh on line 5
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/8QMFh on line 3 Parse error: syntax error, unexpected '[' in /in/8QMFh on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/8QMFh on line 3 Parse error: parse error, unexpected '[' in /in/8QMFh on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/8QMFh on line 3 Parse error: parse error in /in/8QMFh on line 5
Process exited with code 255.