Bug #13276: Java methods are incorrectly set to lowercase

From: Date: Wed, 12 Sep 2001 23:40:27 +0000
Subject: Bug #13276: Java methods are incorrectly set to lowercase
Groups: php.dev 
Request: Send a blank email to php-dev+get-65852@lists.php.net to get a copy of this message
From: shaley@intertrust.com Operating system: Solaris 2.7 PHP version: 4.0.6 PHP Bug Type: Java related Bug description: Java methods are incorrectly set to lowercase 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: <?php $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 <br> <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. -- Edit bug report at: http://bugs.php.net/?id=13276&edit=1

« previous php.dev (#65852) next »