[PHP-DEV] New function proposal: spl_object_id

2008-12-17 Thread Guilherme Blanco
Hi, I spoke with some devs yesterday about spl_object_hash performance and alternatives to solve it. Seems that md5 applied inside it is the responsable for that. After some tips from Lars, we came with a patch (at the bottom of this email). The new proposed function is already being used in

RE: [PHP-DEV] New function proposal: spl_object_id

2008-12-17 Thread Andi Gutmans
Shouldn't you be using RETURN_STRINGL with length and dup=0? Andi -Original Message- From: Guilherme Blanco [mailto:guilhermebla...@gmail.com] Sent: Wednesday, December 17, 2008 9:31 AM To: internals Mailing List Subject: [PHP-DEV] New function proposal: spl_object_id Hi, I

Re: [PHP-DEV] New function proposal: spl_object_id

2008-12-17 Thread Etienne Kneuss
Hello, On Wed, Dec 17, 2008 at 7:29 PM, Lars Strojny l...@strojny.net wrote: Hi Guilherme, thanks for moving the discussion to the list. Am Mittwoch, den 17.12.2008, 15:31 -0200 schrieb Guilherme Blanco: [...] It seems that Marcus controls the commit access to SPL. So I'm turning the

[PHP-DEV] Is Empty functionality to the Directory Functions

