News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Mark Brady's Blog:
Closures in PHP 5.3
October 01, 2008 @ 08:47:50

Mark Brady has a recent post he's worked up that looks at a feature in the upcoming PHP 5.3 version - closures.

According to object-oriented programming expert Martin Fowler, closures are defined as a block of code that can be passed to a function. [...] PHP's upcoming syntax for closures is shaping up to be comparable to the C# 2.0 implementation.

He includes two code examples to compare the two language's methods - one for C# and the other for PHP - that divides the input by a denominator and returns a true or false depending on the result. For more information on closures, see this proposal on the PHP.net wiki.

0 comments voice your opinion now!
closures php5 example c# compare


blog comments powered by Disqus

Similar Posts

Rails for PHP Blog: PHP, Meet YAML

Net-Security.org: SUSE Security Announcement - php4,php5 problems

DevShed: Inserting Comments and Accessing Nodes with the DOM XML Extension in PHP 5

Alexey Zakhlestin's Blog: YAML: Syck for PHP is not read-only anymore

SitePoint PHP Blog: How strict is your dynamic language?


Community Events





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


framework introduction language list laravel threedevsandamaybe symfony2 code opinion unittest install community series developer podcast interview testing refactor api release

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