News Feed
Jobs Feed
Sections



Recent Jobs

News Archive
Patrick Allaert's Blog:
Coding standards converts PHP4 style constructors to PHP5 one
October 30, 2009 @ 07:51:39

Patrick Allaert has put together a shell command that can take your PHP4 code and replace its current constructors with PHP5-formatted ones.

It assumes your classes are always declared with the class keyword starting at the beginning of the line and that your files have the .php extension.

It uses a regular expression in a perl command to search through the current directory and look for the ".php" files to replace the "function ClassName" sort of thing with a "function __construct".

0 comments voice your opinion now!
code standards php4 php5 constructor perl convert



Similar Posts

ProDevTips Blog: Fluent Arrays and Strings in PHP - Adding JSON and more

John Cox\'s Blog: Perl to PHP Translation

Greg Beaver's Blog: How to put the FAIL in open source

DevShed: Building an Image Generator Class with PHP 5

PHP-GTK Community: Code completion for PHP-GTK in Netbeans


Community Events

phpnw10 PHP Conference 09/10/2010




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


phpunit codeigniter application suggestion example database azure framework symfony book plugin zendframework developer conference opinion wordpress unittest development tool podcast

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