3v4l.org

run code in 150+ 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 - 5.6.28, 7.0.0 - 7.1.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 hhvm-3.12.0
int(1) Notice: Constant FOO already defined in /in/rAKrH on line 7 int(1) Warning: Case insensitive constant names are not supported in HipHop in /in/rAKrH on line 10 int(1) Notice: Constant BAR already defined in /in/rAKrH on line 12 int(1) Warning: Case insensitive constant names are not supported in HipHop in /in/rAKrH on line 15 int(1) Notice: Constant baz already defined in /in/rAKrH on line 17 int(1)
Output for hhvm-3.10.0
int(1) Notice: Constant FOO already defined in /in/rAKrH on line -1 int(1) Warning: Case insensitive constant names are not supported in HipHop in /in/rAKrH on line -1 int(1) Notice: Constant BAR already defined in /in/rAKrH on line -1 int(1) Warning: Case insensitive constant names are not supported in HipHop in /in/rAKrH on line -1 int(1) Notice: Constant baz already defined in /in/rAKrH on line -1 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)