Do I need to extract integers

Is there any point in avoiding the integer in the request after converting it using intval() ?

I use an integer like this:

 $sql .= " LIMIT " . $this->db->escape(intval($offset)) . ", 10"; 
+6
source share
2 answers

No, intval will always return an integer ( 0 on failure).

+7
source

Not. because as a result of intval you cannot get anything but a number.

+2
source

Source: https://habr.com/ru/post/923372/


All Articles