3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class php { function get($name){ return $this->$name; } function set($name, $value){ $this->$name = $value; } } $p = new php(); $p->set('id','1'); $p->set('idn',666); echo $p->get('id'); echo $p->get('idn');
Output for 4.3.0 - 7.1.0
1666