Phalanger is a new PHP implementation introducing the PHP language into the family of compiled .NET languages. It provides PHP applications an execution environment that is fast and extremely compatible with the vast array of existing PHP code. Phalanger gives web-application developers the ability to benefit from both the ease-of-use and effectiveness of the PHP language and the power and richness of the .NET platform taking profit from the best from both sides.
Phalanger maintains the way how PHP web applications are developed and deployed so that the you can leverage from .NET without having to learn complex ASP.NET style of web development, however Phalanger also allows you to use PHP as a language for writing ASP.NET applications, so you have the freedom to make a choice!
Due to the managed implementation of the PHP functions library, the migration from PHP interpreter to Phalanger is an easy and straightforward process, which includes only configuring the application in most of the situations. The compiled nature of Phalanger applications also leads to major performance boost.
To get an idea on how the interoperability of PHP and C# works, head over to one of the tutorials on their site: Using PHP library from C#
Securimage’s a quick solution to adding a Captcha to your projects. I liked the ReCaptcha project which provided you a hosted solution for captchas but, this one is a PHP and GD solution which you can run off your server.
Securimage is an open-source free PHP CAPTCHA script for generating complex images and CAPTCHA codes to protect forms from spam and abuse. It can be easily added into existing forms on your website to provide protection from spam bots. It can run on most any webserver as long as you have PHP installed, and GD support within PHP.
Some of the key features of Securimage are:
Ability to add a captcha to your forms in 3 lines of code and validate the submitted entry in 6 lines of code
Webgrind is a project which aims on providing a subset of functionality of kcachegrind on the Web. This implementation uses PHP5 to provide the frontend. The feature-set provided by Webgrind is currently a minimal subset of kcachegrind:
The installation of Webgrind is minimal and fast. If you have xdebug installed, it’s just a matter of a few minutes to get Webgrind running, just unzip the files, change the config.php file to set the right paths and it’s up and running.
Magento is an ecommerce platform on PHP which is quite feature rich. This platform is based on the Zend Framework. You can take a look at a Magento store and the admin demo over at their demo section. Some of the notable features of this platform are:
Analytics and reports - integration with Google Analytics, RSS feeds on Orders and feedback, Sales reports
Catalog Management & Browsing
Customer Accounts - with order status, default addresses, wishlists and dashboard
Order Management - edit, create and fullfill orders, print invoice and packing slips
Easy Feed integrations for PHP - SimplePie is a code library which gives you an easy to use OO API for feeds. It allows easy merging of feeds from multiple sources. This API handles all of the hard work for fetching, caching, parsing, normalizing data between RSS and Atom formats, handling character encoding and sanitizing the feed data.
I’ve setup a sample lifefeed from various services I’m on, using SimplePie and some of their demo code over at webfeed.vinuthomas.com
Here’s a good replacement for your standard print_r and var_dump in PHP, Krumo beautifies and expands the functionality required for PHP debugging:
To put it simply, Krumo is a replacement for print_r() and var_dump(). By definition Krumo is a debugging tool (now for PHP5 only), which displays structured information about any PHP variable.
A lot of developers use print_r() and var_dump() in the means of debugging tools. Although they were intended to present human readable information about a variable, we can all agree that in general they are not. Krumo is an alternative: it does the same job, but it presents the information beautified using CSS and DHTML.
Apart from dumping variable data, the current version of Krumo also supports the following :
Did you know what the function register_shutdown_function does in PHP? The manual defines this function as :
Registers the function named by function to be executed when script processing is complete.
This function runs at the end of any script execution - it also runs if your script exits prematurely due to some errors. This is a useful function to catch such exceptions in your script. Eirik Hoem’s written an article on this function over at his blog, where he shows an example on how to trap a premature end of script due to a fatal error: <?php
$clean = false;
function shutdown_func(){
global $clean;
if (!$clean){
die("not a clean shutdown");
}
}
register_shutdown_function("shutdown_func");
$a = 1;
$a = new FooClass(); // will fail with fatal
$clean = true;
?>
Asido is a PHP image processing solution, with “pluggable” drivers(adapters) for most environments. Asido is still in starting stages with the following drivers supported, with more on the way:
GD
ImageMagick
MagickWand
Some of the image manipulation features which are currently available in Asido are:
If you’d like to work on your favorite PHP apps on your S60 phones, here’s PAMP - Personal Apache, MySQL and PHP. This is implemented on the Symbian OS using Open C, which is a set of industry-standard POSIX and middleware C libraries for S60.
To install PAMP on your S60 mobile, you’ll have to make sure that your’s is a S60 3rd Edition device with 128MB RAM. Running MySQL itself requires 64MB. The Documentation over at Nokia’s opensource wiki states that this has officially been tested only on the N95 and E61i devices, but should work on any S60 3rd Edition device with 128MB RAM.
For instructions on how to install and setup PAMP on your mobile, head over to dev.mobi’s article which shows you how to install and get PAMP running on your Mobile and also how to make your mobile server accessible over wifi and the internet using Raccoon Gateway.
Usually handing forms involves coding the form in HTML and performing client and server side validation, which usually makes the code for complex forms quite unwieldy. Zend_Form which is available in Zend Framework version 1.5 aims at simplifying this process.
You can now create and add methods for validating form fields completely in Zend_Form. Here’s an example from an article at Zend Developer Zone: