Hi!
Does somebody know how big strings i can use in str_replace?
mixed str_replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] )
how big can be the $search string and how big can be the $replace string?
E: and $subject also
| SitePoint Sponsor |
Hi!
Does somebody know how big strings i can use in str_replace?
mixed str_replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] )
how big can be the $search string and how big can be the $replace string?
E: and $subject also
tnx for quick replay.
I have problem in system what i'm developing. it is old and big and![]()
the system stops in a certain place always.
and on that place there is the row:
$XML = str_replace($file, $this->$func($file), $XML);
where the sizes are following: 78084 / 0 / 84808 as strlen() is giving.
Can it be, that the sizes are too big for checking and memory will get over?
Or any other suggestion why it stops in that certain row?
strlen for file gives: 78084
strlen for $XML gives: 84808
unfortunatly its not my code but i have to fix it
Long time ago i was thinking the problem was about memory using. but now when system has 128MB to use and it is using around 14MB before that line, then i do not think so.


Your host (or your own configuration) may be limiting the amount of memory PHP can use no matter how much your server has. You can check phpinfo() or view your php.ini file.
PHP Shopping Cart Software Easy Ecommerce Shopping Cart Script.
PHP Super Cart is 100% template driven.
ok. Found that the problem is not in str_replace but preg_replace.
tnx, for helping. topic closed.
Have to fint now solution, why preg_replace is not working![]()
Bookmarks