3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class foo { public static function bar($x,$y){ return $x*$y; } } $s = microtime(true); $met = 'bar'; for($x = 0; $x < 100000; $x++ ){ call_user_func(array('foo', $met), 10,20); } echo round(microtime(true) - $s,5)."\n"; $s = microtime(true); $met = 'bar'; for($x = 0; $x < 100000; $x++ ){ foo::{$bar}(10,20); } echo round(microtime(true) - $s,5)."\n";
Output for 7.1.0
0.0144 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Uncaught Error: Function name must be a string in /in/tI8op:21 Stack trace: #0 {main} thrown in /in/tI8op on line 21
Process exited with code 255.
Output for 7.0.14
0.0213 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Uncaught Error: Function name must be a string in /in/tI8op:21 Stack trace: #0 {main} thrown in /in/tI8op on line 21
Process exited with code 255.
Output for 7.0.12
0.02094 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Uncaught Error: Function name must be a string in /in/tI8op:21 Stack trace: #0 {main} thrown in /in/tI8op on line 21
Process exited with code 255.
Output for 7.0.6
0.01832 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Uncaught Error: Function name must be a string in /in/tI8op:21 Stack trace: #0 {main} thrown in /in/tI8op on line 21
Process exited with code 255.
Output for 7.0.5
0.01282 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Uncaught Error: Function name must be a string in /in/tI8op:21 Stack trace: #0 {main} thrown in /in/tI8op on line 21
Process exited with code 255.
Output for 7.0.4
0.01664 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Uncaught Error: Function name must be a string in /in/tI8op:21 Stack trace: #0 {main} thrown in /in/tI8op on line 21
Process exited with code 255.
Output for 7.0.3
0.01613 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Uncaught Error: Function name must be a string in /in/tI8op:21 Stack trace: #0 {main} thrown in /in/tI8op on line 21
Process exited with code 255.
Output for 7.0.2
0.01533 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Uncaught Error: Function name must be a string in /in/tI8op:21 Stack trace: #0 {main} thrown in /in/tI8op on line 21
Process exited with code 255.
Output for 7.0.1
0.01292 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Uncaught Error: Function name must be a string in /in/tI8op:21 Stack trace: #0 {main} thrown in /in/tI8op on line 21
Process exited with code 255.
Output for 7.0.0
0.01334 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Uncaught Error: Function name must be a string in /in/tI8op:21 Stack trace: #0 {main} thrown in /in/tI8op on line 21
Process exited with code 255.
Output for hhvm-3.12.0
0.02752 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for hhvm-3.10.0
0.03429 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.28
0.05198 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.21
0.05772 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.20
0.05836 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.19
0.05869 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.18
0.05252 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.17
0.05775 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.16
0.05442 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.15
0.05396 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.14
0.04358 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.13
0.05358 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.12
0.06309 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.11
0.05613 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.10
0.05749 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.9
0.05996 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.6.8
0.06074 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.39, 5.6.7
0.0595 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.5.35
0.04588 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.5.34
0.04457 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.5.33
0.04286 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.5.32
0.0615 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.5.31
0.0544 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.5.30
0.05585 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.5.29
0.05375 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.5.28
0.06358 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.5.27
0.0435 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.5.26
0.04385 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.5.25
0.0532 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.5.24
0.04448 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.45
0.05243 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.44
0.06155 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.43
0.05986 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.42
0.06324 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.41
0.04622 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.40
0.06051 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.38
0.05438 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.37
0.04594 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.36
0.04489 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.35
0.0512 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.34
0.05899 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.32
0.05739 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.31
0.05591 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.30
0.05155 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.29
0.0513 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.28
0.04871 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.27
0.07632 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.26
0.06461 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.25
0.06381 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.24
0.06762 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.23
0.06265 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.22
0.06198 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.21
0.04416 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.20
0.06165 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.19
0.06404 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.18
0.06257 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.17
0.04483 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.16
0.06005 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.15
0.05286 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.14
0.04914 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.13
0.04823 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.12
0.06015 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.11
0.05465 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.10
0.04979 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.9
0.04465 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.8
0.05453 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.7
0.06633 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.6
0.04461 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.5
0.05517 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.4
0.06501 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.3
0.04548 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.2
0.06397 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.1
0.06344 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.4.0
0.05929 Notice: Undefined variable: bar in /in/tI8op on line 21 Fatal error: Function name must be a string in /in/tI8op on line 21
Process exited with code 255.
Output for 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '{', expecting T_STRING or T_VARIABLE or '$' in /in/tI8op on line 21
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected '{', expecting T_STRING or T_VARIABLE or '$' in /in/tI8op on line 21
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/tI8op on line 4
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/tI8op on line 4
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/tI8op on line 4
Process exited with code 255.