3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { protected $a = 0; } $a = new A(); $b = (object)[chr(0) . '*' . chr(0) . 'a' => 1]; echo $b->{chr(0) . '*' . chr(0) . 'a'}; echo $a->{chr(0) . '*' . chr(0) . 'a'};
based on CEaSn
Output for 7.0.0 - 7.3.0rc3
Fatal error: Uncaught Error: Cannot access property started with '\0' in /in/WcNoL:10 Stack trace: #0 {main} thrown in /in/WcNoL on line 10
Process exited with code 255.
Output for hhvm-3.15.4
1 Fatal error: Uncaught Error: Cannot access property started with '\0' in /in/WcNoL:11 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Cannot access property started with '\0' in /in/WcNoL on line 10
Process exited with code 255.