PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

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

Tom Oram's Blog: Unit testing a Zend Framework 2 Controller

Tom Oram's Blog: Unit testing a Zend Framework 2 Controller
In this recent post Tom Oram looks at a method he's put together for unit testing a controller in a Zend Framework v2-based application (using PHPUnit).So far I've got a basic Zend Framework 2 Application up and running and got PHPUnit running & testing one of my models. Next up I wanted to try and workout how to test a controller. I had come to the conclusion that what I needed to do was create an instance of my controller in an environment where it I could get it to run each action I wanted to test.He...

OOP vs Procedural Code

OOP vs Procedural Code
This morning I was asked a question that took me by surprise: "Your examples for PasswordLib are in OOP style, how do I write it in procedural style"... This took me by surprise, because the examples actually are in a procedural style. So I felt that I should write a post about the real differences between OOP and Procedural coding styles. Hint: whether you use classes and objects or not has very little to do with the answer...Read more A

Phil Sturgeon's Blog: PHP: Ecosystem Update

Phil Sturgeon's Blog: PHP: Ecosystem Update
In this new post Phil Sturgeon looks at two movements in the PHP community that are doing positive things for the language and the community as a whole - the Framework Interoperability Group (PHP-FIG) and the more recent "PHP The Right Way" initiative.Don't worry guys, this isn't another PHP apologist or PHP hater blog. We've all had enough of those recently. This is a quick heads up on two projects that are doing what they can to make the PHP ecosystem a better place.He talks a bit about some of the...

Stefan Koopmanschap's Blog: PHPNW12: You should be there, and someone can be there

Stefan Koopmanschap's Blog: PHPNW12: You should be there, and someone can be there
Stefan Koopmanschap, a speaker at the upcoming PHP North West Conference (in Manchester, UK the first part of October) is doing something interesting with a ticket he purchased - he's giving it back to the community and is taking nominations for the recipients.It all started last year: I decided I wanted to go to PHPNW even if I wasn't accepted as a speaker. Being Dutch, I made sure to purchase my ticket for the conference during the blind bird period to save some money. But then I got accepted as a...

Community News: Latest Releases from PHPClasses.org

Community News: Latest Releases from PHPClasses.org
CSS One Session in MySQL Variable Check Quickly Connect Local Data PHP Pwinty WSDL To PHP

PHPNW12: You should be there, and someone can be there

PHPNW12: You should be there, and someone can be there
It's no secret that I like the PHPNorthWest Conference. It's no secret that I think it is the best PHP conference in the world. If you have some kind of opportunity to make it to Manchester for PHPNW, you should. I'm not joking. You should. As always, I submitted some talks and I'm happy to be accepted again. Being accepted as a speaker also allows me to help someone else go to PHPNW.

DZone.com: All debugging and no testing makes the PHP programmer a dull boy

DZone.com: All debugging and no testing makes the PHP programmer a dull boy
In this new post on DZone.com, Giorgio Sironi suggests that "all debugging and no testing" in your development practices can be more difficult in the long run.By now you have already understood that I would always proposed automated end-to-end and unit tests as a way to substitute much of debugging. End-to-end tests can serve only to discover that a bug exists, while a unit test's job is instead to tell you exactly where the problem is.He advocates testing because it fits two needs - it's repeatable (a...

PHPMaster.com: Using WampServer for Local Development

PHPMaster.com: Using WampServer for Local Development
PHPMaster.com has a new tutorial posted today about doing development locally with the help of a WampServer installed on your Windows system (there's similar packages for OSX and Linux systems).This article will explain how a development system solves such a problem and how to install the popular Windows-based web development platform WAMP. As a relative newcomer to the PHP language, I hope this article speaks directly to other new programmers who are interested in honing their development skills to...

Voices of the ElePHPant Podcast: Interview with Elizabeth Smith

Voices of the ElePHPant Podcast: Interview with Elizabeth Smith
The Voices of the ElePHPant podcast has release their latest interview with a member of the PHP community - a chat with Elizabeth Smith of PECL and PHP on Windows fame (as well as one of the originators of the PHP Mentoring project).Cal's questions for Elizabeth revolve around her speaking/community involvement and some of the work she's currently doing: Tell us some about your current involvement in the PHP community Why don't you tell us some about PHP on the desktop (PHP-GTK) Talk about the work...

Nikita Popov's Blog: A plea for less (XML) configuration files

Nikita Popov's Blog: A plea for less (XML) configuration files
Nikita Popov has posted a plea to developers and project maintainers alike to stop using XML for their configuration files in their PHP-based applications.I recently tried using Phing (a PHP build system) to do some simple release automation. Just creating a PEAR package and doing a few string replacements here and there. The result? After several wasted hours I ended up using Phing only for PEAR packaging and doing everything else in a custom PHP build script. The reason? Phing uses XML files to...

Community News: PHP, The Right Way Site Launches

Community News: PHP, The Right Way Site Launches
In response to some of the recent talk about the quality of PHP and some of the recent suggestions about the right and wrong ways to write PHP, the PHP The Right Way site has been lunched.There's a lot of bad information on the Web (I'm looking at you, W3Schools) that leads new PHP users astray, propagating bad practices and bad code. This must stop. PHP: The Right Way is an easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative tutorials around the...

Community News: Latest PECL Releases for 07.10.2012

Community News: Latest PECL Releases for 07.10.2012
Latest PECL Releases: lzf 1.6.2 eio 1.1.0 lzf 1.6.1 AOP 0.1.0 CUBRID 8.4.1.0004

PHP's Magic __invoke() Method and the Callable Typehint

PHP's Magic __invoke() Method and the Callable Typehint
PHP has a variety of magic methods; methods named with two underscores at the start, which get called automatically when a particular event happens. In PHP 5.3, a new magic method was added: __invoke(). __invoke() The __invoke() method gets called when the object is called as a function. When you declare it, you say which arguments it should expect. Here's a trivially simple example: A class Butterfly { public function __invoke() { echo "flutter"; } } We can instantiate a Butterfly object, and then...

What PHP 5.5 might look like

What PHP 5.5 might look like
PHP 5.4 was released just four months ago, so it probably is a bit too early to look at the next PHP version. Still I'd like to give all the people who aren't following the internals mailing list a small sneak peak at what PHP 5.5 might look like. But be sure to understand this: PHP 5.5 is in an early development stage, so nobody knows how the end result will look like. All I am talking about here are proposals. I'm pretty sure that not all of the things listed below will go into PHP 5.5, or at least not...

Create.js Update: Documentation, Hackathon, DrupalCon

Create.js Update: Documentation, Hackathon, DrupalCon
Create.js is our take on modern web editing built on semantic technologies and the ideas of Decoupled Content Management. With Create, CMS developers can provide a fresh way for their users to write content on websites, and thanks to the decoupled nature this user interface can be adapted to work on any back-end.There are even some libraries like CreatePHP and VIE-GWT to make this easier. Those wanting to do the integration from scratch can also take a look at Blogsiple our Node.js testbed for...

Interview with Elizabeth Smith

Interview with Elizabeth Smith
Blog:A http://elizabethmariesmith.com/ Twitter:A@auroraeosrose Show Notes: http://mojolive.com http://www.phpwomen.org/ http://gtk.php.net/ http://www.linkedin.com/ Sponsored by: Engine Yard

Anthony Ferrara's Blog: Building A Multi-Version Build System

Anthony Ferrara's Blog: Building A Multi-Version Build System
In this recent post Anthony Ferrara has a new post showing how he created a multi-version build system to make working with multiple PHP installs (different versions) simpler....with the help of Jenkins.I've been using Jenkins to manage builds of my projects for a while now. This was fine for a while, but now that my projects need to support multiple versions of PHP, it left something to be desired. I wanted a system that could build against multiple versions of PHP. And more so, I wanted to be able to...

Symfony Blog: Symfony2 Components as standalone Packages

Symfony Blog: Symfony2 Components as standalone Packages
On the Symfony blog there's a recent post talking about the availability of the SF2 packages as standalone components available for separate downloads.Each Symfony Component has been available as a standalone "package" for a very long time, but this is the first time I post something about this on this blog. That's because the way it was done was quite experimental... until recently. Why is it useful? Let's say you have a project that does not use Symfony, the full-stack framework, but you still want to...

NetTuts.com: An Introduction to Views & Templating in CodeIgniter

NetTuts.com: An Introduction to Views & Templating in CodeIgniter
NetTuts.com has a new tutorial that will interest the CodeIgniter developers out there about using views and templates in your CI applications.Views are a key ingredient in any MVC application, and CodeIgniter applications aren't any different. Today, we're going to learn what a view is, and discover how they can be used to create a templating solution for your CodeIgniter projects. The first part of this tutorial will educate complete beginners to CodeIgniter on what a view is, and how to use them in a...

PHPMaster.com: Master Dynamic Content with WordPress Shortcodes

PHPMaster.com: Master Dynamic Content with WordPress Shortcodes
On PHPMaster.com today there's a new tutorial for the WordPress users out there looking to work with dynamic content and shortcodes to make your site easier to use and to bring more content to user's attention.The advantages to using shortcodes are obvious. First and foremost, it allows page designs to become far more unique. It also relieves the website administrator from having to create a large list of custom fields in order to perform basic content insertion. [...] And, finally, shortcodes allow a...