Re: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-08 Thread Steph Fox
Hi Matthias, Let alone __php__. If you just put all of your code into namespace Mylib, you're not safe because according to the name resolution rules, internal classes come after imported ones but before trying to find classes in the current namespace. I'd missed that :-( and from what I

Re: AW: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-08 Thread Gregory Beaver
Matthias Pigulla wrote: Von: Gregory Beaver [mailto:[EMAIL PROTECTED] Exactly - which is why you should never put classes, functions or constants in the __php__ namespace. The convention I am proposing is to only use __php__ for code that *uses* re-usable components, not *declares* them.

RE: [PHP-DEV] Garbage collector patch

2007-12-08 Thread Andi Gutmans
Hi Ilia, I suggest more people test the performance difference because as you can see for us it was negligible. From my experience you see bigger deviations just by moving kernels, compilers, and even small patches which affect where in memory the code segments sit, etc... Maybe some people here

[PHP-DEV] Test case for bug #43495

2007-12-08 Thread Christian Hoffmann
Heya, I wondered why bug #43495 [1] (array_merge_recursive crash with recursive arrays) was fixed without committing a test case -- the bug reporter even supplied a very simple reproduce code. As such, I'm submitting a small test case [2] (more or less the reproduce code from the bug report) in

Re: [PHP-DEV] Namespace

2007-12-08 Thread Richard Quadling
On 07/12/2007, Lokrain [EMAIL PROTECTED] wrote: Hello all, I just wanted to drop an opp. Just to see the logic, when we have programming structure class, interface, function, if statement, switch statement etc, we have bracers encapsulation. This is the logic that most programming language

Re: [PHP-DEV] PHP 5.3 bug or changed feature??

2007-12-08 Thread Marco Kaiser
Hi Frank, please open a bugreport about this issue. This would start the internal process of verifying this. -- Marco On Dec 7, 2007 11:09 PM, Frank M. Kromann [EMAIL PROTECTED] wrote: Hello Everyon, Casting a SimpleXML object to an array gives different results in PHP 5.2.5 and PHP

Re: [PHP-DEV] Test case for bug #43495

2007-12-08 Thread Antony Dovgal
On 08.12.2007 23:12, Christian Hoffmann wrote: Heya, I wondered why bug #43495 [1] (array_merge_recursive crash with recursive arrays) was fixed without committing a test case http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/bug43495.phpt ?? -- the bug reporter even supplied

Re: [PHP-DEV] Test case for bug #43495

2007-12-08 Thread Christian Hoffmann
On 12/08/2007 09:18 PM, Antony Dovgal wrote: On 08.12.2007 23:12, Christian Hoffmann wrote: Heya, I wondered why bug #43495 [1] (array_merge_recursive crash with recursive arrays) was fixed without committing a test case

Re: [PHP-DEV] Garbage collector patch

2007-12-08 Thread Nathan Rixham
Sorry to intrude on this one! It seems that some real hard work has gone into this, and a big thanks from the community for all your hard work. Can the gc patch feasibly be improved any more? If so surely the time scales involved with improving further would mean it'd miss the boat for a

Re: [PHP-DEV] Namespace

2007-12-08 Thread Sam Barrow
Once you say namespace xyz ; everything in the file is now relative to namespace xyz. To refer to the global namespace, you use the following ?php namespace xyz ; function substr() { return true ; } substr(); // calls substr in current namespace ::substr(); // calls substr in global

[PHP-DEV] Type hinting

2007-12-08 Thread Sam Barrow
A few weeks ago I wrote a message on this list about my patch for scalar type hinting. I've been using it for about a month now in a large scale application im developing with no problems. It allows type hinting for the following types: int, float, string, bool (boolean), num (int or float),

RE: [PHP-DEV] Namespace

2007-12-08 Thread scott.mcnaught
Quick question... If I wanted to override or extend php's functions... Could this work? Say I want to change the implementation of var_dump() to make it more html friendly... function var_dump($mixedVariable) { echo('pre'); ::var_dump($mixedVariable); echo('/pre'); }

Re: [PHP-DEV] Thoughts on Feature Request - Arithmetic

2007-12-08 Thread Lokrain
The solution is already in pear : http://pear.php.net/package/Math_RPN

[PHP-DEV] faster public domain MD5 implementation

2007-12-08 Thread Solar Designer
Hi, Attached is a quick patch for PHP 5.2.5 that replaces RSA's copyrighted implementation of MD5 with my public domain one: http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/ This also results in faster and slightly smaller code (both source and binary). On a

Re: AW: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-08 Thread Jessie Hernandez
Hi Greg, How about this: any non-namespaced file that uses use statements is implicitly put into the __php__ namespace (or whatever other name is chosen, or having the namespace name be the path of the file)? With this, use will never import any symbols into the global namespace. Regards,

Re: AW: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-08 Thread Gregory Beaver
Jessie Hernandez wrote: Hi Greg, How about this: any non-namespaced file that uses use statements is implicitly put into the __php__ namespace (or whatever other name is chosen, or having the namespace name be the path of the file)? With this, use will never import any symbols into the