Manual shows to test like the above.
Can we not test:
not test ?:
That's not valid PHP. I'm not sure what you're asking for here--I guess the answer is no?
Why this no valid ? Just checking if execution went ahead or not.
Why this no valid ? Just checking if params got bound or not.
It depends on whether you're willing to accept the consequences if something fails. If you do a mysqli_stmt_prepare() and it fails, then any subsequent command that tries to use that prepared statement is going to fail, and likely by throwing an exception or fatal error, as opposed to just returning false.
Yet another advantage of PDO: it's relatively easy to configure it to always throw exceptions on errors, allowing you to explicitly catch them in try/catch blocks.
Go ahead and try it out, tell me why it isn't valid.