Function executes faster without STRICT modifier?

Maybe an overhead from the repeated function call that is streamlined away by inlining the function? That’s what I’d guess. You’ve got a very simple expression there. An actual function-call presumably involves stack setup, passing parameters etc. The test below gives run-times of 5ms for inlined and 50ms for strict. BEGIN; CREATE SCHEMA f; SET … Read more

PHP 5 disable strict standards error

Do you want to disable error reporting, or just prevent the user from seeing it? It’s usually a good idea to log errors, even on a production site. # in your PHP code: ini_set(‘display_errors’, ‘0’); # don’t show any errors… error_reporting(E_ALL | E_STRICT); # …but do log them They will be logged to your standard … Read more

Strict Standards: mysqli_next_result() error with mysqli_multi_query

While pipodesign corrected the error within the $querystring and alleviated the problem, the actual solution was not provided regarding the Strict Standards error. I disagree with SirBT’s advice, changing from DO WHILE to WHILE is not necessary. The Strict Standards message that you receive is quite informative. To obey, use this: do{} while(mysqli_more_results($db) && mysqli_next_result($db)); … Read more

Error message “Strict standards: Only variables should be passed by reference”

Well, in obvious cases like that, you can always tell PHP to suppress messages by using “@” in front of the function. $monthly_index = @array_shift(unpack(‘H*’, date(‘m/Y’))); It may not be one of the best programming practices to suppress all errors this way, but in certain cases (like this one) it comes handy and is acceptable. … Read more