#22433 [Opn->Csd]: range returns nothing

From: Date: Fri, 02 May 2003 01:07:43 +0000
Subject: #22433 [Opn->Csd]: range returns nothing
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38915@lists.php.net to get a copy of this message
ID: 22433 Updated by: pollita@php.net Reported By: sergey at sociology dot kharkov dot ua -Status: Open +Status: Closed Bug Type: Arrays related Operating System: all PHP Version: 4.3.1 New Comment: This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Perhaps it helps to note that: ord('ÿ') == 255 What's happening is that the for loop which creates the range array is rolling over back to 0 on the last step, and since 0 is in fact less than 255, it keeps going... and going... and going... Anyway, it should be fixed now, including the opposite version of this bug { range('a',chr(0)); } Previous Comments: ------------------------------------------------------------------------ [2003-04-26 00:35:59] philip@php.net So what's the problem here? I do this: error_reporting(E_ALL); var_dump( range('à','ÿ') ); print 'hi'; and get no output at all, no segfault either. Doesn't sound like a documentation problem and if it is please say why and reclassify again... ------------------------------------------------------------------------ [2003-03-02 04:19:38] victor@php.net This particular example can not be found in function.range.html afaik. I think it's a bug in PHP since it crashes. We _could_ mention this in the manual, but I think it's better to fix it (i.e. move it to 'Reproducible crash' or similar) Connecting to my.private.site[192.168.0.1]:80... connected. HTTP request sent, awaiting response... 10:16:18 ERROR -1: No data received. ------------------------------------------------------------------------ [2003-02-26 10:40:28] sniper@php.net reclassified.. ------------------------------------------------------------------------ [2003-02-26 07:43:17] sergey at sociology dot kharkov dot ua I have found a bug on page function.range.html [chm date: 2002-12-27]... Server hand-ups when I use russian letters: foreach(range('à','ÿ') as $letter) { echo $letter; } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22433&edit=1

« previous php.bugs (#38915) next »