Re: [PHP-DEV] Re: [PHP] Re: [PHP-DEV] Is PHP designed (have the capability) to access remote DB?

2003-03-12 Thread Michael Sims
On Wed, 12 Mar 2003 13:39:36 - (GMT), you wrote:

>but your not. Please redirect further rants to [EMAIL PROTECTED] where
>they will be able to help.

Careful...devnull.com is an actual domain. :-)  Although giveashit
doesn't seem to exist:

550 5.1.1 [EMAIL PROTECTED] User unknown

--
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] PROPOSAL: "unless" control structure

2003-01-12 Thread Michael Sims
My apologies if this has been brought up before, but I searched the
archives and couldn't find a reference to it.

I'm sure this is the sort of thing that would have already been
implemented if there was any desire for it among the developers, but I
was wondering if anyone had considered adding support for an "unless"
control structure, similar to the one Perl has.  I personally find it
much more logical in certain cases.  For example, compare this:

if (!$user->isAdministrator) {
  header('Location: ...');
  exit;
}

With this:

unless ($user->isAdministrator) {
  header('Location: ...');
  exit;
}

I think the second one is much easier to read.  I strive to write code
that is self-documenting, so I tend to pick variable names and
function names that are pretty self explanatory.  I think an "unless"
control structure would go a long way to helping people write
self-documenting code.

Just a thought, sorry if this is not the proper forum for this sort of
thing.

--
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] error reporting for PHP5

2002-11-24 Thread Michael Sims
On Mon, 25 Nov 2002 01:04:00 -0500, you wrote:

>As for custom error codes, I'm not sure how these would be handled in
>PHP... In fact, I'm not entirely convince that we really should have
>this sort of thing (i.e. trigger_error()). In my experience (and maybe
>I'm unique) I have never actually used trigger_error() in any sort of
>meaniful way. Rather, I simply deal with the error myself.

Sorry to jump in the middle of a conversation, but I just wanted to
say that I personally use trigger_error() quite often.  The site I
maintain has a nice custom error handler which logs the error and
emails the admins the error details + var dumps, etc.  I often use
trigger_error() in my code because it allows me to treat certain
situations the same as a PHP generated error.  Of course, I suppose I
could just call my custom error handler directly but that seems less
elegant...just MHO.

--
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php