News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

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 code



PHP.net:
PHP 5.3 alpha 1 Released
August 01, 2008 @ 07:58:29

As announced on the PHP.net site today, the first alpha version of the much-anticipated PHP 5.3 has been released - PHP 5.3 alpha 1.

The PHP development team is proud to announce the first alpha release (Windows binaries will appear in the next few days) of the upcoming minor version update of PHP. The new version PHP 5.3 is expected to improve stability and performance as well as add new language syntax and extensions. Several new features have already been documented in the official documentation, others are listed on the wiki in preparation of getting documented. Please also review the NEWS file.

Among the list of new features/improvements are things like namespaces, late static binding, lambda functions, closures, support for mysqlnd and removal of support for pre-Windows 2000 systems. For more information on when the full stable version will his the web, check out the release plan.

2 comments voice your opinion now!
php5 release alpha preview namespace latestaticbinding lambda closures


LivePipe Blog:
What PHP6 Actually Needs
May 15, 2007 @ 10:13:00

On the LivePipe blog, there's a whishlist that Ryan has posted for some of the things he'd like to see in PHP6.

His list consists of:

  • Closures
  • { } is the new array()
  • Parameter Collection in Functions
  • Late Static Binding
  • Backwards Compatibility

Each is explained, some with code to illustrate.

1 comment voice your opinion now!
php6 need wishlist closures array parameter static binding php6 need wishlist closures array parameter static binding


Dikini.net:
Some ways to use saved state with closures in PHP
January 25, 2006 @ 12:43:20

On dikini.net today, there's a new post that talks about a method of implementing saved state in PHP, and how to couple it with closures.

In a previous short post I describe a way to emulate closures in php. Using that technique execution environment, otherwise known as a call stack can be saved for future use. This can be put to good use. A couple of patterns or programming techniques could be useful in practice.

A closure represents a state => implemenation of a state pattern. This is a bit rich. Usually in OO programming the state pattern is implemented by encapsulating different protocols, for denoted states. This is simple to implement by substituting your protocol specification with a different name.

His example starts off with the Drupal hooks, using the State pattern to create a method of tracking "where we are" via PHP.

0 comments voice your opinion now!
php saved state closures emulation call stack php saved state closures emulation call stack



Community Events







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


cakephp developer PHP5 package book mysql framework database conference releases zend zendframework PEAR job application security release ajax code example

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