Re: [PHP-DEV] Directoryiterator / preg_match behavior

2004-09-08 Thread Andi Gutmans
Thanks. I merged it into 5.0.x At 02:35 AM 9/9/2004 +, Curt Zirzow wrote: * Thus wrote Andi Gutmans: > Can you please try again (HEAD)? > Let me know if it's OK and I'll merge to PHP_5_0 Works good now. Passes the attached test now. Curt -- First, let me assure you that this is not one of thos

Re: [PHP-DEV] Directoryiterator / preg_match behavior

2004-09-08 Thread Curt Zirzow
* Thus wrote Andi Gutmans: > Can you please try again (HEAD)? > Let me know if it's OK and I'll merge to PHP_5_0 Works good now. Passes the attached test now. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is

Re: [PHP-DEV] Directoryiterator / preg_match behavior

2004-09-08 Thread Andi Gutmans
Can you please try again (HEAD)? Let me know if it's OK and I'll merge to PHP_5_0 Andi At 05:51 PM 9/5/2004 +, Curt Zirzow wrote: * Thus wrote Andi Gutmans: > At 03:46 AM 9/4/2004 +, Curt Zirzow wrote: > > > >What are the possibilities of thrown E_STRICT or E_WARNING, since > >the object ge

Re: [PHP-DEV] Directoryiterator / preg_match behavior

2004-09-05 Thread Curt Zirzow
* Thus wrote Andi Gutmans: > At 03:46 AM 9/4/2004 +, Curt Zirzow wrote: > > > >What are the possibilities of thrown E_STRICT or E_WARNING, since > >the object gets lost? Or should this simply be a documented > >behaviour? If possible, any pointers where to consider applying them > >at? > > Di

Re: [PHP-DEV] Directoryiterator / preg_match behavior

2004-09-04 Thread Andi Gutmans
At 03:46 AM 9/4/2004 +, Curt Zirzow wrote: * Thus wrote Andi Gutmans: > It probably makes sense to add SEPARATE_ZVAL_IF_NOT_REF() to that code. > This would provide the same behavior as for example for long's. > Can you please check out the following patch? Nice! That fixed the $file holding th

Re: [PHP-DEV] Directoryiterator / preg_match behavior

2004-09-03 Thread Curt Zirzow
* Thus wrote Andi Gutmans: > It probably makes sense to add SEPARATE_ZVAL_IF_NOT_REF() to that code. > This would provide the same behavior as for example for long's. > Can you please check out the following patch? Nice! That fixed the $file holding the value between iterations Test 1: ($file no

Re: [PHP-DEV] Directoryiterator / preg_match behavior

2004-09-03 Thread Andi Gutmans
It probably makes sense to add SEPARATE_ZVAL_IF_NOT_REF() to that code. This would provide the same behavior as for example for long's. Can you please check out the following patch? Index: zend_API.c === RCS file: /repository/ZendEng

Re: [PHP-DEV] Directoryiterator / preg_match behavior

2004-09-02 Thread Andrei Zmievski
On Thu, 02 Sep 2004, Curt Zirzow wrote: > Test 1: ($file holds last type conversion) > foreach (new DirectoryIterator('.') as $file) { > echo "\n--\n"; > var_dump($file); > preg_match("/xxx/", $file); > var_dump($file); > echo "\n--"; > } > > Output: > Object(DirectoryIterator

Re: [PHP-DEV] Directoryiterator / preg_match behavior

2004-09-01 Thread Curt Zirzow
* Thus wrote Aaron Wormus: > > foreach (new DirectoryIterator('.') as $file) { > echo ""; > var_dump($file); > > if (preg_match("/xxx/", $file)){ > // Why is this breaking $file?? > //without even a warning > } > > var_dump($file); > echo ""; > } This

[PHP-DEV] Directoryiterator / preg_match behavior

2004-09-01 Thread Aaron Wormus
When playing with PHP5 I tried the following code: foreach (new DirectoryIterator('.') as $file) { if (preg_match("/^\./", $file)){ continue; } print "$file\n"; } the result was unexpected, but after an IRC session and reading the manual all became clear. My question is if the