|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13276 Java methods are incorrectly set to lowercase
Submitted: 2001-09-12 19:40 UTC Modified: 2002-04-07 01:30 UTC
From: shaley at intertrust dot com Assigned:
Status: Not a bug Package: Java related
PHP Version: 4.0.6 OS: Solaris 2.7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: shaley at intertrust dot com
New email:
PHP Version: OS:


 [2001-09-12 19:40 UTC] shaley at intertrust dot com
Take the following code:

public class phptest{
  public static String testString = "look for ^ in this string";

public static void main(String[] args)
 System.out.println("Found ^ at: "+testString.indexOf('^'));

Which when run in Java produces this output:
Found ^ at: 9

Now, consider the following php code:

$phptest = new Java("phptest");

printf("Found ^ at: %d\n", $phptest->$testString->indexOf('^'));

This *almost* works, and produces the following output:
X-Powered-By: PHP/4.0.6
Content-type: text/html

<b>Warning</b>:  java.lang.NoSuchMethodException: indexof in <b>phptest.php</b> on line <b>5</b><br>
Found ^ at: 0

As you can see, the indexof method has been lowercased from indexOf.  This is a problem in the case sensitive environment of Java.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-24 06:13 UTC]
Please test with  PHP 4.1.1+JDK 1.2 and report the result back 
Please do not forget  updating PHP version. Thanks.
 [2002-04-07 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2002-04-07 01:30 UTC]
Because php is case insensitive this is the reason for this bug.. Can't do anything about it unless php goes case sensitive.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 18:01:30 2024 UTC