PHP 8.5.0 Beta 1 available for testing

Voting

: nine minus nine?
(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