PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
PhpRiot Latest Blog Posts
Displaying blog posts 1 to 20 of 240

PHP Advent

PHP Advent
Tomorrow is December, which means it's already time for PHP Advent again! Sean and I are busy curating this year's fantastic authors, and if you want to keep up, just follow @phpadvent on Twitter, subscribe to our feed, or visit the site each day. As with years past, everyone involved is very busy. Sean and I are working on Gimme Bar and Mapalong, respectively, and our authors are just as busy. As a result, we'll probably stick to the tradition of not publishing particularly early each day, and barely...

Label Media Blog: Design Patterns in PHP - Strategy Pattern

Label Media Blog: Design Patterns in PHP - Strategy Pattern
On the Label Media blog today Tom Rawcliffe continues his series looking at design patterns (see here for his look at the Factory pattern) with this new post focusing in on the Strategy pattern.The Strategy Pattern is used to decouple an algorithm from the context in which it is used. I'm going to equate this example to a real world scenario starring a man, I'll call him Bob.In his example Bob heads to work and takes whatever way he wants to get there. His boss only cares that he makes it there, not the...

Zend Framework 1.11.1 Released

Zend Framework 1.11.1 Released
The Zend Framework team announces the immediate availability of Zend Framework 1.11.1, our first maintenance release in the 1.11 series. This release includes around 80 bug fixes -- many due to the highly successful bug hunt two weeks ago. You may download ZF 1.11.1 from the Zend Framework site .

OpenSky Blog: Inheritance in PHP, or why you want to use an Interface or an Abstract class...

OpenSky Blog: Inheritance in PHP, or why you want to use an Interface or an Abstract class...
On the OpenSky blog today there's a new post about object oriented development and class structure. More specifically about how you should use interfaces and abstract classes if you want to truly lock down the methods of your classes.Every class has an interface, every class can be typehinted as a method argument, typehint lets you specify the collaborator requirements. Not every typehint is the same.He includes an example of how, despite a "BankAccount" type hint, classes for different types of accounts...

Community News: PHP Unconference Europe 2011

Community News: PHP Unconference Europe 2011
If you're around the Manchester area (or will be in February) you should consider attending the PHP Unconference Europe 2011 happening February 19th and 20th.For the past four years, a group of enthusiasts have been organizing an unconference about PHP and related web technologies in Hamburg, Germany. What started off as a gathering of only fifty people, has grown over the course of three years into an event, which has received much following and attention within the German speaking PHP community. [...]...

Ibuildings techPortal: Using MongoDb in PHP Applications

Ibuildings techPortal: Using MongoDb in PHP Applications
New from the Ibuildings techPortal there's this article from Paul Matthews about using MongoDB in PHP applications. It's an introductory level tutorial that uses the MongoDB extension for PHP to interface with a local database.This tutorial will show you how to incorporate MongoDB into new or existing object-oriented applications, by showing how to interact and integrate with applications and how to deploy applications using MongoDB. [...] If you've implemented MongoDB into many of your systems, then...

Remote pbcopy

Remote pbcopy
I use the command line a lot. I'm sure many of you do, too. I find myself often piping things between processes: $ cat seancoates.com-access_log \ | awk {'print $1'} \ | sort \ | uniq \ | wc -l 627 $ # unique IPs One particularly useful tool on my Mac is the pbcopy utility, which takes standard input and puts it on the pasteboard (this is known as the "clipboard" on some other systems). Its sister application, pbpaste is also useful (it outputs your pasteboard to standard output when your pasteboard...

Christoph Dorn's Blog: FirePHP 1.0 in 5 Steps

