Archive for December 2007
SitePoint PHP Blog: Lexical scope to appear in PHP?
<>
In this new post to the SitePoint PHP blog, Troels Knak-Nielsen talks about some of the advancements (and diagreements) that have happened around adding lexical scope to the create_function functionality.
The main argument against approving the patch, seems to be, that one would expect static scoping rules to apply to the anonymous function. After all, this is the case in similar languages, which support anonymous functions. One could only assume, that changing PHP to support this, would be a major undertaking.
One would be wrong, it seems.
A patch has been made to add the functionality (from Christian Seller) adding a new keyword, lexical, to make it all work.

ProPHP Podcast: Newscast for Dec 12th, 2007
The Pro::PHP Podcast has released their latest episode - the Newscast for December 20th, 2007.
Topics mentioned include:
- PHPCity
- Thoughts on PHP as the next Java
- The Google Charting API
- Profiling PHP applications
To grab this latest show you can either subscribe to their feed or you can just get the latest show via a direct mp3 download.

Community News: Latest PECL Releases for 12.25.2007
Latest PECL Releases:
Jan Lehnardt’s Blog: REST Controller for PHP Applications
Jan Lehnardt has been working up a REST controller for a PHP application he’s been developing and has posted a minimalistic structure for one he’s worked up.
One of the projects involves very little code and I do not want to use a full fledged framework there. Another one is using Code Igniter which does not handle REST by default (as far as I can tell). So I wrote a minimal REST application controller that easy to integrate and very flexible.
His example makes a base class that is extended by each of the controllers needing REST functionality. It includes methods for dispatching, error handling, responding and passing the call to the right handler.

Nessa’s Blog: Working with Permissions in PHP
On her blog Nessa has a brief look at working with permissions with PHP via three functions - chown, chgrp and chmod.
PHP uses the same command as *nix systems when dealing with changing permissions for files. These commands are particularly useful in situations where PHP runs as a different user on the system, which is common when PHP is compiled as an Apache user.
She includes a basic syntax for each of them and how one (chmod) could be used in an example of file creation.

Zend Developer Zone: Zend Framework- Coming soon to a Command Line near You!
According to the Zend Developer Zone, the Zend Framework is going to the even more powerful in the future with the inclusion of command line functionality.
So, without further adieu, it is my pleasure to announce that Zend Framework 1.5 will include a robust, powerful, and- yes- 15-minute-demo-enabled command line interface for code generation!
They’ve set up a default structure (that’s “recommended”) but doesn’t have to be strictly adhered to. They know how most developers have structured their applications and made it accordingly. There’s three proposals in the group - the Zend_Console, Zend_Build component and the Zend_Build for Core.

Community News: Latest PEAR Releases for 12.24.2007
Latest PEAR Releases:
- Console_CommandLine 0.1.0
- Services_Amazon 0.7.1
- Testing_Selenium 0.4.2
- HTML_Table 1.8.2
- Structures_DataGrid_Renderer_Pager 0.1.3
- Structures_DataGrid_Renderer_HTMLTable 0.1.4
- Structures_DataGrid_DataSource_MDB2 0.1.11
- Structures_DataGrid_DataSource_DBQuery 0.1.11
- Structures_DataGrid_DataSource_XML 0.2.0
- Structures_DataGrid_DataSource_DBTable 0.1.7
- Structures_DataGrid_DataSource_CSV 0.1.6
- Structures_DataGrid_DataSource_Array 0.1.3
- Structures_DataGrid 0.9.0
- Structures_DataGrid_Renderer_XUL 0.1.3
- Structures_DataGrid_Renderer_Smarty 0.1.4
- Structures_DataGrid_Renderer_HTMLSortForm 0.1.3
- Structures_DataGrid_DataSource_DataObject 0.2.1
- OLE 0.6.1
- PHP_CodeSniffer 1.0.0
- Console_CommandLine 0.1.1
- Structures_DataGrid_DataSource_PDO 0.1.0
- Net_FTP 1.4.0a1

Richard Thomas’ Blog: Performance of Zend_Loader
In a new blog post Richard Thomas takes a deeper look (well continues his ) at the performance of the Zend_Loader component of the Zend Framework.
When you use Zend_Loader your files are wrapped in conditional statements. These statements prevent APC and all other cache/accelerator programs to have problems properly caching your file. [...] Now here is the catch-22. Depending on the size of your application and how often different classes are used you can run into problems.
His result doesn’t have much to do with the component, though - he points out that conditionals of any type can slow things down in an application and that “benchmarking is your friend”.

Zend Developer Zone: PHP Abstract Podcast Episode 30: CouchDB
The Zend Developer Zone has posted their latest podcast in their PHP Abstract series. This time they spotlight a project from Jan Lehnardt, CouchDB.
Our special guest today is Jan Lehnardt. Jan is an Open Source software consultant specialized on internet technologies. He has years of experience building both small and large scale database applications. He has a keen eye for user experience and typography. He co-founded Freisatz, a company bringing typographic bliss to everyone. Jan also contributes to several Open Source projects.
The three usual options are there for your listening pleasure - right on the page, subscribe to the feed or grab the mp3 directly.

