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: 3697 ms
Output for 7.0.14
Time: 2443 ms
Output for 7.0.10
Time: 5265 ms
Output for 7.0.9
Time: 5637 ms
Output for 7.0.8
Time: 4444 ms
Output for 7.0.7
Time: 5573 ms
Output for 7.0.6
Time: 5131 ms
Output for 7.0.5
Time: 5883 ms
Output for 7.0.4
Time: 3816 ms
Output for 7.0.3
Time: 5635 ms
Output for 7.0.2
Time: 4674 ms
Output for 7.0.1
Time: 6471 ms
Output for 7.0.0
Time: 5414 ms
Output for 5.6.28
Time: -9843 ms
Output for 5.6.20, 5.6.25
Time: 16237 ms
Output for 5.6.24
Time: 14148 ms
Output for 5.6.23
Time: 14288 ms
Output for 5.6.22
Time: 18019 ms
Output for 5.4.11, 5.6.21
Time: 15937 ms
Output for 5.6.19
Time: 16518 ms
Output for 5.6.18
Time: 17715 ms
Output for 5.6.17
Time: 14942 ms
Output for 5.6.16
Time: 21568 ms
Output for 5.6.15
Time: 20593 ms
Output for 5.6.14
Time: 14828 ms
Output for 5.6.13
Time: 15582 ms
Output for 5.6.12
Time: 16618 ms
Output for 5.6.11
Time: 15526 ms
Output for 5.6.10
Time: 15158 ms
Output for 5.6.9
Time: 14240 ms
Output for 5.6.8
Time: 16151 ms
Output for 5.6.7
Time: 15043 ms
Output for 5.6.6
Time: 17696 ms
Output for 5.6.5
Time: 17416 ms
Output for 5.6.4
Time: 14676 ms
Output for 5.6.3
Time: 16551 ms
Output for 5.6.2
Time: 15227 ms
Output for 5.6.1
Time: 15830 ms
Output for 5.6.0
Time: 17972 ms
Output for 5.5.38
Time: 15725 ms
Output for 5.5.37
Time: 14714 ms
Output for 5.5.36
Time: 16648 ms
Output for 5.5.35
Time: 14189 ms
Output for 5.5.34
Time: 17371 ms
Output for 5.5.33
Time: 14717 ms
Output for 5.5.32
Time: 15872 ms
Output for 5.5.31
Time: 18046 ms
Output for 5.5.30
Time: 14830 ms
Output for 5.5.29
Time: 14679 ms
Output for 5.5.28
Time: 14722 ms
Output for 5.5.27
Time: 18415 ms
Output for 5.5.26
Time: 14491 ms
Output for 5.5.25
Time: 15251 ms
Output for 5.5.24
Time: 15912 ms
Output for 5.5.23
Time: 14867 ms
Output for 5.5.22
Time: 16861 ms
Output for 5.5.21
Time: 15302 ms
Output for 5.5.20
Time: 15471 ms
Output for 5.5.19
Time: 14444 ms
Output for 5.5.18
Time: 19005 ms
Output for 5.5.16
Time: 16062 ms
Output for 5.5.15
Time: 17600 ms
Output for 5.5.14
Time: 14729 ms
Output for 5.5.13
Time: 14884 ms
Output for 5.5.12
Time: 14808 ms
Output for 5.5.11
Time: 18834 ms
Output for 5.5.10
Time: 15553 ms
Output for 5.5.9
Time: 19590 ms
Output for 5.5.8
Time: 20856 ms
Output for 5.5.7
Time: 19442 ms
Output for 5.5.6
Time: 15860 ms
Output for 5.5.5
Time: 15944 ms
Output for 5.5.4
Time: 14182 ms
Output for 5.5.3
Time: 18314 ms
Output for 5.5.2
Time: 16445 ms
Output for 5.5.1
Time: 15822 ms
Output for 5.5.0
Time: 15979 ms
Output for 5.4.45
Time: 15279 ms
Output for 5.4.44
Time: 16213 ms
Output for 5.4.43
Time: 16163 ms
Output for 5.4.42
Time: 15118 ms
Output for 5.4.41
Time: 17947 ms
Output for 5.4.40
Time: 14425 ms
Output for 5.4.39
Time: 17489 ms
Output for 5.4.38
Time: 14972 ms
Output for 5.4.37
Time: 15745 ms
Output for 5.4.36
Time: 14290 ms
Output for 5.4.35
Time: 15977 ms
Output for 5.4.34
Time: 13940 ms
Output for 5.4.32
Time: 14499 ms
Output for 5.4.31
Time: 14769 ms
Output for 5.4.30
Time: 15457 ms
Output for 5.4.29
Time: 15627 ms
Output for 5.4.28
Time: 15784 ms
Output for 5.4.27
Time: 15039 ms
Output for 5.4.26
Time: 16293 ms
Output for 5.4.25
Time: 19681 ms
Output for 5.4.24
Time: 17171 ms
Output for 5.4.23
Time: 15093 ms
Output for 5.4.22
Time: 16827 ms
Output for 5.4.21
Time: 16301 ms
Output for 5.4.20
Time: 17886 ms
Output for 5.4.19
Time: 15931 ms
Output for 5.4.18
Time: 16823 ms
Output for 5.4.17
Time: 17593 ms
Output for 5.4.16
Time: 15730 ms
Output for 5.4.15
Time: 14310 ms
Output for 5.4.14
Time: 16033 ms
Output for 5.4.13
Time: 16086 ms
Output for 5.4.12
Time: 14297 ms
Output for 5.4.10
Time: 16577 ms
Output for 5.4.9
Time: 16505 ms
Output for 5.4.8
Time: 14404 ms
Output for 5.4.7
Time: 14034 ms
Output for 5.4.6
Time: 13241 ms
Output for 5.4.5
Time: 15210 ms
Output for 5.4.4
Time: 14060 ms
Output for 5.4.3
Time: 11581 ms
Output for 5.4.2
Time: 12931 ms
Output for 5.4.1
Time: 15431 ms
Output for 5.4.0
Time: 17311 ms
Output for 5.3.29
Time: 35236 ms
Output for 5.3.28
Time: 36676 ms
Output for 5.3.27
Time: 33084 ms
Output for 5.3.26
Time: 33971 ms
Output for 5.3.25
Time: 33750 ms
Output for 5.3.24
Time: 37863 ms
Output for 5.3.23
Time: 32628 ms
Output for 5.3.22
Time: 32036 ms
Output for 5.3.21
Time: 33364 ms
Output for 5.3.20
Time: 32719 ms
Output for 5.3.19
Time: 31980 ms
Output for 5.3.18
Time: 31805 ms
Output for 5.3.17
Time: 26191 ms
Output for 5.3.16
Time: 27047 ms
Output for 5.3.15
Time: 30227 ms
Output for 5.3.14
Time: 25983 ms
Output for 5.3.13
Time: 26153 ms
Output for 5.3.12
Time: 30490 ms
Output for 5.3.11
Time: 32341 ms
Output for 5.3.10
Time: 32949 ms
Output for 5.3.9
Time: 32142 ms
Output for 5.3.8
Time: 30756 ms
Output for 5.3.7
Time: 31744 ms
Output for 5.3.6
Time: 33590 ms
Output for 5.3.5
Time: 33221 ms
Output for 5.3.4
Time: 32386 ms
Output for 5.3.3
Time: 34017 ms
Output for 5.3.2
Time: 34669 ms
Output for 5.3.1
Time: 33492 ms
Output for 5.3.0
Time: 33239 ms
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_STRING in /in/XGoUI 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/XGoUI on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/XGoUI on line 2
Process exited with code 255.