Christoph Dorn's Blog: FirePHP 1.0 in 5 Steps
Christoph Dorn, author of the FirePHP tool for interfacing your PHP applications directly with Firebug, has written up a guide to help you get started using the latest version in five easy steps.Get started with FirePHP 1.0 in 5 steps. Why upgrade? Check out the new features.The steps are simple (it's a pretty easy tool to use): Install the FirePHP Companion Install FirePHP Use the sample code to include in an application Authorize the client Log a test message (code snippet included) You can find out...

Community News: Latest PECL Releases for 11.30.2010

Community News: Latest PECL Releases for 11.30.2010
Latest PECL Releases: hidef 0.1.5 inclued 0.1.2

Community News: Call for Papers for PHP UK Conference Ends Tonight at Midnight (GMT)!

Community News: Call for Papers for PHP UK Conference Ends Tonight at Midnight (GMT)!
As a reminder to all of those out there wanting to submit their presentation ideas for consideration in this year's PHP UK Conference 2011, the deadline is tonight!The main attraction of any conference is the talks that are given and we aim to attract the best PHP speakers from around the world. We solicit talks through a call for papers so you, the community, can tell us what kinds of things everyone should be hearing about.Be sure to get those submissions in before midnight GMT tonight or they won't be...

Using MongoDb in PHP Applications

Using MongoDb in PHP Applications
After recently attending the MongoUK conference in London, it is clear that MongoDB is fast finding application amongst cutting-edge web developers. As a relatively new concept for persistence, NoSQL (Not Only SQL) and more specifically document-oriented databases, such as MongoDB, are starting to enter the web applications landscape. Its strength lies in speed and ability to cope with dynamic data, making its goals align closely with requirements of many websites around today. This tutorial will show...

PHPUnconference Comes to Manchester

PHPUnconference Comes to Manchester
I'm very excited to hear that the PHPUnConference Europe (@phpuceu on twitter) is coming to Manchester on February 19th and 20th! So excited, in fact, that I've rushed out and bought my ticket (for a whole A40, that's a good investment in my opinion). The event brings together the PHP community from across Europe to an unconference where the speakers are the presenters, and really anything goes! A great feature is the contributions and interests section - if there's some content that would be...

Till Klampaeckel's Blog: Tracking PHP errors

Till Klampaeckel's Blog: Tracking PHP errors
Till Klampaeckel has put together this new post looking at the track_errors ini option (that will always put the latest error message in $phperrormsg) and how it can help you more efficiently handle the errors your application throws.track_errors provides the means to catch an error message emitted from PHP. It's something I like to use during the development of various applications, or to get a handle on legacy code. Here are a few examples why!He gives the example of a failed file_get_contents that...

Lorna Mitchell's Blog: 3 Ways to Access a Namespaced PHP Class

Lorna Mitchell's Blog: 3 Ways to Access a Namespaced PHP Class
Lorna Mitchell has posted three different ways you can use to get access to a namespaced class in a PHP 5.3 application, all useful depending on where you are in the application and your needs.After what felt like years of debate over the notation to use for PHP's namespaces, it seems like the feature itself has had relatively little use or attention since it was actually implemented in PHP 5.3. We're all used to working without it but using it does make code neater.Her three options are: Refer Namespace...

Keith Casey's Blog: CodeWords 2010 Recap

Keith Casey's Blog: CodeWords 2010 Recap
In a new post to his blog Keith Casey, a speaker on the CodeWorks conference tour, has recapped some of his experiences as a part of the five city tour.Approximately 10 days ago, I finished the 2010 CodeWorks Tour. This time around with 4 speakers hitting 5 cities, it was smaller, more compact, and generally a little more intimate of an experience. Due to the odd nature of this one, I'm going to skip my usual "Good, Bad, Ugly" conference review format and go straight to some highs & lows.He breaks it up...

Rob Allen's Blog: Local config files and Zend_Application

Rob Allen's Blog: Local config files and Zend_Application
Rob Allen has a new post today showing you how to load in your own local configuration files into a Zend_Application Zend Framework app.A friend of mine recently had a requirement where she wanted to have two config files loaded into Zend_Application, so that the specific settings for the server were not stored in the version control system. Hence she has two config files: application.ini and local.ini where local.ini is different on each server. The easiest way to approach this problem is to load the...

Gonzalo Ayuso's Blog: Protect files within public folders with mod_rewrite and PHP

Gonzalo Ayuso's Blog: Protect files within public folders with mod_rewrite and PHP
Gonzalo Ayuso has a new post that can help you protect certain files inside of a public folder by combining mod_rewrite and PHP.Here's the problem. We have a legacy application (or a WordPress blog for the example) and we want to protect the access to the application according to our corporate single sign on. We can create a plug-in in WordPress to ensure only our single sign-on's session cookie is activated.In his example, he shows the handling of an uploaded file and a plugin that can be used to...

Satya Prakash's Blog: PHP is not Java

Satya Prakash's Blog: PHP is not Java
On the Web Scripting Blog today, Satya Prakash has a reminder for developers and those hiring them alike - PHP is not Java.I went for Interview and there interviewer asked me few questions. I disagreed on two questions and their answers. [...] After I disagreed [about parentheses being required on class creation] they said it is essential in new PHP version 5.2.x. Still I disagreed then he said, no no after PHP 5.2.x, PHP is like Java. [...] I like PHP and I do not want it to become Java. If just by...

Community News: Latest PEAR Releases for 11.29.2010

Community News: Latest PEAR Releases for 11.29.2010
Latest PEAR Releases: Net_IPv6 1.2.1b

3 Ways to Access a Namespaced PHP Class

3 Ways to Access a Namespaced PHP Class
After what felt like years of debate over the notation to use for PHP's namespaces, it seems like the feature itself has had relatively little use or attention since it was actually implemented in PHP 5.3. We're all used to working without it but using it does make code neater. Take this example (in a file called namespaced-class.php) namespace Christmas\DaysOf;A class PartridgeInAPearTree{ }A Now we have a few ways to access that class. Refer Namespace and Class Name The simplest way to access a...