September 2001
Intermediate to advanced
768 pages
32h 45m
English
object new Java(string classname, [mixed arg1], [mixed ...])
| classname | Name of Java class to instantiate |
| arg1 | First argument to Java class constructor |
| ... | Successive arguments to Java class constructor |
Creates a PHP object interface to a Java class.
Returns:
Object for the requested Java class
Description:
This is not a function; rather, it’s the constructor of a default class provided when Java support is available in PHP. The first parameter is the name of the Java class to instantiate. The second and following parameters, if given, are passed to the actual Java class as its arguments.
Example:
echo "<h2>Testing java.util.StringTokenizer</h2>"; $str = new Java("java.util.StringTokenizer", "This ... |
Read now
Unlock full access