developer

Why would one omit the close tag?

Question: ❓❓❓ I keep reading it is poor practice to use the PHP close tag ?> at the end of the file. The header problem seems irrelevant in the following context (and this is the only good argument so far): Modern versions of PHP set the output_buffering flag in php.ini Read more…

By admin, ago
developer

What is the difference between bindParam and bindValue?

Question: ❓❓❓ What is the difference between PDOStatement::bindParam() and PDOStatement::bindValue()? Good Answer: 👌👌👌 The answer is in the documentation for bindParam: Unlike PDOStatement::bindValue(), the variable is bound as a reference and will only be evaluated at the time that PDOStatement::execute() is called. And execute call PDOStatement::bindParam() to bind PHP variables Read more…

By admin, ago