3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class foo { function get_flags($uid = NULL, $set=TRUE) { $flags = $this->get_metadata('flags', $uid); if($flags == FALSE){ return FALSE; } if($set){$this->flags = $flags;} return $flags; } function get_metadata($field, $uid) { return $field.$uid; } function __construct() { var_dump($this->get_flags(1, false)); } } $this = new foo; var_dump($this);
Output for 5.3.0 - 5.4.25
Fatal error: Cannot re-assign $this in /in/In46n on line 23
Process exited with code 255.