php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26345 ord() crashes when passing '|' char
Submitted: 2003-11-21 05:02 UTC Modified: 2003-12-01 03:15 UTC
From: jaime dot lopez at iic dot uam dot es Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 4.3.2 OS: AIX
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
25 - 2 = ?
Subscribe to this entry?

 
 [2003-11-21 05:02 UTC] jaime dot lopez at iic dot uam dot es
Description:
------------
Apache process hangs out when calling ord() with reproducible arguments.



Reproduce code:
---------------
function isalpha( $char )
{
  return( (ord($char) >= ord("a") and ord($char) <= ord("z")) ||
  (ord($char) >= ord("A") and ord($char) <= ord("Z"))  );
}

echo is_alpha('|') ;

... PHP hangs ...


Expected result:
----------------
false

Actual result:
--------------
nothing ( php hangs calling ord() )

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-21 05:38 UTC] wez@php.net
strangely, I had a similar sounding problem using:

if (ord($word{0}) >= 127) {
}

under PHP 5 the other day.
 [2003-12-01 03:15 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 06:01:27 2025 UTC