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 < 10000000; $x++) { $foo->baz(); } echo "Time: " . number_format((microtime(true) - $start) * 1000, 2, ""," ") . ' ms'; }
Output for 7.1.0
Time: 36857 ms
Output for 7.0.14
Time: 47194 ms
Output for 7.0.10
Time: 40866 ms
Output for 7.0.9
Time: 42878 ms
Output for 7.0.8
Time: 41830 ms
Output for 7.0.7
Time: 33976 ms
Output for 7.0.6
Time: 43516 ms
Output for 7.0.5
Time: 43644 ms
Output for 7.0.4
Time: 43278 ms
Output for 7.0.3
Time: 43996 ms
Output for 7.0.2
Time: 44809 ms
Output for 7.0.1
Time: 47887 ms
Output for 7.0.0
Time: 44187 ms
Output for 5.3.0 - 5.3.29, hhvm-3.10.0 - 3.12.0

Process exited with code 137.
Output for 5.6.28
Time: 1 42399 ms
Output for 5.6.25
Time: 1 50798 ms
Output for 5.6.24
Time: 1 32740 ms
Output for 5.6.23
Time: 1 39188 ms
Output for 5.6.22
Time: 1 55746 ms
Output for 5.6.21
Time: 1 25186 ms
Output for 5.6.20
Time: 1 30688 ms
Output for 5.6.19
Time: 1 30532 ms
Output for 5.6.18
Time: 1 27625 ms
Output for 5.6.17
Time: 1 32628 ms
Output for 5.6.16
Time: 1 25619 ms
Output for 5.6.15
Time: 1 43181 ms
Output for 5.6.14
Time: 1 41581 ms
Output for 5.6.13
Time: 1 36898 ms
Output for 5.6.12
Time: 1 34015 ms
Output for 5.6.11
Time: 1 33415 ms
Output for 5.6.10
Time: 1 31708 ms
Output for 5.6.9
Time: 1 44080 ms
Output for 5.6.8
Time: 1 32900 ms
Output for 5.6.7
Time: 1 19489 ms
Output for 5.6.6
Time: 1 32811 ms
Output for 5.6.5
Time: 1 27803 ms
Output for 5.6.4
Time: 1 31821 ms
Output for 5.6.3
Time: 1 31322 ms
Output for 5.6.2
Time: 1 27983 ms
Output for 5.6.1
Time: 1 26951 ms
Output for 5.6.0
Time: 1 25561 ms
Output for 5.5.38
Time: 1 32094 ms
Output for 5.5.37
Time: 1 33699 ms
Output for 5.5.36
Time: 1 31732 ms
Output for 5.5.35
Time: 1 44304 ms
Output for 5.5.34
Time: 1 29670 ms
Output for 5.5.33
Time: 1 27208 ms
Output for 5.5.32
Time: 1 32181 ms
Output for 5.5.31
Time: 1 22001 ms
Output for 5.5.30
Time: 1 31527 ms
Output for 5.5.29
Time: 1 45605 ms
Output for 5.5.28
Time: 1 30689 ms
Output for 5.5.27
Time: 1 34867 ms
Output for 5.5.26
Time: 1 55893 ms
Output for 5.5.25
Time: 1 41314 ms
Output for 5.5.24
Time: 1 19186 ms
Output for 5.5.23
Time: 1 18676 ms
Output for 5.5.22
Time: 1 20072 ms
Output for 5.5.21
Time: 1 25940 ms
Output for 5.5.20
Time: 1 23517 ms
Output for 5.5.19
Time: 1 36466 ms
Output for 5.5.18
Time: 1 28602 ms
Output for 5.5.16
Time: 1 33929 ms
Output for 5.5.15
Time: 1 20605 ms
Output for 5.5.14
Time: 1 31473 ms
Output for 5.5.13
Time: 1 33294 ms
Output for 5.5.12
Time: 1 31373 ms
Output for 5.5.11
Time: 1 35351 ms
Output for 5.5.10
Time: 1 33685 ms
Output for 5.5.9
Time: 1 36404 ms
Output for 5.5.8
Time: 1 32574 ms
Output for 5.5.7
Time: 1 23928 ms
Output for 5.5.6
Time: 1 32636 ms
Output for 5.5.5
Time: 1 29611 ms
Output for 5.5.4
Time: 1 37527 ms
Output for 5.5.3
Time: 1 40033 ms
Output for 5.5.2
Time: 1 51706 ms
Output for 5.5.1
Time: 1 39723 ms
Output for 5.5.0
Time: 1 18469 ms
Output for 5.4.45
Time: 1 35770 ms
Output for 5.4.44
Time: 1 35634 ms
Output for 5.4.43
Time: 1 36345 ms
Output for 5.4.42
Time: 1 30254 ms
Output for 5.4.41
Time: 1 30487 ms
Output for 5.4.40
Time: 1 36700 ms
Output for 5.4.39
Time: 1 32954 ms
Output for 5.4.38
Time: 1 23325 ms
Output for 5.4.37
Time: 1 36774 ms
Output for 5.4.36
Time: 1 22118 ms
Output for 5.4.35
Time: 1 35780 ms
Output for 5.4.34
Time: 1 40789 ms
Output for 5.4.32
Time: 1 30769 ms
Output for 5.4.31
Time: 1 31161 ms
Output for 5.4.30
Time: 1 37205 ms
Output for 5.4.29
Time: 1 27755 ms
Output for 5.4.28
Time: 1 45427 ms
Output for 5.4.27
Time: 1 33800 ms
Output for 5.4.26
Time: 1 37302 ms
Output for 5.4.25
Time: 1 32649 ms
Output for 5.4.24
Time: 1 19335 ms
Output for 5.4.23
Time: 1 29499 ms
Output for 5.4.22
Time: 1 24211 ms
Output for 5.4.21
Time: 1 42232 ms
Output for 5.4.20
Time: 1 33308 ms
Output for 5.4.19
Time: 1 38619 ms
Output for 5.4.18
Time: 1 34788 ms
Output for 5.4.17
Time: 1 43618 ms
Output for 5.4.16
Time: 1 49881 ms
Output for 5.4.15
Time: 1 33430 ms
Output for 5.4.14
Time: 1 23747 ms
Output for 5.4.13
Time: 1 24230 ms
Output for 5.4.12
Time: 1 34183 ms
Output for 5.4.11
Time: 1 27656 ms
Output for 5.4.10
Time: 1 34628 ms
Output for 5.4.9
Time: 1 20630 ms
Output for 5.4.8
Time: 1 45916 ms
Output for 5.4.7
Time: 1 14753 ms
Output for 5.4.6
Time: 1 33421 ms
Output for 5.4.5
Time: 1 32473 ms
Output for 5.4.4
Time: 1 29640 ms
Output for 5.4.3
Time: 1 39236 ms
Output for 5.4.2
Time: 1 29003 ms
Output for 5.4.1
Time: 1 42138 ms
Output for 5.4.0
Time: 1 46732 ms
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_STRING in /in/b79eq 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/b79eq on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/b79eq on line 2
Process exited with code 255.