3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class base {} ; class foo extends base { protected $a; public function __construct(){ $a = get_called_class(); } } class bar extends base { protected $a; public function __construct(){ $a = get_class($this); } } $time = microtime(true); for($x=0;$x<10000;$x++){ $foo = new foo(); } echo round(microtime(true) - $time, 5)." s\n"; $time = microtime(true); for($x=0;$x<10000;$x++){ $foo = new bar(); } echo round(microtime(true) - $time, 5)." s\n";
Output for 7.1.0
0.00176 s 0.00217 s
Output for 7.0.14
0.00167 s 0.0022 s
Output for 7.0.7
0.00135 s 0.00164 s
Output for 7.0.6
0.00104 s 0.00133 s
Output for 7.0.5
0.00199 s 0.00261 s
Output for 7.0.4
0.0017 s 0.00219 s
Output for 7.0.3
0.00149 s 0.0019 s
Output for 7.0.2
0.00174 s 0.00208 s
Output for 7.0.1
0.00122 s 0.00159 s
Output for 7.0.0
0.00123 s 0.00154 s
Output for 5.6.28
0.00406 s 0.00477 s
Output for 5.6.22
0.00317 s 0.00385 s
Output for 5.6.21
0.0032 s 0.00377 s
Output for 5.6.20
0.00376 s 0.00462 s
Output for 5.6.19
0.0041 s 0.00457 s
Output for 5.6.18
0.0033 s 0.00379 s
Output for 5.6.17
0.00345 s 0.00412 s
Output for 5.6.16
0.00362 s 0.00421 s
Output for 5.6.15
0.00264 s 0.00307 s
Output for 5.6.14
0.00363 s 0.00434 s
Output for 5.6.13
0.0037 s 0.00434 s
Output for 5.6.12
0.00331 s 0.00391 s
Output for 5.6.11
0.00323 s 0.00375 s
Output for 5.6.10
0.00342 s 0.00397 s
Output for 5.6.9
0.00356 s 0.00349 s
Output for 5.6.8
0.0032 s 0.00378 s
Output for 5.6.7
0.0038 s 0.00434 s
Output for 5.6.6
0.00348 s 0.00409 s
Output for 5.6.5
0.00348 s 0.00385 s
Output for 5.6.4
0.00354 s 0.00415 s
Output for 5.6.3
0.00367 s 0.00408 s
Output for 5.6.2
0.00363 s 0.00431 s
Output for 5.6.1
0.00388 s 0.00453 s
Output for 5.6.0
0.0036 s 0.00416 s
Output for 5.5.36
0.00249 s 0.00304 s
Output for 5.5.35
0.00329 s 0.00415 s
Output for 5.5.34
0.0036 s 0.00427 s
Output for 5.5.33
0.00239 s 0.00292 s
Output for 5.5.32
0.00317 s 0.00403 s
Output for 5.5.31
0.00287 s 0.0036 s
Output for 5.5.30
0.00321 s 0.00418 s
Output for 5.5.29
0.00344 s 0.00414 s
Output for 5.5.28
0.00426 s 0.00472 s
Output for 5.5.27
0.00385 s 0.00493 s
Output for 5.5.26
0.00259 s 0.00331 s
Output for 5.5.25
0.00358 s 0.00605 s
Output for 5.5.24
0.0041 s 0.00506 s
Output for 5.5.23
0.00346 s 0.00423 s
Output for 5.5.22
0.00374 s 0.00439 s
Output for 5.5.21
0.0035 s 0.00427 s
Output for 5.5.20
0.00392 s 0.00503 s
Output for 5.5.19
0.00375 s 0.00441 s
Output for 5.5.18
0.00401 s 0.00494 s
Output for 5.5.16
0.00389 s 0.00475 s
Output for 5.5.15
0.00405 s 0.00479 s
Output for 5.5.14
0.00386 s 0.00468 s
Output for 5.5.13
0.00338 s 0.00368 s
Output for 5.5.12
0.0042 s 0.00485 s
Output for 5.5.11
0.00357 s 0.0043 s
Output for 5.5.10
0.00304 s 0.00366 s
Output for 5.5.9
0.00314 s 0.00376 s
Output for 5.5.8
0.00422 s 0.00484 s
Output for 5.5.7
0.004 s 0.00482 s
Output for 5.5.6
0.00376 s 0.0045 s
Output for 5.5.5
0.00374 s 0.00394 s
Output for 5.5.4
0.0035 s 0.00414 s
Output for 5.5.3
0.00233 s 0.00331 s
Output for 5.5.2
0.00221 s 0.00281 s
Output for 5.5.1
0.00227 s 0.00276 s
Output for 5.5.0
0.00227 s 0.0032 s
Output for 5.4.45
0.00381 s 0.00471 s
Output for 5.4.44
0.00406 s 0.00456 s
Output for 5.4.43
0.0025 s 0.00309 s
Output for 5.4.42
0.00409 s 0.00455 s
Output for 5.4.41
0.00397 s 0.00457 s
Output for 5.4.40
0.00263 s 0.00307 s
Output for 5.4.39
0.00393 s 0.00461 s
Output for 5.4.38
0.00367 s 0.00444 s
Output for 5.4.37
0.0024 s 0.00277 s
Output for 5.4.36
0.00398 s 0.00464 s
Output for 5.4.35
0.00419 s 0.00493 s
Output for 5.4.34
0.00382 s 0.00441 s
Output for 5.4.32
0.00402 s 0.00458 s
Output for 5.4.31
0.00386 s 0.00452 s
Output for 5.4.30
0.00324 s 0.00291 s
Output for 5.4.29
0.00422 s 0.00492 s
Output for 5.4.28
0.00346 s 0.00401 s
Output for 5.4.27
0.00355 s 0.00521 s
Output for 5.4.26
0.004 s 0.00466 s
Output for 5.4.25
0.00424 s 0.00496 s
Output for 5.4.24
0.00271 s 0.0032 s
Output for 5.4.23
0.004 s 0.00485 s
Output for 5.4.22
0.00382 s 0.00447 s
Output for 5.4.21
0.00381 s 0.0046 s
Output for 5.4.20
0.0032 s 0.00373 s
Output for 5.4.19
0.00388 s 0.0042 s
Output for 5.4.18
0.00233 s 0.00273 s
Output for 5.4.17
0.00236 s 0.00281 s
Output for 5.4.16
0.00237 s 0.00272 s
Output for 5.4.15
0.00231 s 0.00281 s
Output for 5.4.14
0.00239 s 0.00288 s
Output for 5.4.13
0.00237 s 0.00275 s
Output for 5.4.12
0.00237 s 0.00294 s
Output for 5.4.11
0.00351 s 0.00389 s
Output for 5.4.10
0.00259 s 0.00295 s
Output for 5.4.9
0.00227 s 0.00278 s
Output for 5.4.8
0.00227 s 0.00272 s
Output for 5.4.7
0.00229 s 0.00272 s
Output for 5.4.6
0.0023 s 0.00282 s
Output for 5.4.5
0.00228 s 0.00272 s
Output for 5.4.4
0.00268 s 0.00316 s
Output for 5.4.3
0.00264 s 0.00311 s
Output for 5.4.2
0.00232 s 0.00274 s
Output for 5.4.1
0.00279 s 0.00278 s
Output for 5.4.0
0.0025 s 0.00346 s
Output for 5.3.29
0.0068 s 0.00736 s
Output for 5.3.28
0.00679 s 0.00719 s
Output for 5.3.27
0.00386 s 0.0046 s
Output for 5.3.26
0.00382 s 0.0043 s
Output for 5.3.3, 5.3.5, 5.3.25
0.00378 s 0.00421 s
Output for 5.3.24
0.00535 s 0.00492 s
Output for 5.3.23
0.00397 s 0.00439 s
Output for 5.3.22
0.00671 s 0.00745 s
Output for 5.3.21
0.00398 s 0.00447 s
Output for 5.3.20
0.00674 s 0.00731 s
Output for 5.3.19
0.00384 s 0.00429 s
Output for 5.3.18
0.00376 s 0.00423 s
Output for 5.3.17
0.00388 s 0.00439 s
Output for 5.3.16
0.00383 s 0.00428 s
Output for 5.3.15
0.00411 s 0.00466 s
Output for 5.3.14
0.00494 s 0.0049 s
Output for 5.3.13
0.00388 s 0.00431 s
Output for 5.3.12
0.00398 s 0.00445 s
Output for 5.3.11
0.00609 s 0.00674 s
Output for 5.3.10
0.00411 s 0.00502 s
Output for 5.3.9
0.00381 s 0.00429 s
Output for 5.3.8
0.00377 s 0.00429 s
Output for 5.3.7
0.00655 s 0.00725 s
Output for 5.3.6
0.00461 s 0.0045 s
Output for 5.3.4
0.00387 s 0.00442 s
Output for 5.3.2
0.00414 s 0.00434 s
Output for 5.3.1
0.00485 s 0.00554 s
Output for 5.3.0
0.00387 s 0.00449 s
Output for 5.0.0 - 5.2.17
Fatal error: Call to undefined function get_called_class() in /in/W8Gbp on line 9
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/W8Gbp on line 6
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/W8Gbp on line 6
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/W8Gbp on line 6
Process exited with code 255.