3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php trait Change { const YES = 1; const NOT = 0; public function change($field_name) { $this->{$field_name} = ($this->{$field_name} === 1) ? 0 : 1; return $this; } }
Output for 5.4.0 - 5.5.12
Fatal error: Traits cannot have constants in /in/JGCuc on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/JGCuc on line 2
Process exited with code 255.