3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Model { private $id; public function setId($id) { $this->id = $id; } } $time = microtime(true); for ($i = 0; $i < 500000; $i++) { $model = new Model; $method = 'setId'; call_user_func_array(array($model, $method), array('test')); } $time = microtime(true) - $time; echo 'call user func took ' . number_format($time, 3) . " seconds\n";
Output for 7.1.0
call user func took 0.095 seconds
Output for 7.0.14
call user func took 0.136 seconds
Output for 7.0.7
call user func took 0.137 seconds
Output for 7.0.6
call user func took 0.132 seconds
Output for 7.0.5
call user func took 0.114 seconds
Output for 7.0.1, 7.0.4
call user func took 0.092 seconds
Output for 7.0.3
call user func took 0.138 seconds
Output for 7.0.2
call user func took 0.091 seconds
Output for 7.0.0
call user func took 0.101 seconds
Output for 5.3.2, 5.6.28
call user func took 0.357 seconds
Output for 5.5.35, 5.6.22
call user func took 0.311 seconds
Output for 5.5.16, 5.6.21
call user func took 0.322 seconds
Output for 5.5.1, 5.6.20
call user func took 0.307 seconds
Output for 5.6.19
call user func took 0.275 seconds
Output for 5.6.18
call user func took 0.285 seconds
Output for 5.6.17
call user func took 0.430 seconds
Output for 5.6.16
call user func took 0.248 seconds
Output for 5.6.15
call user func took 0.257 seconds
Output for 5.4.17, 5.5.32, 5.6.14
call user func took 0.255 seconds
Output for 5.6.13
call user func took 0.241 seconds
Output for 5.6.12
call user func took 0.302 seconds
Output for 5.6.11
call user func took 0.295 seconds
Output for 5.5.14, 5.6.10
call user func took 0.324 seconds
Output for 5.5.25, 5.6.9
call user func took 0.356 seconds
Output for 5.4.35, 5.6.6, 5.6.8
call user func took 0.310 seconds
Output for 5.4.2, 5.6.7
call user func took 0.341 seconds
Output for 5.6.5
call user func took 0.353 seconds
Output for 5.6.4
call user func took 0.345 seconds
Output for 5.4.16, 5.4.27, 5.6.1, 5.6.3
call user func took 0.314 seconds
Output for 5.6.2
call user func took 0.273 seconds
Output for 5.6.0
call user func took 0.276 seconds
Output for 5.5.36
call user func took 0.335 seconds
Output for 5.4.36, 5.5.11, 5.5.34
call user func took 0.318 seconds
Output for 5.4.18, 5.5.33
call user func took 0.253 seconds
Output for 5.5.31
call user func took 0.259 seconds
Output for 5.5.30
call user func took 0.246 seconds
Output for 5.5.29
call user func took 0.249 seconds
Output for 5.5.28
call user func took 0.293 seconds
Output for 5.4.38, 5.5.27
call user func took 0.319 seconds
Output for 5.4.29, 5.5.26
call user func took 0.317 seconds
Output for 5.5.24
call user func took 0.297 seconds
Output for 5.5.23
call user func took 0.343 seconds
Output for 5.5.22
call user func took 0.344 seconds
Output for 5.4.41, 5.5.21
call user func took 0.328 seconds
Output for 5.4.1, 5.4.7, 5.4.11, 5.4.32, 5.5.2, 5.5.19 - 5.5.20
call user func took 0.313 seconds
Output for 5.4.6, 5.5.6, 5.5.18
call user func took 0.327 seconds
Output for 5.4.13, 5.4.45, 5.5.15
call user func took 0.321 seconds
Output for 5.5.13
call user func took 0.304 seconds
Output for 5.5.4, 5.5.12
call user func took 0.320 seconds
Output for 5.4.4, 5.4.20, 5.5.8, 5.5.10
call user func took 0.325 seconds
Output for 5.4.22, 5.5.9
call user func took 0.323 seconds
Output for 5.4.15, 5.5.7
call user func took 0.316 seconds
Output for 5.4.9, 5.4.19, 5.5.5
call user func took 0.326 seconds
Output for 5.5.3
call user func took 0.288 seconds
Output for 5.5.0
call user func took 0.329 seconds
Output for 5.4.26, 5.4.44
call user func took 0.315 seconds
Output for 5.4.43
call user func took 0.296 seconds
Output for 5.4.37, 5.4.42
call user func took 0.309 seconds
Output for 5.4.40
call user func took 0.339 seconds
Output for 5.4.14, 5.4.24, 5.4.31, 5.4.34, 5.4.39
call user func took 0.301 seconds
Output for 5.4.30
call user func took 0.312 seconds
Output for 5.4.28
call user func took 0.300 seconds
Output for 5.4.25
call user func took 0.308 seconds
Output for 5.4.23
call user func took 0.305 seconds
Output for 5.4.21
call user func took 0.291 seconds
Output for 5.4.5, 5.4.12
call user func took 0.334 seconds
Output for 5.4.10
call user func took 0.332 seconds
Output for 5.4.8
call user func took 0.333 seconds
Output for 5.4.3
call user func took 0.294 seconds
Output for 5.4.0
call user func took 0.336 seconds
Output for 5.3.29
call user func took 0.423 seconds
Output for 5.3.28
call user func took 0.422 seconds
Output for 5.3.27
call user func took 0.427 seconds
Output for 5.3.26
call user func took 0.392 seconds
Output for 5.3.25
call user func took 0.444 seconds
Output for 5.3.17, 5.3.24
call user func took 0.442 seconds
Output for 5.3.23
call user func took 0.446 seconds
Output for 5.3.22
call user func took 0.459 seconds
Output for 5.3.21
call user func took 0.435 seconds
Output for 5.3.20
call user func took 0.453 seconds
Output for 5.1.1, 5.3.19
call user func took 0.443 seconds
Output for 5.3.18
call user func took 0.432 seconds
Output for 5.3.16
call user func took 0.462 seconds
Output for 5.3.15
call user func took 0.461 seconds
Output for 5.3.9, 5.3.14
call user func took 0.465 seconds
Output for 5.3.3, 5.3.13
call user func took 0.431 seconds
Output for 5.3.5, 5.3.12
call user func took 0.445 seconds
Output for 5.3.10 - 5.3.11
call user func took 0.485 seconds
Output for 5.3.8
call user func took 0.452 seconds
Output for 5.3.7
call user func took 0.374 seconds
Output for 5.3.6
call user func took 0.455 seconds
Output for 5.3.4
call user func took 0.354 seconds
Output for 5.3.1
call user func took 0.393 seconds
Output for 5.3.0
call user func took 0.385 seconds
Output for 5.2.17
call user func took 0.478 seconds
Output for 5.2.16
call user func took 0.429 seconds
Output for 5.2.15
call user func took 0.476 seconds
Output for 5.1.2, 5.2.14
call user func took 0.506 seconds
Output for 5.2.13
call user func took 0.477 seconds
Output for 5.2.12
call user func took 0.412 seconds
Output for 5.2.11
call user func took 0.424 seconds
Output for 5.2.10
call user func took 0.471 seconds
Output for 5.2.9
call user func took 0.534 seconds
Output for 5.2.8
call user func took 0.556 seconds
Output for 5.2.7
call user func took 0.550 seconds
Output for 5.2.6
call user func took 0.546 seconds
Output for 5.2.5
call user func took 0.578 seconds
Output for 5.2.4
call user func took 0.602 seconds
Output for 5.0.5, 5.2.3
call user func took 0.584 seconds
Output for 5.2.2
call user func took 0.585 seconds
Output for 5.2.1
call user func took 0.622 seconds
Output for 5.2.0
call user func took 0.583 seconds
Output for 5.1.6
call user func took 0.509 seconds
Output for 5.1.5
call user func took 0.532 seconds
Output for 5.1.4
call user func took 0.571 seconds
Output for 5.1.3
call user func took 0.536 seconds
Output for 5.1.0
call user func took 0.538 seconds
Output for 5.0.4
call user func took 0.729 seconds
Output for 5.0.3
call user func took 0.714 seconds
Output for 5.0.2
call user func took 0.721 seconds
Output for 5.0.1
call user func took 0.700 seconds
Output for 5.0.0
call user func took 0.728 seconds
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/dlsFK 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/dlsFK 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/dlsFK on line 4
Process exited with code 255.