Pyh.conf’25: a new PHP conference for the Russian-speaking community

Voting

: min(two, four)?
(Example: nine)

The Note You're Voting On

Mike Robinson
12 years ago
Note that with bindParam the second parameter is passed by reference. This means that the following will produce a warning if E_STRICT is enabled:

<?php
$stmt
->bindParam('type', $object->getType());

// Strict Standards: Only variables should be passed by reference in /path/to/file.php on line 123
?>

If the second parameter is not an actual variable, either set the result of $object->getType(); to a variable and use that variable in bindParam or use bindValue instead.

<< Back to user notes page

To Top