> LOL. I sure as hell don't know what color to paint a nuclear power plant.
>
flourescent green ?
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Adam Maccabee Trachtenberg wrote:
On Mon, 12 Jul 2004, John Coggeshall wrote:
Not to bust everyone's bubble here, but frankly what is the point of a
90-100+ thread on this? I mean can't this just be implemented as a PHP
function without all this discussion?
Maybe we should name the function bike
+1 ;)
On Mon, 12 Jul 2004 22:44:00 -0400 (EDT), Adam Maccabee Trachtenberg
<[EMAIL PROTECTED]> wrote:
> On Mon, 12 Jul 2004, John Coggeshall wrote:
>
> > Not to bust everyone's bubble here, but frankly what is the point of a
> > 90-100+ thread on this? I mean can't this just be implemented as a P
On Tue, 13 Jul 2004 09:12:19 +0200 (CEST)
Derick Rethans <[EMAIL PROTECTED]> wrote:
> On Mon, 12 Jul 2004, George Schlossnagle wrote:
>
> > what was wrong with nvl() (of oracle fame)?
>
> Nobody else but oracle people have any idea what they expect when they
> see nvl().
Agree.
Moreover, it's t
On Mon, 12 Jul 2004, George Schlossnagle wrote:
> what was wrong with nvl() (of oracle fame)?
Nobody else but oracle people have any idea what they expect when they
see nvl().
Derick
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hello Andi,
wow i didn't remember seeing that. So with default being a
reserved word to me it seems like one of the best choices.
Monday, July 12, 2004, 10:01:47 PM, you wrote:
> It's a reserved word so I doubt it'll break scripts.
> Andi
> At 05:37 PM 7/12/2004 +0200, Marcus Boerger wro
On Mon, 12 Jul 2004, John Coggeshall wrote:
> Not to bust everyone's bubble here, but frankly what is the point of a
> 90-100+ thread on this? I mean can't this just be implemented as a PHP
> function without all this discussion?
Maybe we should name the function bikeshed()? :)
http://www.unixgu
Not to bust everyone's bubble here, but frankly what is the point of a
90-100+ thread on this? I mean can't this just be implemented as a PHP
function without all this discussion?
Coogle.
--
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-
John Coggeshall http://www
Marc Richards wrote:
I also think that what Rasmus suggeted is a good idea:
"So, perhaps introduce the value() function which doesn't do any type
casting and enhance the intval(), strval() and floatval() functions to
act like value() but cast appropriately unless the default arg is
returned."
I
Jason Garber wrote:
MR> $level = value($_POST['level'], NULL, INT);
MR> switch($level){ MR> case 0: MR> echo "Welcome to level 0";
MR> break; MR> case 1: MR> echo "Welcome to level 1"; MR>
break; MR> case 2: MR> echo "Welcome to level 2"; MR> break;
MR> default: MR> echo "
* Thus wrote Rasmus Lerdorf:
>
> So, perhaps introduce the value() function which doesn't do any type
> casting and enhance the intval(), strval() and floatval() functions to act
> like value() but cast appropriately unless the default arg is returned.
> To retain backward compatibility the intval
MR> $level = value($_POST['level'], NULL, INT);
MR> switch($level){
MR> case 0:
MR> echo "Welcome to level 0";
MR> break;
MR> case 1:
MR> echo "Welcome to level 1";
MR> break;
MR> case 2:
MR> echo "Welcome to level 2";
MR> break;
MR> default:
MR> echo "That level is in
Jason Garber wrote:
Sunday, July 11, 2004, 10:48:06 PM, you wrote:
RL> On Sun, 11 Jul 2004, Jason Garber wrote:
The concept is desirable, but can be achieved if you need it just as
simply using already available syntax (ie a cast):
$level = (integer) value($_SESSION['level'], 1);
RL> The problem
It's a reserved word so I doubt it'll break scripts.
Andi
At 05:37 PM 7/12/2004 +0200, Marcus Boerger wrote:
Hello Derick,
Monday, July 12, 2004, 11:21:06 AM, you wrote:
> On Mon, 12 Jul 2004, Sebastian Bergmann wrote:
>> Andi Gutmans wrote:
>> > How about default($var, expr)?
>>
>> It might be a
Hello George,
Monday, July 12, 2004, 6:36:22 PM, you wrote:
> On Jul 12, 2004, at 11:37 AM, Marcus Boerger wrote:
>> Hello Derick,
>>
>> Monday, July 12, 2004, 11:21:06 AM, you wrote:
>>
>>> Agreed, and I also like default()
>>
>> The problem with default() is that there will be tons of scripts
>>
>> The problem with default() is that there will be tons of scripts out
>> there
>> that will be broken by this. Hence i'd like to see a more non intuitive
>> name (like the ifsetor). Probably getvalue() was the best compromise so
>> far.
GS> what was wrong with nvl() (of oracle fame)?
ifset(
On Jul 12, 2004, at 11:37 AM, Marcus Boerger wrote:
Hello Derick,
Monday, July 12, 2004, 11:21:06 AM, you wrote:
Agreed, and I also like default()
The problem with default() is that there will be tons of scripts out
there
that will be broken by this. Hence i'd like to see a more non intuitive
name
Hello Derick,
Monday, July 12, 2004, 11:21:06 AM, you wrote:
> On Mon, 12 Jul 2004, Sebastian Bergmann wrote:
>> Andi Gutmans wrote:
>> > How about default($var, expr)?
>>
>> It might be a good idea to decide on a name for the construct before
>> the PHP 5.0.0 release in order to make it a r
On Mon, 12 Jul 2004, l0t3k wrote:
>
> "Andi Gutmans" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > How about default($var, expr)?
> my only reservation is that "default" is already part of a language
> construct :
...
> i'd say use defaultvalue
Too long IMO.
Derick
--
PHP
"Andi Gutmans" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> How about default($var, expr)?
my only reservation is that "default" is already part of a language
construct :
switch ($param = $_GET["param"]) {
case "foo" : bar(); break;
case "this" : that();
On Mon, 12 Jul 2004, Sebastian Bergmann wrote:
> Andi Gutmans wrote:
> > How about default($var, expr)?
>
> It might be a good idea to decide on a name for the construct before
> the PHP 5.0.0 release in order to make it a reserved word (marked for
> future use).
Agreed, and I also like def
Andi Gutmans wrote:
How about default($var, expr)?
It might be a good idea to decide on a name for the construct before
the PHP 5.0.0 release in order to make it a reserved word (marked for
future use).
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.d
AG> How about default($var, expr)?
I like it.
-Jason
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
How about default($var, expr)?
Andi
At 09:43 AM 7/11/2004 -0700, Rasmus Lerdorf wrote:
On Sun, 11 Jul 2004, Marcus Boerger wrote:
> $a = ifsetor($_GET['index'], $default);
ifsetor() sounds a bit cumbersome to me.
Some other suggestions:
$a = is($_GET['index'], $default);
$a = isor($_GET['
On Sun, 11 Jul 2004, Marc Richards wrote:
> Marc Richards wrote:
>
> > I don't think a function named param() really fits, but I do like the
> > idea of adding a type check (or in the case of PHP a type cast) to the
> > function.
> >
> >
> > $level = (int) (isset($_SESSION['level']) ? $_SESSION['l
Marc Richards wrote:
I don't think a function named param() really fits, but I do like the
idea of adding a type check (or in the case of PHP a type cast) to the
function.
$level = (int) (isset($_SESSION['level']) ? $_SESSION['level'] :
(isset($_REQUEST['level']) ? $_REQUEST['level'] : 1))
bec
Sean Coates wrote:
Not meaning to add more confusion, but Coldfusion (yes yes, please keep
laughter to a minimum) has had a similar function since the beginning
(IIRC).
it's
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-b13.htm
Perhaps a php function "param(...)" ? Even though it'
* Thus wrote Rasmus Lerdorf:
> On Sun, 11 Jul 2004, Marcus Boerger wrote:
>
> > $a = ifsetor($_GET['index'], $default);
>
> ifsetor() sounds a bit cumbersome to me.
>
> ...
>
> $a = value($_GET['index'], $default);
I like value() although it might be a bit too generic, maybe add
a word t
On Sun, 11 Jul 2004 09:43:51 -0700 (PDT), Rasmus Lerdorf <[EMAIL PROTECTED]> wrote:
> On Sun, 11 Jul 2004, Marcus Boerger wrote:
>
> > $a = ifsetor($_GET['index'], $default);
>
> ifsetor() sounds a bit cumbersome to me.
>
> Some other suggestions:
>
> $a = is($_GET['index'], $default);
>
Not meaning to add more confusion, but Coldfusion (yes yes, please keep
laughter to a minimum) has had a similar function since the beginning
(IIRC).
it's
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-b13.htm
Perhaps a php function "param(...)" ? Even though it's not always a
req
Ilya Sher wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
firstset() is most logical name (at least for me)
|
The problem with firstset() is that it doesn't make as much sense if we
are only testing one variable...but that is still to be determined.
Marc
--
PHP Internals - PHP Runtime Devel
On Sun, 11 Jul 2004, Marcus Boerger wrote:
> $a = ifsetor($_GET['index'], $default);
ifsetor() sounds a bit cumbersome to me.
Some other suggestions:
$a = is($_GET['index'], $default);
$a = isor($_GET['index'], $default);
$a = valid($_GET['index'], $default);
$a = value($_G
Hello Marc,
Sunday, July 11, 2004, 4:49:57 AM, you wrote:
> Ok, so let me try to do a little summary.
> If and When
> ---
> 1) There seems to be a general consensus that this feature should be
> implemented in SOME way.
> 2) It was too late for 5.0.0 so it will be targeted for 5.1
>
--- Marc Richards <[EMAIL PROTECTED]> wrote:
> 3) So this leaves a function call which begs two questions:
> What do we call it,
[snip]
> These include: ifset(), ifelse(), ifexists() and
[snip]
> nvl(), ifnull() and coalesce() have been proposed because of
> This currently leaves us with a hand ful
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Marc Richards wrote:
| Ok, so let me try to do a little summary.
|
|
| If and When
| ---
| 1) There seems to be a general consensus that this feature should be
| implemented in SOME way.
| 2) It was too late for 5.0.0 so it will be targeted for
35 matches
Mail list logo