RE: [PHP4BETA] Is this a bug? Default params?

From: Date: Tue, 10 Aug 1999 12:32:06 +0000
Subject: RE: [PHP4BETA] Is this a bug? Default params?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-3274@lists.php.net to get a copy of this message
> -----Original Message----- > From: georgeh@theta.blowtorch.com [mailto:georgeh@theta.blowtorch.com]On > Behalf Of George Hartz > Sent: 09 August 1999 06:37 PM > To: Samuel Liddicott > Cc: php4beta@lists.php.net > Subject: Re: [PHP4BETA] Is this a bug? Default params? > > A better option, given the assumption that it can't be changed, is to > add a simple shorthand for it, something like this: > > $Username ?= $GLOBALS["login"]["username"]; > > Figuring that "?=" is semi-intuitive for "equals if not set" or > something along those lines... > > Actually, now that I've said that, I really like the idea! :) I do too, very nice. But what I was saying is if we can type that as the first few lines of the function, why can't this JIT compiler pretent we did? JIT or not it should make no difference, as that code would be executed before any major conditionals. Nice idea of yours. Does that work for not-set, or for not-true? Sam

« previous php.version4 (#3274) next »