|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-12-03 17:29 UTC] jani@php.net
-Status: Open
+Status: Bogus
-Package: Feature/Change Request
+Package: *General Issues
[2010-12-03 17:29 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 25 23:00:01 2025 UTC |
Hello, Currently under the php_java extension to access array elements you must pull the whole array/hashtable into a php variable before you can access its elements. e.g. r.java ####################################### import java.util.*; public class r { public Hashtable y = new Hashtable(); public void r() { y.put("x","xx"); } } ####################################### <?php $je = new Java("r"); $je->r(); $ht = $je->y; echo $ht["x"]; ?> It would be much nicer (and more php'esque) to access the array and hashtable variables directly like so :- <?php $je = new Java("r"); $je->r(); echo $je->y["x"]; ?> As a trial I ported my custom database access class to Java JDBC with connection pooling, which went very smoothly bar this one difference (I have relied heavily on '$je-> y["x"];' style access in my arrays in my pages). I have had a little stab at figuring out from the source how to implement this, but it is beyond my abilities. Hence my feature request. REGARDS Paul