As is mentioned in this new post to PHPMaster.com, the PHP standards group is officially in the voting process on two new standards (PSR-0 being the first) setting up some standard development practices for PHP applications - PSR-1 and PSR-2.They initially started out as one proposal but the initial round of voting didn't yield a majority in favor. Participants did however see merit in various requirements the decision was made to split it into 2 proposals - one for mandatory interoperability and one for...
Derick Rethans has a new post to his site today about MongoDB cursors in PHP when using the PHP driver and how it handles pulling data from the server.Recently I was asked to improve the MongoCursor::batchSize documentation. This began an indepth investigation in how the PHP driver for MongoDB handles pulling data that's been queried from the MongoDB server. Here are my findings.He talks about the cursor that's created when a "find" call is made and how you can add on additional options (via other...
The Voices of the ElePHPant podcast has released their latest episode, an interview with a member of the Los Angeles PHP community, Joe Devon.Cal's "three questions"
What is "Global Accessibility Awareness Day" and how did it turn out?
Tell us the good and bad parts about selecting talks for a conference.
Tell us what you're doing as an independent developer and what advice do you have for someone wanting to go out on their own?
You can listen to this latest episode either via the in-page player, by...
In this new post to his blog Till Klampaeckel shares a Zend Framework "base" controller that makes it easier to do the usual CRUD (Create, Read, Update, Delete) operations in an application.I think it took me (or us) a couple attempts to get this right - let me introduce you to Zf_Crud, a CRUD controller for the Zend Framework. [...] Zf_Crud aims to provide you with an interface for any table possible - think of it as a phpMyAdmin more tailored towards your data and (thanks to Twitter Bootstrap and the...
On the MaltBlue.com blog they've posted the latest part of their series on using Zend_Config configuration files to create Zend_Form elements. In this latest article, they show how to set some of the other properties on the elements (like "readonly" or "required").We've looked at custom form filters and we've looked at the core form configuration. But what about the other form properties? What about: setting an element as readonly, an element as required, ignoring an element and love them or hate them,...
On PHPMaster.com today they've posted the second part of the series covering the Iterators that come with PHP as a part of the SPL.In part one of this series I introduced you to some of the SPL Iterators and how to use them. There may be times however when the provided iterators are insufficient for your needs and you'll want to roll your own custom iterator. Luckily, SPL provides interfaces that will allow you to do just that. For an object to be traversable in a foreach loop, PHP requires that it be an...
Latest PECL Releases:
MongoDB Cursors with PHP
Tuesday, May 22nd 2012, 09:15 BST
Recently I was asked to improve the MongoCursor::batchSize documentation. This began an indepth investigation in how the PHP driver for MongoDB handles pulling data that's been queried from the MongoDB server. Here are my findings.
A MongoCursor is created as soon as you run the find() method on a MongoCollection object, like in:
$m = new Mongo();
$collection = $m-demoDb-demoCollection;
$cursor = $collection-find();
Like every product, Natural Load Testing needs to send some mail, having written and re-written a bunch of different blocks of mail code over the years, I wanted to come up with something that would work now, and continue to serve us well into the future.
Send multipart/mime mail, so the emails can look a€omore officiala€ť than plain text for the average customer. Users reading mail in plain text still get something nice.
Easy to send a custom email with a block or two of text in...
Sean Coates has posted a reminder for PHP developers (and really anyone executing command-line scripts) to use "env" instead of hard-coding the path to the PHP interpreter.These [support] scripts often run PHP in Gimme Bar land, and we make extensive use of the shebang syntax that uses common Unix practice of putting #!/path/to/interpreter at the beginning of our command-line code. Clearly, this is nothing special -lots of people do exactly this same thing with PHP scripts. One thing I have noticed,...
I think it took me (or us) a couple attempts to get this right - let me introduce you to Zf_Crud, a CRUD controller for the Zend Framework.
What's CRUD?CRUD is an acronym and stands for:
A general purpose for CRUD are administrative interfaces - view records, create them, update them or delete them. Think of phpMyAdmin as a very general purpose CRUD interface. One you need some SQL-fu for.
In my experience, such interfaces are most likely or often the very last item on a...
In this quick post to his blog, Mike Purcell mentions the deprecation of the "assertType" assertion and includes some code you can add to correct the issue in your tests.We recently upgraded phpunit from a very old version to the current 3.6.x version (at time of writing). During the upgrade I noticed that assertType is no longer supported in many of our tests which were testing if something was a string, an array, or an object. So I had to write a quick script to update assertType to assertInternalType...
We use quite a few technologies to build our products, but Gimme Bar is still primarily a PHP app.
To support these apps, we have a number of command-line scripts that handle maintenance tasks, cron jobs, data migration jobs, data processing workers, etc.These scripts often run PHP in Gimme Bar land, and we make extensive use of the shebang syntax that uses common Unix practice of putting #!/path/to/interpreter at the beginning of our command-line code. Clearly, this is nothing special-lots of people do...
PHPMaster.com has posted the latest tutorial in their series covering RESTful APIS - part four of "REST - Can you do More than Spell it?" In this latest part of the series, they focus on something very key to RESTful services, the HTTP spec (and headers).We're getting close to the end now, and the only thing remaining is to discuss a little more about the protocol you'll most likely use in any RESTful application that you write. Because HTTP is so often used with REST, that's the protocol I'd like to...
Latest PEAR Releases:
JsDay directly started with a mindblowing talk by Mark Boas (The slides can be found...
I've recently built a product in Node JS, and it was a very positive experience (more on that in another blog post). I'm now looking around at what I need to do to package it all up for customers and entrepreneurs - hosting, developer meetups, that sort of thing. I'm looking for the wider ecosystem that customers can tap into. I'm a bit surprised at what I found during my research, and I thought I'd share it in case anyone else can add to it.
Why Hosting Matters
Let's not beat about the bush here. As a...
Job postings for the past week:Job Posting: Wikimedia Foundation Seeks Senior Software Developer (San Francisco, CA)
Latest PHP Tweets