Bug #16658 Updated: substr seems to alter the script when used on large strings

From: Date: Wed, 17 Apr 2002 12:51:01 +0000
Subject: Bug #16658 Updated: substr seems to alter the script when used on large strings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-5191@lists.php.net to get a copy of this message
ID: 16658 Updated by: cynic@php.net Reported By: druid@evectors.it -Status: Open +Status: Bogus Bug Type: Strings related Operating System: Linux 2.2.20 PHP Version: 4.2.0 New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Previous Comments: ------------------------------------------------------------------------ [2002-04-17 08:42:17] druid@evectors.it Here is my first bug report ever, so please don't be so rude if I forgot something or reported something already known :) When I first use the function substr() to extract the first chars from the beginning of a large string (around 50 kb) that is a HTML page and when I print the whole string the script seems to stop. In example, I have a script that has basically this calls: printpage(); debuginfo(); Into printpage() is located the substr(); substr() is conditioned by an "if" condition, so is not used every time; if it is used then debuginfo() is not called or prints only few lines of debug, depending of the size of the string that was "substr()ed". My personal workaround is like $debugstr=debuginfo(); $htmlpage=printpage(); $finalpage=$htmlpage.$debugstr; print $finalpage; this works, but is not so elegant. Hope you can solve this :) Best regards Daniele Duca, Evectors srl ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16658&edit=1

« previous php.bugs (#5191) next »