3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Foo { class Bar { public function baz() { return \strlen('Regarding the overhead: Just keep in mind, that a typical application calls built-in functions many thousand times. Even if the difference is small: It exists.'); } } $start = microtime(true); $foo = new Bar; for($x = 0; $x < 1000000; $x++) { $foo->baz(); } echo "Time: " . number_format((microtime(true) - $start) * 1000, 2, ""," ") . ' ms'; }
Output for 7.1.0
Time: 2297 ms
Output for 7.0.14
Time: 4599 ms
Output for 7.0.6
Time: 3530 ms
Output for 7.0.5
Time: 2996 ms
Output for 7.0.4
Time: 3872 ms
Output for 7.0.3
Time: 3415 ms
Output for 7.0.2
Time: 3509 ms
Output for 7.0.1
Time: 2707 ms
Output for 7.0.0
Time: 3557 ms
Output for hhvm-3.12.0
Time: 39875 ms
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
Time: 19372 ms
Output for 5.6.21
Time: 15303 ms
Output for 5.6.20
Time: 14643 ms
Output for 5.6.19
Time: 15468 ms
Output for 5.6.18
Time: 13358 ms
Output for 5.6.17
Time: 14592 ms
Output for 5.6.16
Time: 13694 ms
Output for 5.6.15
Time: 13147 ms
Output for 5.6.8, 5.6.14
Time: 15816 ms
Output for 5.6.13
Time: 15182 ms
Output for 5.6.12
Time: 15353 ms
Output for 5.6.11
Time: 15642 ms
Output for 5.6.10
Time: 15496 ms
Output for 5.6.9
Time: 14476 ms
Output for 5.6.7
Time: 15835 ms
Output for 5.5.35
Time: 11683 ms
Output for 5.5.34
Time: 13998 ms
Output for 5.5.33
Time: 15480 ms
Output for 5.5.32
Time: 14602 ms
Output for 5.5.31
Time: 13704 ms
Output for 5.5.30
Time: 14984 ms
Output for 5.5.29
Time: 16290 ms
Output for 5.5.28
Time: 16262 ms
Output for 5.5.27
Time: 19355 ms
Output for 5.5.26
Time: 15367 ms
Output for 5.5.25
Time: 13955 ms
Output for 5.5.24
Time: 16091 ms
Output for 5.4.45
Time: 15379 ms
Output for 5.4.44
Time: 13798 ms
Output for 5.4.43
Time: 20183 ms
Output for 5.4.42
Time: 15680 ms
Output for 5.4.41
Time: 19441 ms
Output for 5.4.40
Time: 20314 ms
Output for 5.4.39
Time: 21299 ms
Output for 5.4.38
Time: 15424 ms
Output for 5.4.37
Time: 14284 ms
Output for 5.4.36
Time: 13850 ms
Output for 5.4.35
Time: 16053 ms
Output for 5.4.34
Time: 14017 ms
Output for 5.4.32
Time: 13452 ms
Output for 5.4.31
Time: 13734 ms
Output for 5.4.30
Time: 13692 ms
Output for 5.4.29
Time: 15165 ms
Output for 5.4.28
Time: 15779 ms
Output for 5.4.27
Time: 13266 ms
Output for 5.4.26
Time: 13450 ms
Output for 5.4.25
Time: 16059 ms
Output for 5.4.24
Time: 13415 ms
Output for 5.4.23
Time: 13309 ms
Output for 5.4.22
Time: 13494 ms
Output for 5.4.21
Time: 17956 ms
Output for 5.4.20
Time: 13341 ms
Output for 5.4.19
Time: 22723 ms
Output for 5.4.18
Time: 16340 ms
Output for 5.4.17
Time: 13824 ms
Output for 5.4.16
Time: 13815 ms
Output for 5.4.15
Time: 21580 ms
Output for 5.4.14
Time: 15943 ms
Output for 5.4.13
Time: 19029 ms
Output for 5.4.12
Time: 20711 ms
Output for 5.4.11
Time: 13602 ms
Output for 5.4.10
Time: 21777 ms
Output for 5.4.9
Time: 13952 ms
Output for 5.4.8
Time: 14313 ms
Output for 5.4.7
Time: 13552 ms
Output for 5.4.6
Time: 21233 ms
Output for 5.4.5
Time: 13810 ms
Output for 5.4.4
Time: 21591 ms
Output for 5.4.3
Time: 15992 ms
Output for 5.4.2
Time: 13972 ms
Output for 5.4.1
Time: 13754 ms
Output for 5.4.0
Time: 13977 ms
Output for 5.3.29
Time: 19969 ms
Output for 5.3.28
Time: 20178 ms
Output for 5.3.27
Time: 20123 ms
Output for 5.3.26
Time: 19623 ms
Output for 5.3.25
Time: 19454 ms
Output for 5.3.24
Time: 20132 ms
Output for 5.3.23
Time: 20170 ms
Output for 5.3.22
Time: 30928 ms
Output for 5.3.21
Time: 20661 ms
Output for 5.3.20
Time: 21965 ms
Output for 5.3.19
Time: 20481 ms
Output for 5.3.18
Time: 19493 ms
Output for 5.3.17
Time: 20073 ms
Output for 5.3.16
Time: 20448 ms
Output for 5.3.15
Time: 20248 ms
Output for 5.3.14
Time: 20369 ms
Output for 5.3.13
Time: 20536 ms
Output for 5.3.12
Time: 19603 ms
Output for 5.3.11
Time: 20187 ms
Output for 5.3.10
Time: 31549 ms
Output for 5.3.9
Time: 19794 ms
Output for 5.3.8
Time: 22410 ms
Output for 5.3.7
Time: 19578 ms
Output for 5.3.6
Time: 23249 ms
Output for 5.3.5
Time: 30029 ms
Output for 5.3.4
Time: 23291 ms
Output for 5.3.3
Time: 21091 ms
Output for 5.3.2
Time: 19638 ms
Output for 5.3.1
Time: 26599 ms
Output for 5.3.0
Time: 20902 ms
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_STRING in /in/57i58 on line 2
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
Parse error: parse error, unexpected T_STRING in /in/57i58 on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/57i58 on line 2
Process exited with code 255.