You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
423 B

  1. <?
  2. $stack=new Java("java.util.Stack");
  3. $stack->push(1);
  4. #
  5. # Should succeed and print out "1"
  6. #
  7. $result = $stack->pop();
  8. $ex = java_last_exception_get();
  9. if (!$ex) print "$result\n";
  10. #
  11. # Should fail - note the "@" eliminates the warning
  12. #
  13. $result=@$stack->pop();
  14. $ex=java_last_exception_get();
  15. if ($ex) print $ex->toString();
  16. #
  17. # Reset last exception
  18. #
  19. java_last_exception_clear();
  20. ?>