PHP equivalent to VB on error resume next

PHP equivalent to VB on error resume next

am 27.07.2007 11:42:06 von Buzby

As per the title - is there a VBscript type on error resume next
function in PHP 4.2xx

Any pointer would be hugely appreciated!

Cheers!

Grant
--
Buzby
There's nothing more dangerous than a resourceful idiot

Re: PHP equivalent to VB on error resume next

am 27.07.2007 11:48:46 von Captain Paralytic

On 27 Jul, 10:42, "Buzby" wrote:
> As per the title - is there a VBscript type on error resume next
> function in PHP 4.2xx
>
> Any pointer would be hugely appreciated!
>
> Cheers!
>
> Grant
> --
> Buzby
> There's nothing more dangerous than a resourceful idiot

http://www.php.net/manual/en/language.exceptions.php

Re: PHP equivalent to VB on error resume next

am 27.07.2007 11:54:27 von luiheidsgoeroe

On Fri, 27 Jul 2007 11:42:06 +0200, Buzby wrote:
> As per the title - is there a VBscript type on error resume next
> function in PHP 4.2xx
>
> Any pointer would be hugely appreciated!

I'm not familiar with VBscript, but you can control error handling quite
good:

http://www.php.net/set_error_handler

Some relevant passage:
"Also note that it is your responsibility to die() if necessary. If the
error-handler function returns, script execution will continue with the
next statement after the one that caused an error. "

Some limitations (pretty obvious offcourse..):
"The following error types cannot be handled with a user defined function:
E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR,
E_COMPILE_WARNING, and most of E_STRICT raised in the file where
set_error_handler() is called."
http://nl2.php.net/manual/en/ref.errorfunc.php#errorfunc.con stants

Then again, fatal is fatal, and ignoring errors is not a very good way to
go in most cases. Some extra checks before actions help out a lot.
--
Rik Wasmus

Re: PHP equivalent to VB on error resume next

am 27.07.2007 12:23:44 von gosha bine

On 27.07.2007 11:42 Buzby wrote:
> As per the title - is there a VBscript type on error resume next
> function in PHP 4.2xx
>
> Any pointer would be hugely appreciated!
>
> Cheers!
>
> Grant

php's "mute" operator is the same as VB's "on error resume next":


VB:

on error resume next
a = xyz / 0 ' no error


php:

@$a = $xyz / 0; // no error



--
gosha bine

makrell ~ http://www.tagarga.com/blok/makrell
php done right ;) http://code.google.com/p/pihipi