Re: [PHP-DEV] crashing due to get_properties handler

2006-01-29 Thread Andrei Zmievski
I've run into the same thing with PHP-GTK. While Zend engine itself may check for existence of handler, PHP code does not. -Andrei On Jan 27, 2006, at 8:47 AM, Rob Richards wrote: Is it required that the get_properties handler be implemented for an object? In the source there are places

Re: [PHP-DEV] Re: zend_hash.c fishy code

2006-01-29 Thread Andi Gutmans
Yep correct. We always prefer to also check p->h so that we minimize the chances for reaching the memcmp()... At 04:33 PM 1/29/2006, Sara Golemon wrote: I wonder If I am completely missing the point, but the following piece of code seems fishy to me: ZEND_API int zend_hash_del_key_or_index(Has

[PHP-DEV] Re: zend_hash.c fishy code

2006-01-29 Thread Sara Golemon
I wonder If I am completely missing the point, but the following piece of code seems fishy to me: ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLength, ulong h, int flag) { uint nIndex; Bucket *p; ... while (p != NULL) { i

Re: [PHP-DEV] PHP Array Literals

2006-01-29 Thread James Crane
Or could learn that [] creates arrays the same way that it is used to access and assign pieces of arrays. M.T. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] zend_hash.c fishy code

2006-01-29 Thread Stefan Esser
Good Morning, I wonder If I am completely missing the point, but the following piece of code seems fishy to me: ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLength, ulong h, int flag) { uint nIndex; Bucket *p; ... while (p != NULL)

Re: [PHP-DEV] PHP Array Literals

2006-01-29 Thread Jasper Bryant-Greene
Robert Deaton wrote: On 1/29/06, James Crane <[EMAIL PROTECTED]> wrote: Then why don't we have these: $i = integer(5); $f = float(4.5); $s = string("foo"); Perhaps because any sane person will know without reading a manual, that " delimits a string, a number without a decimal is an integer,

Re: [PHP-DEV] PHP Array Literals

2006-01-29 Thread Robert Deaton
On 1/29/06, James Crane <[EMAIL PROTECTED]> wrote: > Then why don't we have these: > > $i = integer(5); > $f = float(4.5); > $s = string("foo"); Perhaps because any sane person will know without reading a manual, that " delimits a string, a number without a decimal is an integer, and a number with

[PHP-DEV] CVS Account Request: komandir

2006-01-29 Thread Pawel Bak
Developing the PHP runtime Maintaining the documentation Translating the documentation -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP Array Literals

2006-01-29 Thread Derick Rethans
On Sun, 29 Jan 2006, James Crane wrote: > Of course, that woudln't make sense. We, instead, use appropriate syntax: > > class MyClass { > public function method($arguments) { >// method body here > } > } > > Suitable, logical, appropriate code. To me, 'array()' just seems on > the verge of

Re: [PHP-DEV] PHP Array Literals

2006-01-29 Thread Marcus Boerger
Hello James, you missed recently emerged $it = betty() here or did i get confused now? Sunday, January 29, 2006, 9:21:20 PM, you wrote: > Then why don't we have these: > $i = integer(5); > $f = float(4.5); > $s = string("foo"); > And what about classes? It's slightly different, what with it

Re: [PHP-DEV] PHP Array Literals

2006-01-29 Thread James Crane
Then why don't we have these: $i = integer(5); $f = float(4.5); $s = string("foo"); And what about classes? It's slightly different, what with it being a definition rather than a specific literal value, but it produces a definition, pseudo value if you will, so why not have: class("MyClass", arr

Re: [PHP-DEV] PHP Array Literals

2006-01-29 Thread Ted Dziuba
On 1/29/06, James Crane <[EMAIL PROTECTED]> wrote: > > No, it's definitely not that hard to write, but I have seeing > 'array()' everywhere when I know damn well that it's an array. > > Concerning the 'pass by reference' problems, I'm going to assume that > that's happening when you're working with

Re: [PHP-DEV] PHP Array Literals

2006-01-29 Thread James Crane
No, it's definitely not that hard to write, but I have seeing 'array()' everywhere when I know damn well that it's an array. Concerning the 'pass by reference' problems, I'm going to assume that that's happening when you're working with some of the functions already in PHP or someone else's code,

Re: [PHP-DEV] PHP Array Literals

2006-01-29 Thread Ted Dziuba
>My reasoning is that I want to be able to quickly, in a non-verbose, intuitive way, create inline arrays which I >do a lot of in my applications. Is it really that hard to do $x = array( "cat", "dog" "mouse")? I would say this is very concise and intuitive, as the "array" word in there suggests