Re: [PHP-DEV] Changing default assertion mode to throw exceptions

This is only part of a thread. view whole thread
  111127
July 22, 2020 15:53 kalle@php.net (Kalle Sommer Nielsen)
Hi

Den man. 13. jul. 2020 kl. 20.37 skrev Levi Morrison <levim@php.net>:
> > Hello everyone, > > I'd like to change the default mode of assertion failures to throw. > The current default is to warn. In my opinion this is a bad strategy: > the engine asserted that something that is expected to be true is not, > so executing further is a bad idea. This leaves throwing or bailing > out. I think throwing an exception is better than bailing out, so > that's what I propose.
+1 on this. I was recently surprised why this wasn't the default either -- regards, Kalle Sommer Nielsen kalle@php.net