Re: [PHP-DEV] file streams metadata

2011-03-14 Thread Stas Malyshev
Hi! Here's an RFC: http://wiki.php.net/rfc/streammetadata Patch link inside. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] preg_replace does not replace all occurrences

2011-03-14 Thread Martin Scotta
I chose the simplest example to show the preg_replace behavior, there are better (and safer) ways to scape slash characters. Anyways, *is this the expected preg_replace behavior?* Martin ?php function test($str) { static $re = '/(^|[^])\'/'; static $change = '$1\\\''; echo

Re: [PHP-DEV] preg_replace does not replace all occurrences

2011-03-14 Thread Richard Quadling
On 14 March 2011 15:18, Martin Scotta martinsco...@gmail.com wrote: ?php function test($str) {    static $re = '/(^|[^])\'/';    static $change = '$1\\\'';    echo $str, PHP_EOL,        preg_replace($re, $change, $str), PHP_EOL, PHP_EOL; } test(str '' str); // bug? test(str \\'\\'

Re: [PHP-DEV] native php annotations

2011-03-14 Thread guilhermebla...@gmail.com
Hi all, I promise myself to not revamp this discussion again, but it wasn't me this time! @Etienne: That RFC is outdated. Since the last feedback form internals list, a lot of changes have been made to that RFC. Maybe I should update it ASAP so you can clearly understand what have changed to be

Re: [PHP-DEV] preg_replace does not replace all occurrences

2011-03-14 Thread Ben Schmidt
On 15/03/11 2:18 AM, Martin Scotta wrote: I chose the simplest example to show the preg_replace behavior, You've GOT to be kidding. The SIMPLEST?! How about an example that doesn't require escaping ALL the interesting characters involved? Here's a modified version that I think it quite a bit

Re: [PHP-DEV] preg_replace does not replace all occurrences

2011-03-14 Thread Ben Schmidt
On 15/03/11 5:38 AM, Ben Schmidt wrote: On 15/03/11 2:18 AM, Martin Scotta wrote: I chose the simplest example to show the preg_replace behavior, You've GOT to be kidding. The SIMPLEST?! How about an example that doesn't require escaping ALL the interesting characters involved? Here's a

Re: [PHP-DEV] native php annotations

2011-03-14 Thread Marcelo Gornstein
The presented patch is just a quick and dirty work that I could put together in 2 days, with knowledge of the zend engine. Thanks to some tips from Pierrick, I'm slowly improving its quality. However my ideal goals are pretty close to what you have done in your rfc. Today Pierrick added the

Re: [PHP-DEV] preg_replace does not replace all occurrences

2011-03-14 Thread Hannes Landeholm
What is more likely to be wrong? Your understanding of a specific regex pattern (which happens to be full of escapes making it incredibly hard to read) or the implementation of preg_replace? ~Hannes On 14 March 2011 16:18, Martin Scotta martinsco...@gmail.com wrote: I chose the simplest

Re: [PHP-DEV] SplFileObject Countable

2011-03-14 Thread Sebastian Marek
Hello, That makes perfect sense. I have raised a feature request and have attached a patch containing both countLines() method implementation and phpt tests. thx On Sun, Mar 13, 2011 at 9:39 PM, Etienne Kneuss col...@php.net wrote: On Mar 11 23:22:04, Sebastian Marek wrote: Hi, I have