Aer Interpreter Source
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.

19 lines
446 B

2 years ago
2 years ago
  1. class Program {
  2. void test_assert(mixed $param) {
  3. assert("is_bool($param);");
  4. }
  5. public void main() {
  6. callback $assert_fail = void(string $file, int $line, string $code) {
  7. print("Assertion failed ...\n");
  8. };
  9. assert_options(ASSERT_ACTIVE, true);
  10. assert_options(ASSERT_BAIL, false);
  11. assert_options(ASSERT_WARNING, false);
  12. assert_options(ASSERT_CALLBACK, $assert_fail);
  13. $this->test_assert(true);
  14. $this->test_assert(1);
  15. }
  16. }