Re: Concept: Lightweight error channels

From: Date: Sat, 26 Apr 2025 23:20:33 +0000
Subject: Re: Concept: Lightweight error channels
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
> What's the problem with PHP exceptions? I'm not even trying to argue, I'm
> trying to understand. Is it the implementation (bad/expensive performance)?
> Semantics? Handling syntax?

Larry provided several problems in the opening of his email; you may
want to reread that.

I will affirm that exceptions can be quite expensive. Throwing one
means constructing a backtrace, walking the entire call stack to
gather at minimum function names, file names, and line numbers, and
optionally information about arguments. This is why using them for
errors that are expected to be handled is often considered
inappropriate.


Thread (21 messages)

« previous php.internals (#127191) next »