Function java_values
Evaluate a Java object.
Evaluate a object and fetch its content, if possible. Use java_values() to convert a Java object into an equivalent PHP value.
A java array, Map or Collection object is returned as a php array. An array, Map or Collection proxy is returned as a java array, Map or Collection object, and a null proxy is returned as null. All values of java types for which a primitive php type exists are returned as php values. Everything else is returned unevaluated. Please make sure that the values do not not exceed php's memory limit. Example:
$str = new java("java.lang.String", "hello"); echo java_values($str); => hello $chr = $str->toCharArray(); echo $chr; => [o(array_of-C):"[C@1b10d42"] $ar = java_values($chr); print $ar; => Array print $ar[0]; => [o(Character):"h"] print java_values($ar[0]); => h
object |
$object |
java object or type. |