3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $start = microtime(true); for ($i=0; $i<1e4; $i++) { $string = sprintf("%s%s$%s%s", $i, $i, '123', 'Test'); } $end = microtime(true); echo "Took: ", number_format(($end-$start)*1e3, 2), 'ms', PHP_EOL; $a = '123'; $b = 'Test'; $start = microtime(true); for ($i=0; $i<1e4; $i++) { $string = "$i$i$123$a$b"; } $end = microtime(true); echo "Took: ", number_format(($end-$start)*1e3, 2), 'ms', PHP_EOL;
Output for 7.1.0
Took: 2.60ms Took: 1.61ms
Output for 7.0.14
Took: 2.38ms Took: 1.63ms
Output for 7.0.6
Took: 1.35ms Took: 0.92ms
Output for 7.0.5
Took: 1.86ms Took: 1.19ms
Output for 7.0.4
Took: 1.97ms Took: 1.40ms
Output for 7.0.3
Took: 1.88ms Took: 1.22ms
Output for 7.0.2
Took: 2.03ms Took: 1.34ms
Output for 7.0.1
Took: 1.71ms Took: 1.12ms
Output for 7.0.0
Took: 1.78ms Took: 1.13ms
Output for hhvm-3.12.0
Took: 10.26ms Took: 5.50ms
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
Took: 6.49ms Took: 4.05ms
Output for 5.6.21
Took: 5.37ms Took: 4.23ms
Output for 5.6.20
Took: 5.26ms Took: 4.05ms
Output for 5.6.19
Took: 5.15ms Took: 3.01ms
Output for 5.6.18
Took: 5.35ms Took: 3.25ms
Output for 5.6.17
Took: 3.77ms Took: 2.84ms
Output for 5.6.16
Took: 5.22ms Took: 3.18ms
Output for 5.6.15
Took: 4.26ms Took: 3.47ms
Output for 5.6.14
Took: 5.42ms Took: 3.43ms
Output for 5.6.13
Took: 3.28ms Took: 2.57ms
Output for 5.6.12
Took: 4.00ms Took: 2.85ms
Output for 5.6.11
Took: 4.88ms Took: 3.69ms
Output for 5.6.10
Took: 5.65ms Took: 4.62ms
Output for 5.6.9
Took: 5.34ms Took: 4.11ms
Output for 5.6.8
Took: 3.82ms Took: 2.88ms
Output for 5.6.7
Took: 3.36ms Took: 2.58ms
Output for 5.5.35
Took: 5.51ms Took: 4.02ms
Output for 5.5.34
Took: 5.67ms Took: 4.03ms
Output for 5.5.33
Took: 5.44ms Took: 3.45ms
Output for 5.5.32
Took: 3.48ms Took: 2.67ms
Output for 5.5.31
Took: 4.82ms Took: 3.49ms
Output for 5.5.30
Took: 5.65ms Took: 4.01ms
Output for 5.5.29
Took: 4.38ms Took: 3.17ms
Output for 5.5.28
Took: 3.47ms Took: 2.62ms
Output for 5.5.27
Took: 3.46ms Took: 2.71ms
Output for 5.5.26
Took: 5.61ms Took: 4.09ms
Output for 5.5.25
Took: 5.77ms Took: 4.20ms
Output for 5.5.24
Took: 5.01ms Took: 2.86ms
Output for 5.4.45
Took: 5.81ms Took: 4.64ms
Output for 5.4.44
Took: 10.59ms Took: 6.78ms
Output for 5.4.43
Took: 5.91ms Took: 4.08ms
Output for 5.4.42
Took: 9.09ms Took: 5.41ms
Output for 5.4.41
Took: 6.23ms Took: 3.39ms
Output for 5.4.40
Took: 9.69ms Took: 10.44ms
Output for 5.4.39
Took: 5.77ms Took: 10.22ms
Output for 5.4.38
Took: 23.35ms Took: 5.72ms
Output for 5.4.37
Took: 12.52ms Took: 4.96ms
Output for 5.4.36
Took: 6.62ms Took: 3.16ms
Output for 5.4.35
Took: 21.01ms Took: 4.82ms
Output for 5.4.34
Took: 7.52ms Took: 4.19ms
Output for 5.4.32
Took: 4.32ms Took: 2.37ms
Output for 5.4.31
Took: 4.45ms Took: 2.62ms
Output for 5.4.30
Took: 5.14ms Took: 2.67ms
Output for 5.4.29
Took: 4.35ms Took: 2.63ms
Output for 5.4.28
Took: 4.73ms Took: 2.57ms
Output for 5.4.27
Took: 4.58ms Took: 2.97ms
Output for 5.4.26
Took: 4.51ms Took: 2.42ms
Output for 5.4.25
Took: 4.69ms Took: 2.47ms
Output for 5.4.24
Took: 4.83ms Took: 2.76ms
Output for 5.4.23
Took: 4.83ms Took: 2.69ms
Output for 5.4.22
Took: 9.15ms Took: 5.17ms
Output for 5.4.21
Took: 4.84ms Took: 2.43ms
Output for 5.4.20
Took: 5.90ms Took: 4.20ms
Output for 5.4.19
Took: 4.91ms Took: 2.46ms
Output for 5.4.18
Took: 8.34ms Took: 4.63ms
Output for 5.4.17
Took: 4.64ms Took: 2.54ms
Output for 5.4.16
Took: 4.99ms Took: 2.61ms
Output for 5.4.15
Took: 5.37ms Took: 2.69ms
Output for 5.4.14
Took: 4.82ms Took: 2.74ms
Output for 5.4.13
Took: 5.60ms Took: 2.90ms
Output for 5.4.12
Took: 8.53ms Took: 4.59ms
Output for 5.4.11
Took: 9.18ms Took: 4.10ms
Output for 5.4.10
Took: 5.19ms Took: 3.57ms
Output for 5.4.9
Took: 5.92ms Took: 3.21ms
Output for 5.4.8
Took: 6.11ms Took: 3.14ms
Output for 5.4.7
Took: 8.58ms Took: 4.82ms
Output for 5.4.6
Took: 7.01ms Took: 4.42ms
Output for 5.4.5
Took: 5.54ms Took: 2.76ms
Output for 5.4.4
Took: 4.94ms Took: 2.60ms
Output for 5.4.3
Took: 4.85ms Took: 3.01ms
Output for 5.4.2
Took: 5.10ms Took: 2.60ms
Output for 5.4.1
Took: 4.75ms Took: 2.87ms
Output for 5.4.0
Took: 5.18ms Took: 2.69ms
Output for 5.3.29
Took: 5.16ms Took: 2.53ms
Output for 5.3.28
Took: 5.04ms Took: 2.78ms
Output for 5.3.27
Took: 5.36ms Took: 3.00ms
Output for 5.3.26
Took: 5.66ms Took: 2.56ms
Output for 5.3.25
Took: 5.03ms Took: 2.51ms
Output for 5.3.24
Took: 5.09ms Took: 2.54ms
Output for 5.3.23
Took: 5.07ms Took: 3.17ms
Output for 5.3.22
Took: 6.39ms Took: 3.60ms
Output for 5.3.21
Took: 10.84ms Took: 4.53ms
Output for 5.3.20
Took: 5.56ms Took: 2.71ms
Output for 5.3.19
Took: 5.27ms Took: 2.53ms
Output for 5.3.18
Took: 4.98ms Took: 2.41ms
Output for 5.3.17
Took: 5.54ms Took: 2.80ms
Output for 5.3.16
Took: 7.99ms Took: 3.00ms
Output for 5.3.15
Took: 5.66ms Took: 2.97ms
Output for 5.3.14
Took: 9.85ms Took: 4.07ms
Output for 5.3.13
Took: 9.19ms Took: 4.47ms
Output for 5.3.12
Took: 5.26ms Took: 2.59ms
Output for 5.3.11
Took: 5.49ms Took: 2.61ms
Output for 5.3.10
Took: 4.88ms Took: 2.49ms
Output for 5.3.9
Took: 5.22ms Took: 2.86ms
Output for 5.3.8
Took: 10.84ms Took: 3.25ms
Output for 5.3.7
Took: 5.30ms Took: 3.17ms
Output for 5.3.6
Took: 5.36ms Took: 2.75ms
Output for 5.3.5
Took: 5.37ms Took: 2.71ms
Output for 5.3.4
Took: 5.43ms Took: 2.83ms
Output for 5.3.3
Took: 7.18ms Took: 4.32ms
Output for 5.3.2
Took: 5.43ms Took: 2.94ms
Output for 5.3.1
Took: 4.84ms Took: 2.48ms
Output for 5.3.0
Took: 5.79ms Took: 2.54ms
Output for 5.2.17
Took: 7.62ms Took: 3.79ms
Output for 5.2.16
Took: 6.16ms Took: 3.25ms
Output for 5.2.15
Took: 6.58ms Took: 3.60ms
Output for 5.2.14
Took: 6.23ms Took: 3.45ms
Output for 5.2.13
Took: 5.68ms Took: 3.21ms
Output for 5.2.12
Took: 10.26ms Took: 6.13ms
Output for 5.2.11
Took: 6.08ms Took: 3.12ms
Output for 5.2.10
Took: 6.17ms Took: 3.05ms
Output for 5.2.9
Took: 5.96ms Took: 3.06ms
Output for 5.2.8
Took: 6.62ms Took: 3.39ms
Output for 5.2.7
Took: 6.11ms Took: 3.04ms
Output for 5.2.6
Took: 7.20ms Took: 3.54ms
Output for 5.2.5
Took: 6.12ms Took: 3.38ms
Output for 5.2.4
Took: 5.96ms Took: 3.29ms
Output for 5.2.3
Took: 6.26ms Took: 3.45ms
Output for 5.2.2
Took: 10.00ms Took: 3.87ms
Output for 5.2.1
Took: 9.73ms Took: 7.16ms
Output for 5.2.0
Took: 12.68ms Took: 8.33ms
Output for 5.1.6
Took: 11.84ms Took: 6.98ms
Output for 5.1.5
Took: 21.50ms Took: 10.19ms
Output for 5.1.4
Took: 12.67ms Took: 5.53ms
Output for 5.1.3
Took: 10.93ms Took: 5.56ms
Output for 5.1.2
Took: 10.52ms Took: 5.34ms
Output for 5.1.1
Took: 11.14ms Took: 5.43ms
Output for 5.1.0
Took: 12.49ms Took: 8.59ms
Output for 5.0.5
Took: 25.07ms Took: 8.21ms
Output for 5.0.4
Took: 19.72ms Took: 8.67ms
Output for 5.0.3
Took: 19.87ms Took: 8.39ms
Output for 5.0.2
Took: 19.44ms Took: 10.28ms
Output for 5.0.1
Took: 14.53ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 8 PHP_EOLTook: 8.61ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 18 PHP_EOL
Output for 5.0.0
Took: 14.00ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 8 PHP_EOLTook: 8.24ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 18 PHP_EOL
Output for 4.4.9
Took: 24.20ms Took: 7.76ms
Output for 4.4.8
Took: 14.32ms Took: 12.75ms
Output for 4.4.7
Took: 22.26ms Took: 11.88ms
Output for 4.4.6
Took: 14.38ms Took: 8.34ms
Output for 4.4.5
Took: 14.00ms Took: 8.33ms
Output for 4.4.4
Took: 13.84ms Took: 8.38ms
Output for 4.4.3
Took: 13.90ms Took: 8.47ms
Output for 4.4.2
Took: 14.48ms Took: 8.60ms
Output for 4.4.1
Took: 16.62ms Took: 9.93ms
Output for 4.4.0
Took: 14.97ms Took: 9.87ms
Output for 4.3.11
Took: 13.33ms Took: 10.98ms
Output for 4.3.10
Took: 13.27ms Took: 8.38ms
Output for 4.3.9
Took: 14.89ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 8 PHP_EOLTook: 10.23ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 18 PHP_EOL
Output for 4.3.8
Took: 13.46ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 8 PHP_EOLTook: 8.46ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 18 PHP_EOL
Output for 4.3.7
Took: 12.91ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 8 PHP_EOLTook: 8.57ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 18 PHP_EOL
Output for 4.3.6
Took: 14.41ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 8 PHP_EOLTook: 8.33ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 18 PHP_EOL
Output for 4.3.5
Took: 12.96ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 8 PHP_EOLTook: 9.65ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 18 PHP_EOL
Output for 4.3.4
Took: 13.74ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 8 PHP_EOLTook: 8.52ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 18 PHP_EOL
Output for 4.3.3
Took: 13.06ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 8 PHP_EOLTook: 8.27ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 18 PHP_EOL
Output for 4.3.2
Took: 12.21ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 8 PHP_EOLTook: 7.62ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 18 PHP_EOL
Output for 4.3.1
Took: 11.53ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 8 PHP_EOLTook: 11.12ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 18 PHP_EOL
Output for 4.3.0
Took: 14.71ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 8 PHP_EOLTook: 12.08ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/f17lt on line 18 PHP_EOL