On Fri, Aug 15, 2003 at 11:36:00AM +0200, Thies C. Arntzen wrote:
> On Fri, Aug 15, 2003 at 07:41:48AM +0800, Alan Knowles wrote:
> > I hit this a couple of months ago.. trying to implement NULL
> > support in dataobjects:
> >
> > $do = DB_DataObject::factory('test');
> > $do->get(12);
> > $do->bi
On Thu, 2003-08-14 at 19:27, Zeev Suraski wrote:
> At 21:15 14/08/2003, walt boring wrote:
>
> The way PHP treats null value is identical to that of non existent values,
> which is precisely why isset() behaves the way that it does. I'm not sure
> what the logic is behind Ilia's alternatives, t
PHP 4 Bug Database summary - http://bugs.php.net
Num Status Summary (776 total including feature requests)
===[*General Issues]==
25048 Feedback Can't load dll
25079 Feedback with php, page is cut off and not fully loaded. take php
"Stefan Walk" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> class Foo {
> function dump() {
> var_dump(array_key_exists('bar', (array)$this));
> }
> }
> $foo = new Foo;
> $foo->bar = null;
> $foo->dump();
> // => bool(true)
>
> It's not that hard to detect.
IMHO, array_k
"Robert Cummings" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> So it seems to me that a null value does not define the non-existence of
> a value, but is itself actually a value. And this as far as I am
> concerned is quite valid.
Shure. That's one more reason for variable_exis
oooh,
here is easy sollution for global vars :
However there is no $LOCALS in the local scope.
Andrey
- Original Message -
From: "Cristiano Duarte" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 16, 2003 7:26 PM
Subject: Re: [PHP-DEV] variable_exists() patch
> "St
Help translating the manual to dutch.
phpdoc-nl
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On Sat, Aug 16, 2003 at 07:30:27PM +0300, Andrey Hristov wrote:
> However there is no $LOCALS in the local scope.
There is, sort of: http://www.php.net/get_defined_vars
--
Regards,
Stefan Walk
<[EMAIL PROTECTED]>
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: htt
At 16:53 16/08/2003, Robert Cummings wrote:
So it seems to me that a null value does not define the non-existence of
a value, but is itself actually a value. And this as far as I am
concerned is quite valid.
Ok, but it still doesn't change the fact that null is not a value :) The
fact we couldn't
On Sat, 2003-08-16 at 14:41, Zeev Suraski wrote:
> At 16:53 16/08/2003, Robert Cummings wrote:
> >So it seems to me that a null value does not define the non-existence of
> >a value, but is itself actually a value. And this as far as I am
> >concerned is quite valid.
>
> Ok, but it still doesn't c
On Sat, Aug 16, 2003 at 02:42:17PM -0700, Lars Torben Wilson wrote:
> But the change would make it more consistent, by recognizing that a
> variable with a NULL value is still defined. Pretending that $foo =
> null and unset($foo) are the same thing is quite inconsistent and
> confusing for many, w
Yes, pretending that it is currently consistent is the problem I think.
By introducing the new function we solve the inconsistency. True there
are ways around this, such as get_defined_vars(). Interestingly, yet
another inconsistency is that get_defined_vars() also returns a variable
with a null va
Actually they are not the same, as this code illistrates:
$foo = array( 1, 2, 3, 4, 5 );
unset( $foo[1] );
foreach( $foo as $key => $value )
{
echo $foo.' -> '.$value."\n";
}
Output:
0 -> 1
2 -> 3
3 -> 4
4 -> 5
in contrast to:
$foo = array( 1, 2, 3, 4, 5 );
$foo[2] = null;
foreach( $foo
On Sat, Aug 16, 2003 at 06:06:41PM -0400, Robert Cummings wrote:
> As you can see the entry is not null, it is completely missing.
You should use var_dump instead of print_r.
--
Regards,
Stefan Walk
<[EMAIL PROTECTED]>
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, vis
Oh, you meant the first output, nevermind. I /know/ unset() and setting
something null is not the same - as probably everyone on this list.
As to your "Is not the same" argument:
Doing something in PHP is of course slower as a language feature. But
that's normal. Do you want to have a native funct
Understandably PHP is slower than say C :) Generally I don't think there
is need for everything to be a native function, however, that said, when
the speed gain and utility are great in comparison to doing it as pure
PHP then I think the option should be investigated. The current isset()
function f
> A few weeks ago I submitted a patch in the bug db for a
> variable_exists() construct, which parallels the function_exists()
> one but for variables. In short, it returns TRUE if a variable
> exists, regardless of its value. In other words, it's an isset()
> which doesn't care if the variable's v
Robert Cummings wrote:
> Understandably PHP is slower than say C :) Generally I don't think there
> is need for everything to be a native function, however, that said, when
> the speed gain and utility are great in comparison to doing it as pure
> PHP then I think the option should be investigate
On Sat, 2003-08-16 at 18:28, Robert Cummings wrote:
>
> PHP then I think the option should be investigated. The current isset()
> function fails many developers from what I can see, and I know I've
> experienced this problem before, and so I think a more appropriate
Aaaah, I was just documenting s
The attached patch changes dl() so that, instead of outright refusing to
run under safe mode, it performs additional security checks on the value
of extension_dir and accepts a filename-only argument (no directories)
from the caller. In addition, if the provided argument doesn't return a
handle, d
20 matches
Mail list logo