un-de-re-deprecation

View: New views
2 Messages — Rating Filter:   Alert me  

un-de-re-deprecation

by Christoph Boget-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://us.php.net/manual/en/language.operators.type.php
The instanceof operator was introduced in PHP 5. Before this time
is_a() was used but is_a() has since been deprecated in favor of
instanceof. Note that as of PHP 5.3.0, is_a() is no longer deprecated.

http://us.php.net/manual/en/function.is-a.php
Changelog

Version Description
5.3.0 This function is no longer deprecated, and will therefore no
longer throw E_STRICT warnings.
5.0.0 This function became deprecated in favour of the instanceof
operator. Calling this function will result in an E_STRICT warning.

"Oh, never mind.  All that refactoring you did to take in to account
the deprecation of is_a(), well, sorry 'bout that.  We were a little
not right in the head when we originally made that decision.  You can
go ahead and change all that code back now if you like..."

Ok, so I'm curious, why was is_a() added back in when it was tossed
out on it's head in 5.0?

thnx,
Christoph

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: un-de-re-deprecation

by Daniel Brown-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jul 6, 2009 at 13:29, Christoph Boget<christoph.boget@...> wrote:
[snip="facts"]
>
> Ok, so I'm curious, why was is_a() added back in when it was tossed
> out on it's head in 5.0?

    This is just how things operate with the core folks.  In
actuality, that's not just PHP that does it: most projects (and indeed
all mass-collaboration projects like an open source language) will
evolve with similar things occurring.

    Probably the most frequent reason it happens is when someone says,
"this makes more sense to me," and makes the change, while others ask
say, "yeah, but what's the matter with how it worked before?"
Discussions fire back-and-forth (if things are democratic) and are in
a temporary stalemate (hence the long-time deprecation E_STRICT
warning, but not total removal) until such a time that it's revisited
with fresh eyes and found to be Just Fine The Way It Is[TM].

    Thus, one hour in the lifecycle of PHP development.  ;-P

--
</Daniel P. Brown>
daniel.brown@... || danbrown@...
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php