In this new post to his blog Nikita Popov looks at an update that might have gotten lost in the shuffle of new features coming in PHP 5.4 - some updates to htmlspecialchars.One set of changes that I think is particularly important was largely overlooked: For PHP 5.4 cataphract (Artefacto on StackOverflow) heroically rewrote large parts of htmlspecialchars thus fixing various quirks and adding some really nice new features. Here a quick summary of the most important changes: UTF-8 as the default charset,...
On 7php.com there's a new interview with Stefan Koopmanschap, the Symfony Community Manager (and well-known PHP speaker and member of the PHPBenelux user group) answering some questions about himself, Symfony and the PHP community.In this edition, I talked with Stefan Koopmanschap (@skoop) the co-founder of the Dutch PHP usergroup PFZ.nl which is merged with the PHPBelgium usergroup to form the PHPBenelux usergroup. He is also an official Sensio training partner for Benelux and Germany. [...]...
Latest PEAR Releases:
This script gets a descedant (child) widget by name using recursion. A name should be defined for the child previously, if not as a name is considered the class name.
The name is passed as a variable by reference, when the target is found it is stored in this variable.
This will change the variable type from string to object, this very information is used as a condition to stop further recursion.
PHP 5.4 Features: Shall you Upgrade to the newer PHP Version?
By Manuel Lemos
PHP 5.4 is being released after many months of development and tests.
Read this article to get a brief overview of the features of this new release and learn about criteria that you may follow to decide if and when you should upgrade to the new version.
One of the big features arriving with PHP 5.4 is the addition of a built-in basic webserver for use in development environments. Quite a few of the other scripting languages have something like this so I'm very pleased to see it in PHP. Using a server like this makes it easy to quickly try out some scripts without needing to configure apache or really do anything much! I had to look up a few things to get started, so I thought I'd write them down for posterity.
Get the Server Running
The server runs when...
In July 2010 I already blogged about the fact that HipHop for PHP, the source code transformer that turns PHP code into C++ code that can then be compiled with g++, can also be used for static code analysis to find problems in PHP source code.
Today I started to work on a convenience wrapper for HipHop's static analyzer:
azo ~ hphpa /usr/local/src/code-coverage/PHP
hphpa 1.0.0 by Sebastian Bergmann.
The latest episode of the "/dev/hell" podcast has been released - Episode 4: "The Cool Kids Club".Our fourth episode is all ready for your listening pleasure. In this exciting episode we focus on "The Conference Experience" and discuss why programming conferences are so important to developers. Chris talks about why CodeMash was so awesome and the awesome talks full of awesomeness that he attended. Ed talks about his own experiences with speaking and attending conferences, complete with a total derail by...
Nicolas Grekas has shared another tool that he's pulled out of his "Patchwork" framework to make it a stand-alone tool: the Patchwork-UTF8 helper that provides matching functions to those PHP already has for regular strings, but a little smarter to work with UTF8 correctly.The PatchworkUtf8 class implements the quasi complete set of string functions that need UTF-8 grapheme clusters awareness. These functions are all static methods of the PatchworkUtf8 class. The best way to use them is to add a use...
In this recent post from Charles Sprayberry he explains why using dependency injection (DI) in your application is a good idea and can help make things easier in the long run.Dependency Injection is just a fancy term for passing dependencies to the object needing them instead of letting the object create its own. Hopefully, you've watched this great Google Clean Code talk about dependency injection by Misko Hevery where he talks about why you should ask for things instead of looking for them. I'm gonna...
Mike Wallner has shared a quick and easy HTTP caching technique in a new post to his blog today. The key is in using the PEAR HTTP_Header package.Ever watched youself browsing e.g. a web forum? Noticed that you viewed the same page several times? Well, this means extraordinary and useless load for your server if there's no caching mechanism implemented in the web application. Even if there is some file or db cache you can still improve performance with implementing some http cache.With a few simple lines...
On the Ibuildings blog today there's a year in review post (from Ben Longden, Rowan Merewood and Alistair Stead) looking back at 2011 and everything that happened in the world of PHP.2011 has flown by in a blur as we have been busy helping many new clients with large scale PHP projects - proof that PHP continues to gain traction with enterprise. [...] The ongoing financial climate only adds pressure for IT managers to cut costs and deliver more value from their existing infrastructure and therefore...
Popular posts from PHPDeveloper.org for the past week:IBM developerWorks: Store datasets directly in shared memory with PHP
Reddit.com: PHP.net gets a new design. Opinions divided
Jakub Zalas' Blog: Mocking Symfony Container services in Behat scenarios with Mockery
KingFoo Blog: PHP 5.4 - What's new?
Michael Nitschinger's Blog: Session Encryption with Lithium
Jani Hartikainen's Blog: Why does everything need to be integrated into a framework?
Lorna Mitchell's Blog: Building A...
PHPMaster.com has a new tutorial posted today about "bending XML to your will" - working with XML data using the XML Parser and SimpleXML functionality already included with PHP.If you've ever worked with the Twitter or Facebook APIs, looked at RSS feeds from a website, or made use of some type of RPC calls, you've undoubtedly experienced working with XML. [...] Knowing how to process XML data is a crucial programming skill today, and thankfully, PHP offers multiple ways to read, filter, and even...
In response to some criticism about his previous post with some framework benchmarks, Wojciech Sznapka has posted updated results using the latest versions of each framework.In my previous post Modern framework comparison I presented performance tests, which compared Ruby On Rails, Django and Symfony2. After recieving a feedback in comments I decided to run this benchmark one more time on my own laptop (instead of on my hosting). The reason was simple: enviroment was outdated.There were some overall...
Mike Purcell has a new post to his blog showing a method he's followed to be able to use the popular PHPUnit unit testing software without having to go through the PEAR installer to get there.PHPUnit is a great tool to protect us developers from introducing new defects when adding new features or re-factoring code. However there is one HUGE downside to PHPUnit; it must be installed using PEAR. Personally, I don't like 'auto-installers', I'd prefer to know what exactly is happening behind the scenes with...
On his blog today Francois Zaninotto has a post that aims to introduce those with a PHP background to how Node.js works. In this first part of his series, he tries to explain the idea of event-driven programming - parallel processing of different parts of an application based on some action taken in the code.For a PHP developer, asynchronicity is the most puzzling aspect of the Node.js runtime. It's simply a new way to write programs. And once you pass the first learning steps, event-driven programming...
Here's what was popular in the PHP community one year ago today:IBM developerWorks: Understanding the Zend Framework, Part 1: The basics
Gonzalo Ayuso's Blog: PHP Template Engine Comparison. Part 2 (vs Plain PHP)
9Lessons: Facebook Graph API Connect with PHP and Jquery
9Lessons: User Signup using Facebook Data
Brian Swan's Blog: Paging Data with the SQL Server Drivers for PHP: Simplified
QaFoo.com Blog: Struct classes in PHP
NetTuts.com: How to Send Text Messages with PHP
Timothy Boronczyk's Blog:...
In this recent post on Reddit.com, there's some good discussion/feedback about the proposed redesign of PHP.net.Opinions from commentors range widly:
"The layout's nice. But those colors are downright disgusting."
"To be honest, the new version is 100x better."
"It's definitely way better than the old design but still not exactly great is it?.."
"Much more profressional. Welcome to the 21st century PHP.net."
Have an opinion on the new layout? voice it here!
On the Codeception blog there's an introduction to the Codeception tool, a behavior-driven framework written in PHP (in the spirit of Behat).How often do you see PHP projects with no line of test written? From my experience, this situation happens quite often. We should state the unpleasant fact that tests are not so popular around the PHP world. Surely, the advanced developers with 5+ years of experience in PHP and other programming languages understand importance of testing and PHPUnit usage. But...