Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12539 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39684 invoked by uid 1010); 2 Sep 2004 04:03:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 37770 invoked from network); 2 Sep 2004 04:03:40 -0000 Received: from unknown (HELO took.shire) (68.122.184.4) by pb1.pair.com with SMTP; 2 Sep 2004 04:03:40 -0000 Received: (qmail 90566 invoked by uid 1001); 2 Sep 2004 04:24:11 -0000 Date: Thu, 2 Sep 2004 04:24:11 +0000 To: internals@lists.php.net Message-ID: <20040902042411.GC3977@bagend.shire> Mail-Followup-To: internals@lists.php.net References: <41366A46.60502@wormus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41366A46.60502@wormus.com> User-Agent: Mutt/1.4.1i Subject: Re: [PHP-DEV] Directoryiterator / preg_match behavior From: curt@php.net (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 probably needs some attention, here are some related issues that I've came accross trying to find out why the above was happening: Test 1: ($file holds last type conversion)