ID:               22533
 Comment by:       xuefer at 21cn dot com
 Reported By:      andre at softexpert dot com
 Status:           Bogus
 Bug Type:         Reproducible crash
 Operating System: W2k
 PHP Version:      4.2.3
 New Comment:

i'd say this is a bug, why not?
do u mean, in a vhost, every user can easily take up 100 server cpu
usage by such simple script? and script never end(maybe in linux, it
will timeout, i've not tested)

and do u mean, the beginners(even advanced programmer) will possibly
get 100% cpu usage when they mistype a variable:
echo strtr("123123", array($from => $to));
while $from is not defined, it become null, and will be converted into
(string) ""


Previous Comments:
------------------------------------------------------------------------

[2003-03-04 05:54:13] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Don't pass to strtr a null string as that to be replaced.

------------------------------------------------------------------------

[2003-03-04 05:38:42] andre at softexpert dot com

When using strtr() passing a number as first parameter, and an array
that contains ("" => "anything"), php.exe uses 100% of CPU and stays
running until IIS return a CGI Time limit.

Example:
echo strtr(10, array("" => "a"));

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22533&edit=1

Reply via email to