If you wonder how the wonderful PHP no-explicitly-define-data-type feature against the Java, in context of Webservice. This what you should do: return $returnValue + 0; This also happens if you have an array returned from database and you are 100% sure that it is an Integer (non-string) type. $intValue = $queryResult[0]['id'] + 0; This ensure your return type is always Integer. Well, at least in my case. What a weird hack. Care to show better to return integer not string? I am a noob in PHP! Bah, this language is dificult than C.
A place where I don't know what I said.