macro debug_assert($cond) { ... }

Panics if cond evaluates to false when compiled in debug mode. Otherwise, does nothing.