News Feed
Jobs Feed
Sections




Recent Jobs

News Archive
feed this:

Mike Willbanks' Blog:
PHP Type Hinting
July 08, 2009 @ 12:57:11

There's been lots of talk about type hinting lately (both on blogs and on mailing lists) so Mike Willbanks has decided to add some of his own thoughts about why it should be included.

You may be wondering why you would want type hinting in a dynamic language. This can come in very handy especially if you are looking to enforce a specific type or need to ensure that you are indeed working with say an integer. Since this is written in C, it will be far faster than actually type casting it yourself or enforcing it yourself. General speed improvements are always nice to have.

He includes two code examples of it in use and points to the php.internals mailing list for the vote count either way. So far (as of the time of those post) the results seem mixed with some recommending it outright while others suggest waiting until the spec is completely done before integration (PHP6?).

0 comments voice your opinion now!
mailinglist phpinternals typehinting



Ilia Alshanetsky's Blog:
Type hinting rehashed (now with type casting support)
July 07, 2009 @ 07:52:37

Ilia Alshanetsky takes a look at type hinting in PHP (he's made some previous comments on the matter) and some of the community's comments about its suggested inclusion in the language.

There has been a lot of comments both on this blog and the internals list. There seems to be a fairly large group of core developers who like the idea as well as surpassingly large support base on the user level too (wow, didn't think that this many people want type hinting).

Despite some of the nay-sayers who don't think it's a good idea, the majority seems to approve and work has already been done on a new patch you can apply to your systems. He includes the Changelog information as well as links to the patch (txt) and a test suite (bz2).

0 comments voice your opinion now!
patch cast type typehinting


Ilia Alshanetsky's Blog:
Type hinting for PHP 5.3
July 02, 2009 @ 09:46:18

One of the features included in the PHP 5.x releases is type hinting for validating that you have the right values for your functions and methods coming in. In this new post to his blog Ilia Alshanetshy takes a look at the the feature and gives a patch to add it .

On a general level most people agree it would be a good idea to have, since it is an optional feature and does not introduce any regressions, heck you can even mix type hinted code with the non-type hinted one. The "PROBLEM" has always been combining of PHP's typeless nature with type hinting, which is where the consensus has been difficult (impossible) to reach.

He mentions an example of why its such an issue (technically, both 1 and "1" are valid numbers) and includes a link to a patch that gives a new hint to help with the problem.

0 comments voice your opinion now!
patch scalar numeric typehinting


Marco Tabini's Blog:
Thoughts for a new year PHP as the new Java
December 19, 2007 @ 13:47:00

Marco Tabini (of php|architect magazine) has posted some of his thoughts on why PHP just might be the "new Java" in the upcoming year.

Historically, PHP has been developed following the scratch-an-itch method [...]. This development process makes for some haphazard functionality, and has, in the past, been the source of many annoyances that need to be handled with extreme care.

He does mention some of the good things that have come out of this process like OOP in PHP4, SimpleXML functionality and type hinting but warns that if things swing too much the other way (planning out everything, only adding things by committee) that PHP might swerve towards a dangerous precedent - the Java community's mentality.

0 comments voice your opinion now!
java thought opinion oop php4 simplexml typehinting java thought opinion oop php4 simplexml typehinting


Padraic Brady's Blog:
Namespaces (or Yet Another Pointless Opinion Piece)
December 14, 2007 @ 12:01:00

Adding even more to the huge namespaces debates going on, Padraic Brady has some of his opinions posted to his blog on the subject.

The problem isn't that namespaces are bad, it's that these arcane structures seem to have so little impact on development in PHP today for many many people. Does that mean it's unimportant?

He talks about the real value of namespaces, a comparison to type hinting's inclusion, the current amount of (needless?) traffic on the php.internals list and his opinions on why namespaces are valid.

0 comments voice your opinion now!
namespace discussion opinion typehinting phpinternals namespace discussion opinion typehinting phpinternals



Community Events









Don't see your event here?
Let us know!


release facebook conference drupal symfony wordpress developer extension microsoft feature framework opinion job doctrine podcast zendframework sqlserver codeigniter windows performance

All content copyright, 2010 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework