3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { function a () { $this = 5; var_dump($this); } } $a = new A(); var_dump($a); $a->a; var_dump($a);
based on FeDdn
Output for 5.0.0 - 5.4.35
Fatal error: Cannot re-assign $this in /in/bsPou on line 7
Process exited with code 255.
Output for 4.3.0 - 4.4.9
int(5) int(5) int(5)