3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function s($UserGMTOffset){ $UserGMTOffset = $UserGMTOffset * 100; $str_tmp = "-"; if($UserGMTOffset >= 0) { //change - to + $str_tmp = "+"; } if(abs($UserGMTOffset) > 999){ $str_tmp .= abs($UserGMTOffset); } else { $str_tmp .= '0'.abs($UserGMTOffset); if($UserGMTOffset == 0){ $str_tmp .= '00'; } } var_dump(array('str_tmp' => $str_tmp, 'zone' => $zone)); } s('+0000');
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: zone in /in/3h4bN on line 23 array(2) { ["str_tmp"]=> string(5) "+0000" ["zone"]=> NULL }
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: zone in /in/3h4bN on line 23 array(2) { ["str_tmp"]=> string(5) "+0000" ["zone"]=> NULL }