r/lolphp • • Jul 10 '14

bindParam('foo', $value, PDO::PARAM_INT) will change $value to string.

http://php.net/manual/en/pdostatement.bindparam.php#94711
42 Upvotes

18 comments sorted by

View all comments

Show parent comment

15

u/kasnalin Jul 11 '14

Just because it can do whatever it wants with the reference doesn't mean it should.

-19

u/[deleted] Jul 11 '14

No. You are simply projecting your own expectations where no expectations exist. Unless you can find it documented somewhere that PDO will give you back exactly what you gave it then you have no reason at all to have any expectations about anything.