run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo(string $bar) { echo "I got $bar!", PHP_EOL; } foo(new class { public function __toString() { return self::class; } });
based on f5d8p
Output for 7.3.1
I got class@anonymous/in/RrtJr0x7f94034c0087!
Output for 7.3.0
I got class@anonymous/in/RrtJr0x7fa0b8aa8087!
Output for 7.2.13
I got class@anonymous/in/RrtJr0x7f7cc8603087!
Output for 7.2.12
I got class@anonymous/in/RrtJr0x7ff28b49d087!
Output for 7.2.11
I got class@anonymous/in/RrtJr0x7f8c2d19b087!
Output for 7.2.10
I got class@anonymous/in/RrtJr0x7fbf63651087!
Output for 7.2.9
I got class@anonymous/in/RrtJr0x7fe715b34087!
Output for 7.2.8
I got class@anonymous/in/RrtJr0x7f49c8a29087!
Output for 7.2.7
I got class@anonymous/in/RrtJr0x7fbe44c2c087!
Output for 7.2.6
I got class@anonymous/in/RrtJr0x7f2764a56087!
Output for 7.2.5
I got class@anonymous/in/RrtJr0x7f0eafd7c087!
Output for 7.2.4
I got class@anonymous/in/RrtJr0x7f2323478087!
Output for 7.2.3
I got class@anonymous/in/RrtJr0x7fe6fe282087!
Output for 7.2.2
I got class@anonymous/in/RrtJr0x7f48b4fb7087!
Output for 7.2.1
I got class@anonymous/in/RrtJr0x7f70d84d4087!
Output for 7.2.0
I got class@anonymous/in/RrtJr0x7f6230de8087!
Output for 7.1.25
I got class@anonymous/in/RrtJr0x7efd015b8087!
Output for 7.1.20
I got class@anonymous/in/RrtJr0x7f04cb929087!
Output for 7.1.10
I got class@anonymous/in/RrtJr0x7f753850c087!
Output for 7.1.7
I got class@anonymous/in/RrtJr0x7f813071a087!
Output for 7.1.6
I got class@anonymous/in/RrtJr0x7f5da069e087!
Output for 7.1.5
I got class@anonymous/in/RrtJr0x7f768f4b8087!
Output for 7.1.0
I got class@anonymous/in/RrtJr0x7fd9739fb087!
Output for 7.0.20
I got class@anonymous/in/RrtJr0x7f37bc9ae087!
Output for 7.0.6
I got class@anonymous/in/RrtJr0x7ff6f1b6f087!
Output for 7.0.5
I got class@anonymous/in/RrtJr0x7fdc33f80087!
Output for 7.0.4
I got class@anonymous/in/RrtJr0x7fe75df8a087!
Output for 7.0.3
I got class@anonymous/in/RrtJr0x7fa742663087!
Output for 7.0.2
I got class@anonymous/in/RrtJr0x7f95429f1087!
Output for 7.0.1
I got class@anonymous/in/RrtJr0x7f83ef045087!
Output for 7.0.0
I got class@anonymous/in/RrtJr0x7fbb87e56087!
Output for 5.4.1 - 5.6.28
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/RrtJr on line 3
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_CLASS in /in/RrtJr on line 3
Process exited with code 255.