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

From: Date: Fri, 02 May 2003 10:05:20 +0000
Subject: #22433 [Ver->Csd]: range returns nothing
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38935@lists.php.net to get a copy of this message
ID: 22433 Updated by: sniper@php.net Reported By: sergey at sociology dot kharkov dot ua -Status: Verified +Status: Closed Bug Type: Arrays related Operating System: all PHP Version: 4.3.2-RC3-dev New Comment: It is fixed in CVS indeed. Previous Comments: ------------------------------------------------------------------------ [2003-05-01 20:10:48] sniper@php.net # php -r "var_dump( range('à','ÿ') );" Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) ------------------------------------------------------------------------ [2003-05-01 20:07:43] pollita@php.net 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)); } ------------------------------------------------------------------------ [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.. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/22433 -- Edit this bug report at http://bugs.php.net/?id=22433&edit=1

« previous php.bugs (#38935) next »