Re: [CONCEPT][DISCUSSION] Instance as boolean

From: Date: Thu, 09 Jul 2020 18:21:45 +0000
Subject: Re: [CONCEPT][DISCUSSION] Instance as boolean
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-110905@lists.php.net to get a copy of this message
Hey Marcio, On Thu, Jul 9, 2020 at 7:49 PM Marcio Almada <marcio.web2@gmail.com> wrote: > Hi > > > > > Re casting - In the previous thread the following concern was presented > and I don’t know enough about that area to respond effectively: "I'd > endorse avoiding object-to-<scalar> casts via cast operations: they are a > good source of bugs. My rationale for the discouragement of magic cast > methods is explained with some code examples at > > https://github.com/ShittySoft/symfony-live-berlin-2018-doctrine-tutorial/pull/3#issuecomment-460441229 > ” > > > > Frankly this is something subject to personal opinions and will change > over time according to community shifts. > > Not sure what's "subject to personal opinions" in the objective bug exposed in the snippet above? Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

« previous php.internals (#110905) next »