3v4l.org

run code in 200+ 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 - 5.6.38, hhvm-3.10.1, hhvm-3.20.2 - 3.21.0, 7.0.0 - 7.3.0rc4
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 hhvm-3.21.3 - 3.22.0
Notice: Undefined variable: dobpart in /in/eUtoH on line -1 string(0) "" Notice: Undefined variable: dobpart in /in/eUtoH on line -1 string(0) "" Notice: Undefined variable: dobpart in /in/eUtoH on line -1 string(0) ""
Output for hhvm-3.11.1 - 3.19.2
Notice: Undefined variable: dobpart in /in/eUtoH on line 4 Warning: substr() expects parameter 1 to be string, null given in /in/eUtoH on line 4 Warning: str_repeat() expects parameter 1 to be string, null given in /in/eUtoH on line 5 Warning: strtoupper() expects parameter 1 to be string, null given in /in/eUtoH on line 6 NULL Notice: Undefined variable: dobpart in /in/eUtoH on line 4 Warning: substr() expects parameter 1 to be string, null given in /in/eUtoH on line 4 Warning: str_repeat() expects parameter 1 to be string, null given in /in/eUtoH on line 5 Warning: strtoupper() expects parameter 1 to be string, null given in /in/eUtoH on line 6 NULL Notice: Undefined variable: dobpart in /in/eUtoH on line 4 Warning: substr() expects parameter 1 to be string, null given in /in/eUtoH on line 4 Warning: str_repeat() expects parameter 1 to be string, null given in /in/eUtoH on line 5 Warning: strtoupper() expects parameter 1 to be string, null given in /in/eUtoH on line 6 NULL
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) ""