On PHPBuilder.com today Jason Gilmore has a new tutorial showing how to create voice recognition applications with PHP and the help of open source voice interpretation tools.Voice recognition or speech recognition technology is not easy to develop. In-house development would be very costly, and buying proprietary libraries that convert voice to text would make the developed application very expensive for end users. On the other hand, when developing in PHP, you have many open-source solutions available....
On the Ibuildings techPortal today they've posted the latest episode in their DPC Radio series as recorded at the last Dutch PHP Conference. In this new episode they share a session from Tobias Schlitt called "Advanced OO Patterns".You already know Singleton, Signal/Observer, Factory and friends. But, which object oriented patterns are en vogue in the PHP world and how can you seize their power? This talk gives you an overview on Dependency Injection, Data Mapper and more OO patterns the PHP world talks...
MySQL DB Lib
PHP Zeitgeist 2011
By Manuel Lemos
The PHP Zeitgeist is an initiative that allows us to understand what were some of the main new trends and concerns of the PHP developers in the past year.
Read this article to learn about what new things PHP developers have been searching more in 2011 and what are their needs that probably still need to be fulfilled.
In this new post to PHPMaster.com today Ahmed Shreef continues on from his previous introduction to MongoDB and gets into more detail on things like cursors, query operators, queries on embedded documents and the sort/skip methods.In my previous article Introduction to MongoDB I discussed installing Mongo, its PHP extension, and how to perform simple insert and find operations. Of course there are many, many more features than what I mentioned so I wanted to write another article to show you some of...
Brian Moon has a reminder about date handling in PHP - days are not always 86400 seconds long, sometimes there's "leap seconds" included too. Thankfully, there's easy ways around it:The problem with this is that it assume that there are only 86400 seconds in every day. There are in fact not. On days when the clocks change for daylight savings time, there are either 1 hour more than that or 1 hour less than that. In addition, there are also leap seconds put into our time system to keep us in line with the...
Stuart Herbert has two new posts to his blog showing how to use the ContractLib tool he's created to define programming "contracts". In the first he shows some sample usage of the tool and in the second he compares the functionality of ContractLib's features and PHP's own "assert" method.ContractLib is a simple-to-use PHP component for easily enforcing programming contracts throughout your PHP components. These programming contracts can go a long way to helping you, and the users of your components,...
Fabien Potencier has posted the eighth part in his "building a framework on Symfony2 components" series. So far he's created a full-featured microframework with routing, controllers, HTTP handling and namespaced code. In this latest part he improves the sample framework by adding some unit tests.
Some watchful readers pointed out some subtle but nonetheless important bugs in the framework we have built yesterday. When creating a framework, you must be sure that it behaves as advertised. If not, all the...
Gonzalo Ayuso has a new post to his blog today looking at the performance of PHP exceptions and how it could effect your application's overall speed.Sometimes we use exceptions to manage the flow of our scripts. I imagine that the use of exceptions must have a performance lack. Because of that I will perform a small benchmark to test the performance of one simple script throwing exceptions and without them.His (little) benchmarking scripts are included - both looping 100000 times, one throwing an...
Latest PECL Releases:
Some watchful readers pointed out some subtle but nonetheless important bugs
in the framework we have built yesterday. When creating a framework, you must
be sure that it behaves as advertised. If not, all the applications based on
it will exhibit the same bugs. The good news is that whenever you fix a bug,
you are fixing a bunch of applications too.
Today's mission is to write unit tests for the framework we have created by
using PHPUnit. Create a PHPUnit configuration file in...
One of the questions I've been asked after yesterday's blog post about Phix's ContractLib is why not just use PHP's built-in assert() function? I think it's a great question, and the best way to answer it is to take a look at the key differences between two solutions.
Side By Side Comparison
PHP extension written in C (ships as standard part of PHP)
PHP library written in PHP
Enable / disable execution
Partial (there is an overhead when disabled, but it's low)...
This just came up today again for me. I have said it before, but even I get lazy and forget. When doing math with dates such as adding days it is really quick to think this works:
$date = "2011-11-01";
// add 15 days
$new_date = date("Y-m-d", strtotime($date) + (86400 * 15));
// $new_date should be 2011-11-16 right?
This yields `2011-11-15`. The problem with this is that it assume that there are only 86400 seconds in every day. There are in fact not. On days when the clocks...
Larry Garfield has posted the results of some of his research into popular PHP frameworks and projects and see how they handle their structure as it relates to the PSR-0 standard.As Drupal is in the process of considering how to restructure code to best leverage the PSR-0 standard, I figured it would be wise to take a quick survey of how some other major projects organize their code bases. This is not a complete rundown of every project, simply roughly comparable notes for those areas Drupal is currently...
On Developer Drive today there's a new post (the first in a series) from Gerald Hanks about building an ad tracker in PHP. In this first part he sets up some of the background - the database that will hold the tracker information.Banner ads for services related to the web site owner's industry allow customers to view products that tie into the site owner's core business. In exchange, the web site owner can charge the banner ad owner for every impression (banner ad appearance) or click-through (when a...
On 7php.com there's a new interview posted with Enrico Zimual of Zend - "Everything is an Array in PHP".In this edition, I talked with Enrico Zimuel a computer geek since he was 9yrs old. He has written a couple of books namely "Secrets, Spies and Cipher Codes" published by Apogeo in 1999 and the recent "How to use the digital sign" published by Tecniche Nuove in 2010. Enrico has a pretty impressive 'geek' path. He also speaks at many international conferences [...]. You can find his presentations on...
In a response to a recent post on DZone.com about the "Open/Closed Principle" Josh Adell has posted an example of a " flexible and extendable command invocation solution" implementing this SOLID idea.Let's overcome some of these issues [with only being able to extend the invoker class and that the invoker needs to know how to create commands], and also make the code even more extensible. I'll use a simplified command invoker to demonstrate.His code is included - the creation of a "Command" interface and...
Davey Shafik has posted about an interesting find with closures in PHP revolving around an update to add "$this" access inside the closure.However, it didn't stop there; there was also the addition of Closure::bind() and Closure-bindTo(). These methods are identical except one is a static method into which the closure is passed, the second an instance method on the closure itself. These methods both take two arguments (on top of the closure for the static version): $newthis and $newscope. What this means...
Fabien Potencier has posted the seventh part of his series looking at how to make a custom framework on top of the components from the Symfony2 framework. In this part of the series he improves his basic framework by adding some namespacing to organize the application a bit more.If you have a closer look at the code, front.php has one input, the Request, and one output, the Response. Our framework class will follow this simple principle: the logic is about creating the Response associated with a Request....
Latest PEAR Releases: