php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22533 problem with strtr(), 100% of CPU use
Submitted: 2003-03-04 05:38 UTC Modified: 2003-03-04 05:54 UTC
From: andre at softexpert dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.2.3 OS: W2k
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: andre at softexpert dot com
New email:
PHP Version: OS:

 

 [2003-03-04 05:38 UTC] 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"));

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-04 05:54 UTC] moriyoshi@php.net
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.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Dec 01 12:00:01 2025 UTC