3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php public 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.4.0 - 5.4.13
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /in/9kV3G on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.23
Parse error: syntax error, unexpected T_PUBLIC in /in/9kV3G on line 3
Process exited with code 255.