3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php foreach(array('day', 'month', 'year') as $dobPart) { $prefix = substr($dobpart,0,1); $prefix = str_repeat($prefix,1); var_dump(strtoupper($prefix)); }
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: dobpart in /in/eUtoH on line 4 string(0) "" Notice: Undefined variable: dobpart in /in/eUtoH on line 4 string(0) "" Notice: Undefined variable: dobpart in /in/eUtoH on line 4 string(0) ""
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: dobpart in /in/eUtoH on line 4 string(0) "" Notice: Undefined variable: dobpart in /in/eUtoH on line 4 string(0) "" Notice: Undefined variable: dobpart in /in/eUtoH on line 4 string(0) ""