2008-12-17 Thread Ólafur Waage
This is my 1st suggestion to the internals :) Anywho, there has been some discussion in the is_dir() comments on php.net (http://is.php.net/manual/en/function.is-dir.php) about a function that returns bool if a directory is empty or not. Just throwing it out there if it should be implemented to

Re: [PHP-DEV] New function proposal: spl_object_id

2008-12-17 Thread Lars Strojny
Hi Andi, Am Mittwoch, den 17.12.2008, 10:33 -0800 schrieb Andi Gutmans: Shouldn't you be using RETURN_STRINGL with length and dup=0? Yes, the more recent implementation does exactly that :) cu, Lars signature.asc Description: Dies ist ein digital signierter Nachrichtenteil

Re: [PHP-DEV] problem with include_path and write-based file functions

2008-12-17 Thread Lukas Kahwe Smith
On 10.12.2008, at 19:33, Daniel Convissor wrote: Hi: On Tue, Dec 09, 2008 at 01:50:21PM -0600, Gregory Beaver wrote: I think allowing include_path to be used at all for file modification is horrendous, and think it should be deprecated and removed from PHP 6. I agree. To avoid

Re: [PHP-DEV] New function proposal: spl_object_id

2008-12-17 Thread Lars Strojny
Hi Guilherme, thanks for moving the discussion to the list. Am Mittwoch, den 17.12.2008, 15:31 -0200 schrieb Guilherme Blanco: [...] It seems that Marcus controls the commit access to SPL. So I'm turning the conversation async, since I cannot find him online at IRC. So, can anyone review the

Re: [PHP-DEV] json_encode()

2008-12-17 Thread Scott MacVicar
Richard Quadling wrote: 2008/12/16 Robin Burchell virot...@viroteck.net: Settings which change behaviour like that aren't really all that fun for third party/portable applications developers, e.g. forum software and the likes. magic_quotes_gpc and others are good examples of this. Going back

Re: [PHP-DEV] json_encode()

2008-12-17 Thread Richard Quadling
2008/12/16 Robin Burchell virot...@viroteck.net: Settings which change behaviour like that aren't really all that fun for third party/portable applications developers, e.g. forum software and the likes. magic_quotes_gpc and others are good examples of this. Going back to Rasmus' mail based on

Re: [PHP-DEV] json_encode()

2008-12-17 Thread Alexey Zakhlestin
On Wed, Dec 17, 2008 at 1:05 PM, Richard Quadling rquadl...@googlemail.com wrote: Considering json_encode() COULD encode non JSON compliant data, should json_decode() also decode non JSON compliant data? it should decode as much as it can without any warnings (as long, as there's no ambiguity)

Re: [PHP-DEV] New function proposal: spl_object_id

2008-12-17 Thread Marcus Boerger
Hello Etienne, Wednesday, December 17, 2008, 7:59:01 PM, you wrote: Hello, On Wed, Dec 17, 2008 at 7:29 PM, Lars Strojny l...@strojny.net wrote: Hi Guilherme, thanks for moving the discussion to the list. Am Mittwoch, den 17.12.2008, 15:31 -0200 schrieb Guilherme Blanco: [...] It seems

Re: [PHP-DEV] problem with include_path and write-based file functions

2008-12-17 Thread Hannes Magnusson
On Wed, Dec 17, 2008 at 21:02, Lukas Kahwe Smith m...@pooteeweet.org wrote: which brings us back to the fact that we never added a proper way to be able to determine if a file exists in the include path or not. this is why a lot That is simply not true. stream_resolve_include_path() is

Re: [PHP-DEV] problem with include_path and write-based file functions

2008-12-17 Thread Lukas Kahwe Smith
On 17.12.2008, at 22:24, Hannes Magnusson wrote: On Wed, Dec 17, 2008 at 21:02, Lukas Kahwe Smith m...@pooteeweet.org wrote: which brings us back to the fact that we never added a proper way to be able to determine if a file exists in the include path or not. this is why a lot That is

Re: [PHP-DEV] problem with include_path and write-based file functions

2008-12-17 Thread Hannes Magnusson
On Wed, Dec 17, 2008 at 22:30, Lukas Kahwe Smith m...@pooteeweet.org wrote: On 17.12.2008, at 22:24, Hannes Magnusson wrote: On Wed, Dec 17, 2008 at 21:02, Lukas Kahwe Smith m...@pooteeweet.org wrote: which brings us back to the fact that we never added a proper way to be able to

Re: [PHP-DEV] problem with include_path and write-based file functions

2008-12-17 Thread Lukas Kahwe Smith
On 09.12.2008, at 20:50, Gregory Beaver wrote: file, it should only be used to find existing files. In any case, I think allowing include_path to be used at all for file modification is horrendous, and think it should be deprecated and removed from PHP 6. We should simply add

Re: [PHP-DEV] Is Empty functionality to the Directory Functions

2008-12-17 Thread Cristian Rodríguez
Ólafur Waage escribió: $dir = dir(/foo/bar); var_dump($dir-empty()); // bool(true) Use SplDirectoryIterator instead. -- We have art in order not to die of the truth - Friedrich Nietzsche Cristian Rodríguez R. Platform/OpenSUSE - Core Services SUSE LINUX Products GmbH Research Development

[PHP-DEV] Q on Primitives

2008-12-17 Thread Nathan Rixham
Don't want to take up much of you're time, just wondered if anybody could point me to the reason why some primitives aren't in php. Would find it very very useful to have byte, short, long, float, double and char in php. (primarily byte and char). while I'm here I may as well also ask about

Re: [PHP-DEV] Q on Primitives

2008-12-17 Thread Graham Kelly
Hi, I think the reason there aren't more primitive types in PHP is because of the nature of the language. One of the main features of PHP over say, C (and even Java), is that the memory managment is completely transparent to the devloper. This means that it really shouldent matter to the devloper

Re: [PHP-DEV] Q on Primitives

2008-12-17 Thread Nathan Rixham
Graham Kelly wrote: Hi, I think the reason there aren't more primitive types in PHP is because of the nature of the language. One of the main features of PHP over say, C (and even Java), is that the memory managment is completely transparent to the devloper. This means that it really shouldent

[PHP-DEV] simpler syntax for arrays

2008-12-17 Thread jay
hi guys. i'm very new to your list so maybe something similar to my proposal has been already posted somewhere at this list but really i don't know how i can make the search. i often pass arrays to functions/methods this way: myfunc(array('key1'='val1', 'key2'='val2', ...)); it's really annoying

Re: [PHP-DEV] simpler syntax for arrays

2008-12-17 Thread Jeff Griffiths
On 12/17/08 4:29 PM, jay wrote: hi guys. i'm very new to your list so maybe something similar to my proposal has been already posted somewhere at this list but really i don't know how i can make the search. i often pass arrays to functions/methods this way: myfunc(array('key1'='val1',

Re: [PHP-DEV] Is Empty functionality to the Directory Functions

2008-12-17 Thread Ólafur Waage
Yes the SPL directory listing has more functionality but not the one i am talking about. It's not something crucial but useful while iterating through directories. Oh and I should to sit down over the holidays and write examples for the SPL Directory functions and send over to the documentation

Re: [PHP-DEV] Is Empty functionality to the Directory Functions

2008-12-17 Thread Philip Olson
Oh and I should to sit down over the holidays and write examples for the SPL Directory functions and send over to the documentation team. The email address for that task is php...@lists.php.net :) Regards, Philip -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] simpler syntax for arrays

2008-12-17 Thread jay
On Wed, 2008-12-17 at 16:37 -0800, Jeff Griffiths wrote: On 12/17/08 4:29 PM, jay wrote: hi guys. i'm very new to your list so maybe something similar to my proposal has been already posted somewhere at this list but really i don't know how i can make the search. i often pass arrays to

Re: [PHP-DEV] simpler syntax for arrays

2008-12-17 Thread Lars Strojny
Hi Jay, Am Donnerstag, den 18.12.2008, 03:18 +0200 schrieb jay: [...] okey. another syntax: myfunc($('key1'='val1', 'key2'='val2', ...)); this can be implemented just as a shortcut for the array keyword. i think it won't be very hard to extend syntax for the dollar sign. my idea is to

Re: [PHP-DEV] simpler syntax for arrays

2008-12-17 Thread jay
On Thu, 2008-12-18 at 02:26 +0100, Lars Strojny wrote: Hi Jay, Am Donnerstag, den 18.12.2008, 03:18 +0200 schrieb jay: [...] okey. another syntax: myfunc($('key1'='val1', 'key2'='val2', ...)); this can be implemented just as a shortcut for the array keyword. i think it won't be

Re: [PHP-DEV] 5.3 compile time still depends on runtime constants (Default value for parameters with a class type hint can only be NULL)

2008-12-17 Thread phpxcache
sorry, forgot to reply to all http://bugs.php.net/bug.php?id=46850 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php