When Java support is available, a global Java class is defined, which is used to instantiate Java classes into PHP objects. These objects can then be used just as with normal PHP objects; methods of the Java class can be called using PHP syntax, and so on. Two functions are also defined to help the programmer deal with Java exceptions, for which PHP has no built-in support. java_last_exception_get() returns an object representing the last exception to have been thrown by a Java class, and java_last_exception_clear() allows the programmer to remove the last exception from memory. Java support needs to be built into PHP using the --with-java=[DIR] configure option. It will always be built as a shared library, which will be installed along with the rest of PHP during the installation process. Please read the README in the PHP source distribution in the file ext/java/README, as it contains important information on setting up PHP for use with Java. Table of Contents
PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing
(Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch).
This material may be distributed only subject to the terms and conditions set forth
in the Open Publication License, v1.0 or later (the latest version is presently available at
http://www.opencontent.org/openpub/).
The authors of this book have elected not to choose any options under the OPL. This online book was obtained
from http://www.fooassociates.com/phpfer/
and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4
for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All
persons and entities shall have neither liability nor responsibility to any person or entity with respect to
any loss or damage arising from the information contained in this book.
|