|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-02-24 06:13 UTC] yohgaki@php.net
[2002-04-07 00:00 UTC] php-bugs at lists dot php dot net
[2002-04-07 01:30 UTC] rodif_bl@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 21:00:02 2025 UTC |
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.