Menu

Diff of /trunk/php-java-bridge/tests.php5/toString.php [r455] .. [r456]  Maximize  Restore

Switch to side-by-side view

--- a/trunk/php-java-bridge/tests.php5/toString.php
+++ b/trunk/php-java-bridge/tests.php5/toString.php
@@ -2,7 +2,7 @@
 <?php
 
 if (!extension_loaded('java')) {
-  if (!(PHP_SHLIB_SUFFIX=="so" && dl('java.so'))&&!(PHP_SHLIB_SUFFIX=="dll" && dl('php_java.dll'))) {
+  if (!(include_once("java/Java.php"))&&!(PHP_SHLIB_SUFFIX=="so" && dl('java.so'))&&!(PHP_SHLIB_SUFFIX=="dll" && dl('php_java.dll'))) {
     echo "java extension not installed.";
     exit(2);
   }
@@ -18,8 +18,8 @@
 
 // test cast to string
 // should display "class java.lang.Object"
-echo "" . $Object . "\n";
-echo "" . $ObjectC . "\n";
+echo "" . $Object->__toString() . "\n";
+echo "" . $ObjectC->__toString() . "\n";
 
-echo "$object\n";
+echo $object->__toString()."\n";
 ?>