|  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
View Add Comment Developer Edit
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 — but make sure to vote on the bug!
Your email address:
Solve the problem:
48 + 44 = ?
Subscribe to this entry?

 [2003-11-21 05:02 UTC] jaime dot lopez at iic dot uam dot es
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:

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-21 05:38 UTC]
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]
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-2022 The PHP Group
All rights reserved.
Last updated: Fri Aug 12 02:05:45 2022 UTC