PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
PhpRiot Latest Blog Posts
Displaying blog posts 121 to 140 of 277

NETTUTS.com: The Newbie's Guide to Test-Driven Development

NETTUTS.com: The Newbie's Guide to Test-Driven Development
On NETTUTS.com today there's a new tutorial to help you get started with effective test-driven development in your PHP applications with SimpleTest.Testing your code is annoying, but the impact of not doing so can be orders of magnitude more annoying! In this article, we'll use test-driven development to write and test our code more effectively.They start with the basics - what test-driven development is, why it's a good idea and how the whole process works to improve your code. They opt for a bit...

Matthew Weier O'Phinney's Blog: Applying FilterIterator to Directory Iteration

Matthew Weier O'Phinney's Blog: Applying FilterIterator to Directory Iteration
New on his blog Matthew Weier O'Phinney has this post looking about using the FilterIterator (from PHP's SPL libraries) to work with (recursive) directory iteration.I'm currently doing research and prototyping for autoloading alternatives in Zend Framework 2.0. One approach I'm looking at involves creating explicit class/file maps; these tend to be much faster than using the include_path, but do require some additional setup. [...] I'm well aware of RecursiveDirectoryIterator, and planned to use that....

It's That Time Again- Announcing August's ZF Bug Hunting Days

It's That Time Again- Announcing August's ZF Bug Hunting Days
Yep, it's the third week of the month again- and you know what that means: Zend Framework Monthly Bughunt! This Thursday, Friday and Saturday of August (the 19th, 20th and 21st 2010), we'll be hosting our monthly bug hunt. For those of you unfamiliar with the event, each month, we organize the community to help reduce the number of open issues reported against the framework.

Ibuildings techPortal: DPCRadio: Technical Debut

Ibuildings techPortal: DPCRadio: Technical Debut
On the Ibuildings techPortal today they've posted the latest podcast in their DPCRadio series - Elizabeth Naramore's presentation on technical debt.Technical debt is something that most project teams or independent developers have to deal with '" we take shortcuts to push out releases, we don't focus on quality, deadlines need to be met, quick fixes slowly become the standard. Whatever the reason, if we don't manage our technical debt (not unlike financial debt), before too long our applications are...

Autoloading Benchmarks

During the past week, I've been looking at different strategies for autoloading in Zend Framework. I've suspected for some time that our class loading strategy might be one source of performance degradation, and wanted to research some different approaches, and compare performance. In this post, I'll outline the approaches I've tried, the benchmarking stategy I applied, and the results of benchmarking each approach. Continue reading "Autoloading Benchmarks"

Matthew Weier O'Phinney talks about "Autoloading Benchmarks"

Matthew Weier O'Phinney talks about "Autoloading Benchmarks"
If you know Matthew Weier O'Phinney (MWOP) then you have probably already read this post. If you don't know him, click on in and I'll give you the low-down.

SitePoint PHP Blog: How to Upload Large Files in PHP

SitePoint PHP Blog: How to Upload Large Files in PHP
On the SitePoint PHP blog today Craig Buckler talks about uploading large files in your PHP application. He points to two other resources - this manual page and this introductory tutorial about handling file uploads to get the ball rolling.One of the most popular uses is image uploads. Your users can submit photographs from a form without resorting to FTP or other convoluted methods. HTML5 and Flash also permit drag and drop, so the operation is likely to become easier as browsers evolve. This is where...

Community News: Latest PECL Releases for 08.17.2010

Community News: Latest PECL Releases for 08.17.2010
Latest PECL Releases: mysqlnd_uh 0.1.0a1 imagick 3.0.1RC1 stomp 1.0.2 timezonedb 2010.11 timezonedb 2010.12

How to Upload Large Files in PHP

How to Upload Large Files in PHP
Uploading a file from a web form in PHP is easy. The online manual provides a Handling File Uploads section, and there are several articles on sitepoint.com, including How To Handle File Uploads With PHP by Kevin Yank. One of the most popular uses is image uploads. Your users can submit photographs from a form without resorting to FTP or other convoluted methods. html5 and Flash also permit drag and drop, so the operation is likely to become easier as browsers evolve. This is where the problems can...

Facebook Engineering Blog: HipHop for PHP: six months later

Facebook Engineering Blog: HipHop for PHP: six months later
On the Facebook Engineering blog there's a new post summarizing the last six months since they released the HipHop tool for PHP along with some of the stats from the time.Since February, the team has made HipHop another 1.8 times faster and all of that code is open source. We've also seen improvements to PHP itself with the additions to PHP's trunk in April being about 10% faster than 5.3.They talk about projects they've worked with (including Drupal and WordPress), community contributions, a first use...

