> | > $conn = mysql_connect(...) or user_error("Cannot connect",
E_USER_ERROR);
> | > lacks flexibility, not in error_handling but the in the or construct.
> | Philip
> | > Olson dropped a note about this in a recent mail.
>
> I'll check it, but you can write still:
>
> $connect = mysql_connect(...);
> if ($connect === FALSE) {
>     trigger_error(...);
> }

As resource ids are defined to be always true, after
casting to boolean (not depending on whether they
are implemented with integers or not), using "or"
is safe. And it is short.

Goba


Reply via email to