3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(-1); define('FOO', 1); var_dump(FOO); define('FOO', 2); var_dump(FOO); define('BAR', 1, true); var_dump(BAR); define('BAR', 2); var_dump(BAR); define('baz', 1, true); var_dump(baz); define('baz', 2); var_dump(baz);
Output for 4.3.0 - 4.3.6, 4.3.9 - 4.4.9, 5.0.1 - 7.2.0
int(1) Notice: Constant FOO already defined in /in/rAKrH on line 7 int(1) int(1) int(2) int(1) Notice: Constant baz already defined in /in/rAKrH on line 17 int(1)
Output for 4.3.7 - 4.3.8, 5.0.0
int(1) Notice: Constant already defined in /in/rAKrH on line 7 int(1) int(1) int(2) int(1) Notice: Constant already defined in /in/rAKrH on line 17 int(1)