Daniel Jensen's Blog: Database gearman worker in PHP example

Daniel Jensen's Blog: Database gearman worker in PHP example
Daniel Jensen has a new post about using Gearman to do some simple database inserts asynchronously.If you need to do a lot of inserts in your DB with a certain line of order they should be carried out in or with a clean-up script following after the inserts and you don't have to wait for a reply from MySQL, the answer to that problem might be this worker written in PHP for Gearman as an interface for your DB. A MySQL crash or a worker crash will have no impact on your inserts because they will just stay...

Justin Ireland's Blog: Real-Time Embedded User Interfaces Using HTML/CSS/js and Websockets

Justin Ireland's Blog: Real-Time Embedded User Interfaces Using HTML/CSS/js and Websockets
Justin Ireland has posted an article to his blog about creating real-time interfaces for your sites using the combination of HTML, CSS and Javascript to connect to a physical interface on the backend.Physical interfaces such as button panels or remote controls have many disadvantages. Panel controls require a dedicated display for feedback and physical access to a fixed location. IR remote controls offer only one-way communication with limited feedback and can become difficult to manage for multiple...

Bradley Holt's Blog: PHP Users Group Survey

Bradley Holt's Blog: PHP Users Group Survey
In this new post Bradley Holt shares some of the results he found in questioning his local user group about why they would get involved with the user group.This was certainly not a scientific survey and there were only 16 responses, but it still offers some insight that can be useful in planning user group activities. Here are the top reasons...The reasons included things like "learning from peers", "meet the experts" and "finding job opportunities". He graphed the results showing that learning from...

Lorna Mitchell's Blog: CodeigniterCon 2010

Lorna Mitchell's Blog: CodeigniterCon 2010
Lorna Mitchell recently attended the cicon2010 conference in Bristol (a CodeIgniter-centric event) and has written up a summary of her time there.I spent the weekend in Bristol so I could attend cicon2010 - a volunteer-organised first-edition conference around the CodeIgniter PHP Framework. [...] I saw two talks, both of which were actually really good, which is pretty impressive when you're going on stage to a rather fed up audience! Kudos to Kevin Prince and Joel Gascoigne for their talks.She also...

Matthew Turland's Blog: A Few Kinks in FilterIterator

Matthew Turland's Blog: A Few Kinks in FilterIterator
In this quick post to his blog Matthew Turland shares a "kink" he found in using the FilterIteractor SPL iterator when working with the Phergie project's code.Once I discovered the segfault [from the FilterIterator code], I had to come up with a short code sample exposing the bug in order to report it.He talks about the bug that led him to the segfault and a second bug that was a side effect of the first causing the first element to be skipped during iteration.

Jani Hartikainen's Blog: Exceptions and abstraction

Jani Hartikainen's Blog: Exceptions and abstraction
Jani Hartikainen has a few suggestions on how to handle exceptions in your application - more specifically how to handle them in your classes and still keep proper abstraction.So you already know how to handle your errors properly. Even if you're already using exceptions, there are some nuances to the use of exceptions that are important to know and understand in order to write code that is easier to reuse and more decoupled. Let's talk about exceptions and how they relate to your classes and...

Applying FilterIterator to Directory Iteration

I'm currently doing research and prototyping for autoloading alternatives in Zend Framework 2.0. One approach I'm looking at involves creating explicit class/file maps; these tend to be much faster than using the include_path, but do require some additional setup. My algorithm for generating the maps was absurdly simple: Scan the filesystem for PHP files If the file does not contain an interface, class, or abstract class, skip it. If it does, get its declared namespace and classname...

PHPUnit 3.5: Less $this Required

PHPUnit 3.5: Less $this Required
Over the years, I have gotten quite a few "complaints" from PHPUnit users that they do not like typing $this- as often as they have...

PEAR Blog: PEAR in August

PEAR Blog: PEAR in August
On the PEAR blog there's a new post updating you on some of the happenings with the PHP packaging tool recently.We've been fairly quiet, launching pear2 and pyrus into the line up, welcoming new faces to the QA team, Jesus Espino, and getting ready to call an election for the new pear group.They also mention several package releases (including updates to Net_DNS and Services_Twitter) and a call for contributions from anyone out there by working on deprecated code, unit tests or even just bug reports.

MySQLnd Plugins: Writing a MySQL Query Logger in PHP

MySQLnd Plugins: Writing a MySQL Query Logger in PHP
During the development of an application, not all time is spent on writing code. A lot of time is spent on reading debug output, crawling through log files and firing up the debugger to figure out what the application does. While the debugger helps us to inspect details of a running application on a testing environment, logfiles are often the only indication of the origin of an error on a production system. In this blogpost I want to describe how to log SQL statements on an existing application...