3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { private $foo = 'bar'; } class B extends A { public function setFoo($foo) { return $this->{chr(0) . 'A' . chr(0) . 'foo'} = $foo; } public function getFoo() { return $this->{chr(0) . 'A' . chr(0) . 'foo'}; } } $b = new B(); $b->setFoo('baz'); var_dump($b->getFoo());