3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php define('dd', 'DEFINE'); define('cc', 'DEFINE2'); $a = 'dd'; $b = 'cc'; $flags = array(); $flags |= constant($a); $flags |= constant($b); var_dump($flags);
Output for 7.1.0 - 7.2.6
Warning: A non-numeric value encountered in /in/mvfEd on line 11 Warning: A non-numeric value encountered in /in/mvfEd on line 12 int(0)
Output for 4.3.0 - 7.0.20
int(0)