|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16658 substr seems to alter the script when used on large strings
Submitted: 2002-04-17 08:42 UTC Modified: 2002-04-17 08:51 UTC
From: druid at evectors dot it Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.2.0 OS: Linux 2.2.20
Private report: No CVE-ID: None
 [2002-04-17 08:42 UTC] druid at evectors dot 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:


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

  print $finalpage;

this works, but is not so elegant.
Hope you can solve this :)

Best regards
             Daniele Duca, Evectors srl


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-17 08:51 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 10:01:29 2024 UTC