PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
PhpRiot Latest Blog Posts
Displaying blog posts 81 to 100 of 171

Quality Assurance on PHP projects - PHP_CodeSniffer

Quality Assurance on PHP projects - PHP_CodeSniffer
PHP_CodeSnifferAis probably the most convenient tool out there to analyze your source code and to verify it complies to company policies. Although it's debatable why source code should follow strict guidelines, it's only a matter of time before you discover yourself that it pays off to have a code base that appears to be written by one developer.The first question you have to ask is what standard are you going to implement. There are several standards already packaged withAPHP_CodeSniffer, but are they...

Legacy code

Legacy code
Some people have this misconception that there is a plot to kill of the original mysql extension (aka ext/mysqli) in PHP. So first off, I know that bloggers are not journalist. So apprently fact-checking is not required for a rant blog post. ;-) But if a blog post is a rant, it should be labeled as such.Improvedext/mysqli (hint: "i" as in improved) has been the goto extension for years. If anyone writes code in 2011 which uses ext/mysql, then they should be fired or demoted to trainee. MySQL's 4.1.3 beta...

Out With The Old, In With The New: Original MySQL Extension Heading For Retirement?

Out With The Old, In With The New: Original MySQL Extension Heading For Retirement?
Image via Wikipedia When we use the term PHP, we are often silently associating it with the abbreviation LAMP (that's Linux, Apache, MySQL and PHP just in case you don't recall). MySQL has been our bread and butter in PHP for over a decade; an old friend, accomplice and partner in crime. This was made possible with the MySQL extension. Indeed, you can scarcely find a basic nuts and bolts PHP tutorial that doesn't use MySQL. Which is probably why it's a good idea to give it a huge going away bash (and...

The PHP Ternary Operator: Fast or not?

The PHP Ternary Operator: Fast or not?
People like micro-optimizations. They are easy to understand, easy to apply... and useless. But some time ago, while reviewing pull requests for Twig, I read an interesting discussion about the performance of the ternary operator in PHP (thanks to @nikic for the investigation). Do you know which following snippet is the fastest (of course, they do exactly the same)? // snippet 1 $tmp = isset($context['test']) ? $context['test'] : ''; A // snippet 2 if (isset($context['test'])) { $tmp =...

Liip Blog: First Release of Proxy-Object

Liip Blog: First Release of Proxy-Object
On the Liip blog Bastian Feder has announced the first release of a tool that helps you proxy your objects (overlay them with a layer that exposes properties and methods) following the proxy object design pattern in PHP.The outcome is this little library making it much easier to generate a proxy of your system under test (SUT). Another thought on this library was, that it should be very easy to use if you know the way to mock classes and methods in PHPUnit. Proxy-object has almost the same API, but does...

Brian Swan's Blog: PHP Driver for SQL Server - Request for Feature Feedback

Brian Swan's Blog: PHP Driver for SQL Server - Request for Feature Feedback
Brian Swan is asking for user feedback about the future of the Microsoft's SQL Server driver for PHP based on a post in the team's blog.I want to make sure that his request gets in front of lots of eyes, so I'm re-posting his request here (below). Jonathan included some links in his post so you can learn more about what the team is considering for the next release of the driver, but he didn't elaborate on "Buffered Queries".They suggest a few features and ask for choices on which would be the most...

Community News: An Effort to Deprecate the MySQL Extension

Community News: An Effort to Deprecate the MySQL Extension
According to this new post to the PHPClasses.org blog today, the core PHP development team has put plans in motion to try to remove the original MySQL extension from the default PHP installation.PHP core developers are planning to kill the PHP original MySQL extension. If you are using MySQL in your PHP applications for a long time, this may seriously affect you.Right now it's just in the proposal states (as suggested by Philip Olson) but, if fully acted upon, could have large implications on a number of...

Anatomy of a Horde login - Flow chart

Anatomy of a Horde login - Flow chart
I promised to look into generating a chart of the Horde login processes, and out came an activity diagram. I'm not perfectly happy with it yet, but it's being rendered automatically thanks to PlantUML and Graphwiz.

Michelangelo van Dam's Blog: Quality Assurance on PHP projects (and PHPLint)

Michelangelo van Dam's Blog: Quality Assurance on PHP projects (and PHPLint)
Michelangelo van Dam has started a new series of posts on his blog about quality assurance in PHP projects with this introduction and a look at the first tool on his list PHPLint.Quality Assurance has become an increasing important part of web application development, especially with PHP applications. [...] Luckily there are a lot of tools available that allows you to increase quality of these web applications, and the best part is they are all based on PHP! Let's have a quick look at what tools are...

Site News: Popular Posts for the Week of 07.15.2011

Site News: Popular Posts for the Week of 07.15.2011
Popular posts from PHPDeveloper.org for the past week:Martin Sikora's Blog: Google Chrome Extension: PHP Ninja Manual SWAT Blog: Python VS PHP Smashing Magazine: My Favorite Programming Mistakes Community News: Launch of CSI:PHP Erskine Labs Blog: What should they know of PHP who only PHP know? DZone.com: The era of Object-Document Mapping PHPBuilder.com: 6 PHP Performance Tips for Producing Highly Optimized Code Artur Ejsmont's Blog: How to structure a Zend Framework application and it's dependencies...

The Plot to Kill PHP MySQL Extension

The Plot to Kill PHP MySQL Extension
The Plot to Kill PHP MySQL Extension By Manuel Lemos PHP core developers are planning to kill the PHP original MySQL extension. If you are using MySQL in your PHP applications for a long time, this may seriously affect you. Read this article to learn what this means in practice and what you can do about it.

Conferences for the rest of 2011

Conferences for the rest of 2011
It's been a busy conference year for me. In the first half of 2011, I was away from home for (on average) one week every month. While I've really enjoyed all the conferences, it's been busy. A bit too busy. So for the rest of the year, I've decided to take it a bit slower. Basically, I'll be at 4 conferences, and that's it.

Quality Assurance on PHP projects - PHPLint

Quality Assurance on PHP projects - PHPLint
PHP LintPHP Lint is probably the easiest way to validate your code on syntax errors, but it's also the most overlooked feature of PHP on command line.Provides a convenient way to perform only a syntax check on the given PHP code. On success, the text No syntax errors detected in is written to standard output and the shell return code is 0. On failure, the text Errors parsing in addition to the internal parser error message is written to standard output and the shell return code is set to -1.This option...

Zend Framework 1.11.9 Released

Zend Framework 1.11.9 Released
A number of potential BC issues were identified in the 1.11 series, and specifically in the 1.11.8 release, and as such, the Zend Framework team is releasing version 1.11.9 just one week following 1.11.8. It is available for immediate download: http://framework.zend.com/download/latest

Project: Google Storage Plugin for CakePHP

Project: Google Storage Plugin for CakePHP
Jonathan Bradley has submitted a handy new helper for the CakePHP users out there that can help to work with Google's Storage in a drop-in plugin - the Simple Google Storage Plugin for CakePHP.Ever noticed how there is no decent support for CakePHP to utilize Google Storage? Well the wait is over, after realizing that Amazon S3 was just way to unreliable and bloated with spammers and usuage hogs. You can now add Google Storage support to your CakePHP application.Obviously you'll need to be set up with...

Jani Hartikainen's Blog: PHP typehinting gotcha in exceptions/methods

Jani Hartikainen's Blog: PHP typehinting gotcha in exceptions/methods
Jani Hartikainen has a new post with a gotcha he came across when using typehinting in exceptions and methods.A small gotcha I recently ran into: If you use typehinting, PHP never checks that the class your typehint specifies actually exists!He includes simple examples that define the class type hint as some random string and PHP never throws an error for it. He also notes that it's even worse when dealing with namespaces - how it handles exceptions locally unless you specify otherwise. Of course, these...

First release of proxy-object

First release of proxy-object
I am very proud to announce the first release of the proxy-object. Initiated by Thomas Weinert and me back in 2008, this library was just a first draft with all the functionality we needed at this time. Working with it and using it, proxy-object got grown up. Finally Liip sponsored me some time to do necessary changes and best of all writing unit tests. The outcome is this little library making it much easier to generate a proxy of your system under test (SUT). Another thought on this library was, that...

Voices of the ElePHPant: Interview with Bill Karwin

Voices of the ElePHPant: Interview with Bill Karwin
The Voices of the ElePHPant podcast has release their latest episode - a new interview with Bill Karwin.Cal's "three questions" for Bill talk about both general development and SQL topics: Can you describe for us what second system syndrome is and why you think Zend Framework 2 falls into it? What's the biggest mistake you see project developers making when it comes to SQL? Can you briefly explain what is a SQL anti-pattern and give a few examples? You can listen to this latest episode either by...

DevShed: PHP Object Oriented Programming using LSP

DevShed: PHP Object Oriented Programming using LSP
In another part of their series looking at the SOLID principles of software development, DevShed focuses again on using LSP (the Liskov Substitution Principle) to help you organize your application (part one is here).Even though its formal definition is somewhat hard to grasp, in practical terms it states that methods defined in a base class (or interface) and their derivatives must have the same signature, preconditions should be weakened in the formers, and post-conditions should be strengthened. In...

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

Site News: Blast from the Past - One Year Ago in PHP
Here's what was popular in the PHP community one year ago today:Brian Swan's Blog: Creating PHP Websites with WebMatrix Michael Feichtinger's Blog: HTML5 WebSockets Example Project: PHP on Android SitePoint.com: WordPress in the Cloud with Amazon EC2 and the Microsoft Web Platform ServerGrove Blog: Symfony + Git + Capistrano = Capifony Security Musings: PHP: Please Hack Pal. ThinkPHP.de: Import and export data using PHPExcel php|architect: Ext4Yii, bridging PHP and JavaScript frameworks together...