2011年12月30日星期五

Site News: Popular Posts for the Week of 12.30.2011

Popular posts from PHPDeveloper.org for the past week:

Mark Story's Blog: New errors in PHP 5.4


In this quick new post to his blog Mark Story talks about two new errors he ran across when upgrading his installation to PHP 5.4, both showing up under E_ALL.



I've been running the PHP5.4 RC builds for the last few months, and there are some interesting changes in the upcoming PHP release. On top of all the great new features coming in PHP5.4. After updating to PHP5.4-RC4, a few things that used to not trigger errors and silently do the wrong thing, now trigger notices or warnings.


The two he mentions deal with a new warning on illegal string offsets and the other about string offsets ("Notice: String offset cast occurred"). You can find out about more changes in the PHP 5.4 series in the various Changelogs for each Release Candidate and beta release.

Community News: Conference Call for Papers Reminders!


As the conference season for next year gets closer, several conferences have opened their Call for Papers. A few of them have deadlines coming up soon, so don't forget the following important dates if you'd like to submit!




Be sure to submit while there's still time! Thanks to Thijs Feryn for the reminder!

2011年12月29日星期四

Site News: Blast from the Past - One Year Ago in PHP

Here's what was popular in the PHP community one year ago today:

Dzone.com: Open source PHP projects of 2011


On Dzone.com today Giorgio Sironi has posted what he considers to be some of the most popular Open Source PHP projects of 2011 including Symfony2, Doctrine and HipHop.



This non-scientific analysis of the popular and exciting PHP projects starts from researches on active projects on SourceForge and GitHub; the latter is where most of the collaboration and involvement of PHP developers is today. I've also crowdsourced the question on Twitter to catch projects I wasn't aware of, and I hope to do the same with you.

Other projects included in his list are:



  • Symfony2 Components
  • Moodle
  • Composer and Packagist
  • Drupal, Joomla, Wordpress


Have a project you think he missed? Let him know!

PHPMaster.com: Writing Custom Session Handlers


On PHPMaster.com today there's a new post showing you how to write custom session handlers - in their case, a database-based option that can span across multiple servers/services.



Sessions are a tool which helps the web programmer overcome the stateless nature of the internet. You can use them to build shopping carts, monitor visits to a website, and even track how a user navigates through your application. PHP's default session handling behavior can provide all you need in most cases, but there may be times when you want to expand the functionality and store session data differently. This article will show you how the default functionality works and then goes on to show you how override it to provide a custom solution.


They introduce how sessions are stored normally (based on the save path) and what the serialized contents of it would look like. They show you how to take this, normally stored on the local file system, and change it to be written to a "session" table in a MySQL database (via PDO). It includes reading, writing, updating and some garbage collection to clean out old values from the table.