PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
Displaying news posts 2021 to 2040 of 6889

View Layers, Database Abstraction, Configuration, Oh, My!

Late last week, the Zend Framework community 2.0.0beta3, the latest iteration of the v2 framework. What have we been busy doing the last couple months? In a nutshell, getting dirty with view layers, database abstraction, and configuration.

View Layers, Database Abstraction, Configuration, Oh, My!

Late last week, the Zend Framework community 2.0.0beta3, the latest iteration of the v2 framework. What have we been busy doing the last couple months? In a nutshell, getting dirty with view layers, database abstraction, and configuration.

How To Find The Right Job

How To Find The Right Job
In my career as a software developer I've been lucky. I've been lucky that finding work has never been terribly difficult. The longest I've ever been out of work is a month and a half. Six weeks might seem like a long time, especially in software; in my case I was unfortunate enough to experience [...]

Build PHP 5.4 on CentOS 6.2

Build PHP 5.4 on CentOS 6.2
In case you haven't heard the news, the PHP project released version 5.4.0 last Thursday. Naturally, I decided it was time to install and give it a try. I chose to install to a clean and bare-bones CentOS 6.2 virtual machine using VirtualBox. I did this for two reasons: 1) I wanted a clean environment for the build, and 2) I wanted to play with CentOS. At the time of this writing, there are not yet any official CentOS RPMs for PHP 5.4, so I had to build PHP from source. What follows are the notes I took...

PHPMaster.com: Type Hinting in PHP

PHPMaster.com: Type Hinting in PHP
On PHPMaster.com today there's a new tutorial posted about using type hinting in your PHP applications to restrict the values passed into your methods.Since PHP 5 you can use type hinting to specify the expected data type of an argument in a function declaration. When you call the function, PHP will check whether or not the arguments are of the specified type. If not, the run-time will raise an error and execution will be halted.Included in the post are code examples showing how to define custom types in...

Rob Allen's Blog: Modules in ZF2

Rob Allen's Blog: Modules in ZF2
In this new post to his blog Rob Allen introduces one of the key concepts in the upcoming version of the Zend Framework (v2) - modules.A Zend Framework 2 application is made up of a number of modules which each contain the controllers, models, views and other support code required to implement a specific part of the application.He covers a few different topics: where modules can be located the directory organization inside them setting up a module of your own (a "bare bones" example) how to use the...

Michael Nitschinger's Blog: Introducing Relationships in Lithium

Michael Nitschinger's Blog: Introducing Relationships in Lithium
In this new post to his blog Michael Nitschinger introduces relationships in using the Lithium framework - functionality to link your models to each other to create dependencies.The model relationship support in Lithium is one of the hottest topics on IRC lately, so I thought it would be a good idea to blog about it. Currently, Lithium supports 1:1 and 1:n relationships for relational databases. [...] This post gives you a little background on relationship types and their database representations before...

Hacking Rails (and GitHub)

Hacking Rails (and GitHub)
Hacker News exploded yesterday with news of GitHub being hacked. Wanting to know what all the fuss was about, I began with GitHub's side of the story: A GitHub user exploited a security vulnerability in the public key update form in order to add his public key to the rails organization. He was then able to push a new file to the project as a demonstration of this vulnerability. As soon as we detected the attack we expunged the unauthorized key and suspended the user. My confidence in the clarity of...

Slawek Lukasiewicz's Blog: New Features in PHP 5.4 - JSON Extension & header_register_callback

Slawek Lukasiewicz's Blog: New Features in PHP 5.4 - JSON Extension & header_register_callback
In the first two posts of his "features new to PHP 5.4" series Slawek Lukasiewicz has posted about two things that weren't mentioned very often in most of the 5.4 hit lists - improvements to the JSON extension and the header_register_callback method.About the JSON extension improvements:By default, when we pass object to json_encode function, it will return JSON representation of object public properties. [...] PHP 5.4 introduces JsonSerializable interface with JsonSerialize abstract method. After...

Josh Adell's Blog: GetSet Methods vs. Public Properties

Josh Adell's Blog: GetSet Methods vs. Public Properties
Josh Adell has a new post to his blog talking about a debate between developers over which is the better method - using public properties or getters and setters to work with values on your objects.I was recently having a debate with a coworker over the utility of writing getter and setter methods for protected properties of classes. On the one hand, having getters and setters seems like additional boilerplate and programming overhead for very little gain. On the other hand, exposing the value properties...

Parameter Type Casting in PHP

Parameter Type Casting in PHP
As any of you who follow the PHP internals list know, scalar type hinting has been a hot topic as of late. AYou'll also know that I've submitted two new RFC (Request For Comment) proposals for inclusion of two new major features in the PHP language. AI figured it was worth going into both RFCs and patches a little deeper, explain my rationale and (hopefully) garner some more visibility of the proposals.Read more A

