Read More……(read more)
In this new post on DZone.com today John Esposito talks about an interesting PHP framework that has come to light lately – the Yet Another Framework, an oddly named PHP extension that provides some of the basics to build a framework-based application.
Why care about another PHP framework? especially one that’s actually called Yet Another Framework? Because Yaf isn’t just a framework. It’s a PHP extension (listed on PECL), so it’s written in C — so it’s very, very fast. How fast? Here’s a benchmark (requests/sec).
The only framework (of the list he compared) that came in faster was MicroMVC and that’s not as full-featured as the Yaf functionality is. Disregarding that, it has a huge requests/second difference between even the next on the list, CodeIgniter.
On PHPMaster.com today there’s a new tutorial that shares a few regular expression tips about doing some search and replace in your content.
So how can you practice using regex if you are limited to just using them in your code? The answer is to use a utility, of which there are many, that uses regex for performing search and replace. I’m sure everyone is familiar with the standard “find x and replace it with y” type of search and replace. Most IDEs and text editors have built in regex engines to handle search and replace. In this article I’d like to walk through a series of exercises to help you practice using regex.
His examples are based on Netbeans but can be used in just about any IDE that supports regex (or even just your code). He shows how to match word boundaries, do some grouping, work with back references and doing some search/replace based on multiple groupings.