3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new class ('buu') { public function __construct($b) { $this->b = $b; } }; var_dump($a); echo get_class($a);
Output for 7.2.0
object(class@anonymous)#1 (1) { ["b"]=> string(3) "buu" } class@anonymous/in/I1H1o0x7f5e95ff8063
Output for 7.1.10
object(class@anonymous)#1 (1) { ["b"]=> string(3) "buu" } class@anonymous/in/I1H1o0x7f820d9c1063
Output for 7.1.7
object(class@anonymous)#1 (1) { ["b"]=> string(3) "buu" } class@anonymous/in/I1H1o0x7fb6d04e9063
Output for 7.1.6
object(class@anonymous)#1 (1) { ["b"]=> string(3) "buu" } class@anonymous/in/I1H1o0x7f737151f063
Output for 7.1.5
object(class@anonymous)#1 (1) { ["b"]=> string(3) "buu" } class@anonymous/in/I1H1o0x7f4eaf0a7063
Output for 7.1.0
object(class@anonymous)#1 (1) { ["b"]=> string(3) "buu" } class@anonymous/in/I1H1o0x7fd2b758a063
Output for 7.0.20
object(class@anonymous)#1 (1) { ["b"]=> string(3) "buu" } class@anonymous/in/I1H1o0x7f253a22a063
Output for 7.0.6
object(class@anonymous)#1 (1) { ["b"]=> string(3) "buu" } class@anonymous/in/I1H1o0x7f90d26d6063
Output for 7.0.5
object(class@anonymous)#1 (1) { ["b"]=> string(3) "buu" } class@anonymous/in/I1H1o0x7f6886cfd063
Output for 7.0.4
object(class@anonymous)#1 (1) { ["b"]=> string(3) "buu" } class@anonymous/in/I1H1o0x7f91e7d57063
Output for 7.0.3
object(class@anonymous)#1 (1) { ["b"]=> string(3) "buu" } class@anonymous/in/I1H1o0x7fa4e9e41063
Output for 7.0.2
object(class@anonymous)#1 (1) { ["b"]=> string(3) "buu" } class@anonymous/in/I1H1o0x7f237bc46063
Output for 7.0.1
object(class@anonymous)#1 (1) { ["b"]=> string(3) "buu" } class@anonymous/in/I1H1o0x7f68559a4063
Output for 7.0.0
object(class@anonymous)#1 (1) { ["b"]=> string(3) "buu" } class@anonymous/in/I1H1o0x7f9f66180063
Output for 5.4.11 - 5.6.28
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/I1H1o on line 3
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_CLASS in /in/I1H1o on line 3
Process exited with code 255.