7php.com: Interview Stuart Herbert - Become a Software Archaeologiest

7php.com: Interview Stuart Herbert - Become a Software Archaeologiest
On the 7php.com site today there's a new interview in their PHP community series, a talk with Stuart Herbert of the Phix project:In this edition I talked with Stuart Herbert (@stuherbert), a highly highly and highly experienced software engineer. His interview is packed with insights and experienced thoughts. Herbert is one of those rare experienced geek who also teaches the principles of T'ai Chi Ch'uan. Stuart has been involved in almost everything out there in the Programming sphere; he's a conference...

Community News: Latest PEAR Releases for 03.05.2012

Community News: Latest PEAR Releases for 03.05.2012
Latest PEAR Releases: File_Gettext 0.4.2 HTML_QuickForm_ElementGrid 0.1.2 HTML_Select 1.3.1 Net_WebFinger 0.2.1 Archive_Tar 1.3.9 Date_Holidays 0.21.6

5.4 is out!

5.4 is out!
Since May 2011 we have worked on releasing PHP 5.4, and now it happened. Thanks everybody who helped with it! PHP 5.4 has some new and exciting features - for some of them, like traits, I have no idea right now how they will work out and what people would do with them. It'd be very interesting to see. For some of them, I feel they are basic common sense and long overdue in PHP (of course, not everybody may share my opinion - like ['short','array','syntax'] or detaching Some things in PHP, as we have...

URL Encoding and Hashbang Hell

URL Encoding and Hashbang Hell
Thanks to reader Steve Gricci, I have learned that BackTweets no longer exists, presumably because BackType was acquired by Twitter. (Regardless, why let the domain expire?) Until today, I have been using BackTweets for the "tweets" link at the top of each post, so anyone who clicked it recently was greeted by a parked Go Daddy page instead of seeing all tweets related to a particular post. Yikes! My quick fix is to use Twitter instead, but their hashbang URLs make it difficult to link directly to...

Logging best practices

Logging best practices
Introduction This document explains some best practices for application error/debug logging. Application logging is an important "tool" to help identifying problems. If done correctly, and if an infrastructure is in place that allows events to be put into context, it's easier to debug situations and thus makes it easier to solve problems sooner. While out of scope for this document, I'd like to point out the following tools that can make that possible: Logstash - http://logstash.net Graylog2 -...

Performance Analysis of isset() vs array_key_exists()

Performance Analysis of isset() vs array_key_exists()
At Confoo I had an interesting conversation with Guilherme Blanco regarding the fact that in Doctrine 2 they had a performance issue due to usage of array_key_exists() and how it was significantly slower than isset(). His anecdotal example was that doing isset() took 0.5 seconds, while array_key_exists() for the same operation took 5 minutes! That seemed wrong, given that array_key_exists() simply does a hash table look-up, to determine if the array key exists and the only speed difference would be...

Jeremy Cook's Blog: Making PHPUnit, Doctrine & MySQL Play Nicely

Jeremy Cook's Blog: Making PHPUnit, Doctrine & MySQL Play Nicely
Jeremy Cook has put together a new post showing how he got PUPUnit, Doctrine and MySQL to "play nicely" together when he was writing up some of his tests in a current application.One of the pain points for me though has been in getting Doctrine setup with PHPUnit for testing. One of the main Doctrine contributors, Benjamin Beberlei, has written a package called DoctrineExtensions which amongst other things adds a class called DoctrineExtensionsPHPUnitOrmTestCase which extends PHPUnit's DbUnit database...

Zend.com: Zend Framework 2.0 Beta 3 Release Gives Developers an Early Start

Zend.com: Zend Framework 2.0 Beta 3 Release Gives Developers an Early Start
In a recent press release from Zend, they talk about some of the latest updates to the Zend Framework 2 project (the release of Beta 3) and what it offers developers:This new revision of the framework is geared towards greater developer productivity and application performance, providing rich support for the leading cloud services and providers, and a streamlined and simple workflow for developing next-generation mobile applications and APIs.[...] Zend Framework 2 highlights [include]: Simpler and easier...

Sebastian Marek's Blog: PHP 5.4 Compatibility Coding Standard for PHP_CodeSniffer

Sebastian Marek's Blog: PHP 5.4 Compatibility Coding Standard for PHP_CodeSniffer
In the wake of the official release of PHP 5.4 Sebastian Marek has made a quick post to his blog about bringing PHP_CodeSniffer rules help bring his code up to date with this latest version.So with PHP 5.3 upgrade underway (and PHP 5.4 out of the door now!) I thought it's time to prepare for PHP 5.4 and make sure we're compatible. So by looking at Wim Godden's PHP53Compatibility code sniffs I have created a base for PHP 5.4 sniffs that we want to use to make sure we're compatible.Sniffs included in set...

Latest PHP Tweets