3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class proxy { public function __invoke($a = 0) { return $a++; } } $c = new proxy(); $t = microtime(true); $sum = 0; for ($i = 0; $i < 1000000; $i++) { $sum += $c->__invoke($i); } printf("time=%f [%d]\n", microtime(true) - $t, $sum); $t = microtime(true); $sum = 0; for ($i = 0; $i < 1000000; $i++) { $sum += $c($i); } printf("time=%f [%d]\n", microtime(true) - $t, $sum);
Output for 7.1.0
time=0.040560 [499999500000] time=0.043485 [499999500000]
Output for 7.0.14
time=0.075262 [499999500000] time=0.075344 [499999500000]
Output for 7.0.12
time=0.062239 [499999500000] time=0.072541 [499999500000]
Output for 7.0.6
time=0.084192 [499999500000] time=0.067084 [499999500000]
Output for 7.0.5
time=0.078159 [499999500000] time=0.072210 [499999500000]
Output for 7.0.4
time=0.052739 [499999500000] time=0.075577 [499999500000]
Output for 7.0.3
time=0.062239 [499999500000] time=0.060166 [499999500000]
Output for 7.0.2
time=0.061791 [499999500000] time=0.057959 [499999500000]
Output for 7.0.1
time=0.052311 [499999500000] time=0.058796 [499999500000]
Output for 7.0.0
time=0.061180 [499999500000] time=0.077351 [499999500000]
Output for 5.6.28
time=0.235581 [499999500000] time=0.150998 [499999500000]
Output for 5.6.21
time=0.144049 [499999500000] time=0.193373 [499999500000]
Output for 5.6.20
time=0.153841 [499999500000] time=0.193976 [499999500000]
Output for 5.6.19
time=0.123661 [499999500000] time=0.134855 [499999500000]
Output for 5.6.18
time=0.127262 [499999500000] time=0.140945 [499999500000]
Output for 5.6.17
time=0.142390 [499999500000] time=0.196590 [499999500000]
Output for 5.6.16
time=0.129086 [499999500000] time=0.190219 [499999500000]
Output for 5.6.15
time=0.123997 [499999500000] time=0.186754 [499999500000]
Output for 5.6.14
time=0.127523 [499999500000] time=0.193965 [499999500000]
Output for 5.6.13
time=0.138910 [499999500000] time=0.193311 [499999500000]
Output for 5.6.12
time=0.134448 [499999500000] time=0.201367 [499999500000]
Output for 5.6.11
time=0.130158 [499999500000] time=0.194717 [499999500000]
Output for 5.6.10
time=0.139189 [499999500000] time=0.199864 [499999500000]
Output for 5.6.9
time=0.145696 [499999500000] time=0.196827 [499999500000]
Output for 5.6.8
time=0.130070 [499999500000] time=0.195453 [499999500000]
Output for 5.6.7
time=0.110199 [499999500000] time=0.164341 [499999500000]
Output for 5.5.35
time=0.146182 [499999500000] time=0.201847 [499999500000]
Output for 5.5.34
time=0.149254 [499999500000] time=0.195568 [499999500000]
Output for 5.5.33
time=0.128442 [499999500000] time=0.142385 [499999500000]
Output for 5.5.32
time=0.140703 [499999500000] time=0.137384 [499999500000]
Output for 5.5.31
time=0.132735 [499999500000] time=0.193659 [499999500000]
Output for 5.5.30
time=0.140151 [499999500000] time=0.196784 [499999500000]
Output for 5.5.29
time=0.148554 [499999500000] time=0.196478 [499999500000]
Output for 5.5.28
time=0.138021 [499999500000] time=0.199835 [499999500000]
Output for 5.5.27
time=0.153525 [499999500000] time=0.198166 [499999500000]
Output for 5.5.26
time=0.127682 [499999500000] time=0.194272 [499999500000]
Output for 5.5.25
time=0.158823 [499999500000] time=0.211778 [499999500000]
Output for 5.5.24
time=0.149829 [499999500000] time=0.193146 [499999500000]
Output for 5.4.45
time=0.138502 [499999500000] time=0.137413 [499999500000]
Output for 5.4.44
time=0.155871 [499999500000] time=0.150570 [499999500000]
Output for 5.4.43
time=0.141346 [499999500000] time=0.138821 [499999500000]
Output for 5.4.42
time=0.145433 [499999500000] time=0.138592 [499999500000]
Output for 5.4.41
time=0.139611 [499999500000] time=0.140580 [499999500000]
Output for 5.4.40
time=0.138367 [499999500000] time=0.138338 [499999500000]
Output for 5.4.39
time=0.139274 [499999500000] time=0.137604 [499999500000]
Output for 5.4.38
time=0.122794 [499999500000] time=0.136102 [499999500000]
Output for 5.4.37
time=0.148453 [499999500000] time=0.135398 [499999500000]
Output for 5.4.36
time=0.172121 [499999500000] time=0.190551 [499999500000]
Output for 5.4.35
time=0.131526 [499999500000] time=0.140517 [499999500000]
Output for 5.4.34
time=0.124509 [499999500000] time=0.139874 [499999500000]
Output for 5.4.32
time=0.153017 [499999500000] time=0.161474 [499999500000]
Output for 5.4.31
time=0.120600 [499999500000] time=0.134831 [499999500000]
Output for 5.4.30
time=0.146374 [499999500000] time=0.137628 [499999500000]
Output for 5.4.29
time=0.150103 [499999500000] time=0.141839 [499999500000]
Output for 5.4.28
time=0.122829 [499999500000] time=0.140152 [499999500000]
Output for 5.4.27
time=0.147940 [499999500000] time=0.171019 [499999500000]
Output for 5.4.26
time=0.139851 [499999500000] time=0.138031 [499999500000]
Output for 5.4.25
time=0.134703 [499999500000] time=0.138378 [499999500000]
Output for 5.4.24
time=0.186688 [499999500000] time=0.227442 [499999500000]
Output for 5.4.23
time=0.179754 [499999500000] time=0.191557 [499999500000]
Output for 5.4.22
time=0.140548 [499999500000] time=0.140670 [499999500000]
Output for 5.4.21
time=0.128422 [499999500000] time=0.142845 [499999500000]
Output for 5.4.20
time=0.146493 [499999500000] time=0.136444 [499999500000]
Output for 5.4.19
time=0.145440 [499999500000] time=0.141971 [499999500000]
Output for 5.4.18
time=0.143179 [499999500000] time=0.139726 [499999500000]
Output for 5.4.17
time=0.123710 [499999500000] time=0.137074 [499999500000]
Output for 5.4.16
time=0.149139 [499999500000] time=0.137814 [499999500000]
Output for 5.4.15
time=0.134586 [499999500000] time=0.138537 [499999500000]
Output for 5.4.14
time=0.143893 [499999500000] time=0.141218 [499999500000]
Output for 5.4.13
time=0.206596 [499999500000] time=0.208351 [499999500000]
Output for 5.4.12
time=0.150034 [499999500000] time=0.137666 [499999500000]
Output for 5.4.11
time=0.146861 [499999500000] time=0.137811 [499999500000]
Output for 5.4.10
time=0.149314 [499999500000] time=0.137967 [499999500000]
Output for 5.4.9
time=0.139802 [499999500000] time=0.140156 [499999500000]
Output for 5.4.8
time=0.119904 [499999500000] time=0.134829 [499999500000]
Output for 5.4.7
time=0.118331 [499999500000] time=0.133424 [499999500000]
Output for 5.4.6
time=0.125759 [499999500000] time=0.135989 [499999500000]
Output for 5.4.5
time=0.119942 [499999500000] time=0.151684 [499999500000]
Output for 5.4.4
time=0.124537 [499999500000] time=0.139774 [499999500000]
Output for 5.4.3
time=0.121721 [499999500000] time=0.135243 [499999500000]
Output for 5.4.2
time=0.123166 [499999500000] time=0.135606 [499999500000]
Output for 5.4.1
time=0.119151 [499999500000] time=0.134282 [499999500000]
Output for 5.4.0
time=0.143471 [499999500000] time=0.135246 [499999500000]
Output for 5.3.29
time=0.179996 [499999500000] time=0.153321 [499999500000]
Output for 5.3.28
time=0.180173 [499999500000] time=0.165187 [499999500000]
Output for 5.3.27
time=0.202844 [499999500000] time=0.159758 [499999500000]
Output for 5.3.26
time=0.198613 [499999500000] time=0.158891 [499999500000]
Output for 5.3.25
time=0.193233 [499999500000] time=0.159483 [499999500000]
Output for 5.3.24
time=0.201813 [499999500000] time=0.158772 [499999500000]
Output for 5.3.23
time=0.188390 [499999500000] time=0.161477 [499999500000]
Output for 5.3.22
time=0.176549 [499999500000] time=0.158618 [499999500000]
Output for 5.3.21
time=0.186897 [499999500000] time=0.160075 [499999500000]
Output for 5.3.20
time=0.187673 [499999500000] time=0.159624 [499999500000]
Output for 5.3.19
time=0.200836 [499999500000] time=0.168849 [499999500000]
Output for 5.3.18
time=0.186572 [499999500000] time=0.165363 [499999500000]
Output for 5.3.17
time=0.251239 [499999500000] time=0.229661 [499999500000]
Output for 5.3.16
time=0.172336 [499999500000] time=0.155171 [499999500000]
Output for 5.3.15
time=0.174882 [499999500000] time=0.156651 [499999500000]
Output for 5.3.14
time=0.174398 [499999500000] time=0.160351 [499999500000]
Output for 5.3.13
time=0.170000 [499999500000] time=0.155364 [499999500000]
Output for 5.3.12
time=0.169790 [499999500000] time=0.155182 [499999500000]
Output for 5.3.11
time=0.169445 [499999500000] time=0.153593 [499999500000]
Output for 5.3.10
time=0.198826 [499999500000] time=0.159242 [499999500000]
Output for 5.3.9
time=0.182164 [499999500000] time=0.168126 [499999500000]
Output for 5.3.8
time=0.203388 [499999500000] time=0.159520 [499999500000]
Output for 5.3.7
time=0.200840 [499999500000] time=0.158291 [499999500000]
Output for 5.3.6
time=0.220577 [499999500000] time=0.168190 [499999500000]
Output for 5.3.5
time=0.209309 [499999500000] time=0.165772 [499999500000]
Output for 5.3.4
time=0.193979 [499999500000] time=0.167818 [499999500000]
Output for 5.3.3
time=0.207850 [499999500000] time=0.163746 [499999500000]
Output for 5.3.2
time=0.174433 [499999500000] time=0.160640 [499999500000]
Output for 5.3.1
time=0.198607 [499999500000] time=0.168278 [499999500000]
Output for 5.3.0
time=0.182866 [499999500000] time=0.161658 [499999500000]
Output for 5.2.17
time=0.266814 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.16
time=0.224552 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.15
time=0.228081 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.14
time=0.255300 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.13
time=0.248833 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.12
time=0.255585 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.11
time=0.237215 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.10
time=0.236430 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.9
time=0.310647 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.8
time=0.250805 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.7
time=0.250298 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.6
time=0.231350 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.5
time=0.232399 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.4
time=0.244287 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.3
time=0.252700 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.2
time=0.247451 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.1
time=0.251662 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.2.0
time=0.221183 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.1.6
time=0.217761 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.1.5
time=0.249112 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.1.4
time=0.255941 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.1.3
time=0.211384 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.1.2
time=0.217288 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.1.1
time=0.238097 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.1.0
time=0.244776 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.0.5
time=0.416246 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.0.4
time=0.429324 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.0.3
time=0.396719 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.0.2
time=0.398844 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.0.1
time=0.393551 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 5.0.0
time=0.445538 [499999500000] Fatal error: Function name must be a string in /in/nboPH on line 26
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/nboPH on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/nboPH on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/nboPH on line 5
Process exited with code 255.