- Will iPads Replace TV Screens in NYC Taxis?
- Do Students Understand the Material? A New App Helps Teachers Know For Sure
- What Is Anonymous?
- "Thinking Cities" - Ericsson’s vision of a networked society expands with
- Massive information dump by Anonymous on hundreds of cops, including a ‘pedo cop’ @CabinCr3w @ItsKahuna
PHPDeveloper.org
Community News: The Great Web Framework Shootout
Seth Davis has put together a github repository with some benchmarking for some of the most common web frameworks - both PHP and not. His statistic is "requests per second" in a few scenarios: a "hello world" string test, a test with a database connection and one with a templated response.
It should also be noted that my goal here was not necessarily to figure out how fast each framework could perform at its most optimized configuration (although built-in caching and other performance tweaks were usually enabled if the default configuration permitted it), but rather to see what a minimal "out-of-the-box" experience would look like.Current results (as summed up in the current README) are for frameworks that include:
- Pyramid (Python)
- Django (Python)
- Sinatra (Ruby)
- CodeIgniter (PHP)
- Yii (PHP)
- Symfony (PHP)
Marcelo Gornstein's Blog: Sniffing in PHP using libpcap: Thank you SWIG!
Marcelo Gornstein has posted a new article showing how to use SWIG and libpcap to sniff packets from the network directly from his PHP application.
I've been wanting to try SWIG for a long time, but never got the chance, for one thing or the other. So this weekend I've finally decided to give it a try by trying to create a php extension that access a small C++ wrapper for libpcap, so I can sniff packets directly from PHP. Just for fun (and actually because I couldn't find any active pecl extension to use libpcap, so it might as well be something useful). I've named it "SimplePcap".He includes both the sample code showing the extension's usage and an example of the output from his local "eth0" device. His PHP script uses SWIG to interface with the pcap_t/Packet class structure via this interface file and typemap.
SWIG is really great. I just did some C++ code and then worried about how to integrate it to PHP. Althought it seems that you really need lots of experience with it to actually do more advanced things in the right way. [...] So I guess that sometimes it's more productive to just make the PHP extension than using SWIG. But if you want your code to be run in many languages, this is definitely an excellent library to try!PHPMaster.com: Creating Web Services with PHP and SOAP, Part 1
On PHPMaster.com today there's a new tutorial posted, the first part in a series, showing how to create SOAP web services with the help of the NuSOAP library.
In this first of a two part series on web services I'll talk about the SOAP specification and what is involved in creating SOAP messages. I'll also demonstrate how to create a SOAP server and client using the excellent NuSOAP library to illustrate the flow of SOAP. In the second part I'll talk about the importance of WSDL files, how you can easily generate them with NuSOAP as well, and how a client may use a WSDL file to better understand your web service.He introduces you to the concepts behind SOAP, the normal structure of a SOAP-formatted XML message and what an example might look like for fetching a stock price from a remote service. He then shows how to use NuSOAP to create both a simple server and client to pull information about books - sample code and a screenshot of the output is included.
Voices of the ElePHPant: Interview with Matthew Weier O'Phinney
On the Voices of the ElePHPant podcast today Cal Evans has posted the latest interview with a member of the PHP community. This time it's Matthew Weier O'Phinney, lead on the Zend Framework project.
Cal's "three questions" for Matthew were:
- Since Zend Framework is the opposite of the ideals behind the Micro PHP Manifesto, what are your thoughts on it?
- Zend Framework 2 is close but not done - should a new project go with v1 or v2?
- What's your local user group and it's URL (hint: there's not one yet)
You can listen to this latest episode either via the in-page player, by downloading it directly or by subscribing to their feed.
Community News: Latest PECL Releases for 02.21.2012
Nelm.io Blog: An Update On Composer
On the Nelm.io blog today there's an update about Composer, the PHP package manager that's been steadily growing in popularity over the last few months.
This weekend we have been busy hacking on Composer in our office together with Nils Adermann and Volker Dusch. We wanted to push the project forward a bit faster than the odd free evenings usually allow, and I would now like to introduce the changes we made.Their updates include mentions of:
- Changes to the "dev" version handling
- Major bugfixing in the dependency resolver
- More project documentation
- GitHub integration with Packagist (allowing you to directly update the Packagist site when you push a new version)
- A cleanup on the repository creation process (see here)
PHPMaster.com: WordPress Plugin Development
On PHPMaster.com today there's a new tutorial showing how you can create a custom WordPress plugin for the popular PHP-based blogging/CMS tool.
If you've ever used WordPress to build a site quickly, chances are you've used one of the many plugins that are offered to extend the functionality of this popular blogging software. Plugins are one of the many things that make WordPress so attractive. [...] There are times, however, when you can't quite find what you need from existing plugins. This article will show you how to create your own WordPress plugins by walking you through an example to display some text using a widget in a the sidebar.He walks you through all of the steps you'll need to create the plugin - making the main plugin file (definition) and using some of the methods available to create the functionality: update, form, widget and the constructor to set it all up.
Rob Allen's Blog: What problem does dependency injection solve?
In his latest post Rob Allen seeks to answer the question "what problem does dependency injection solve?":
Zend Framework 2 comes with a dependency injection container (DIC), as does Symfony 2 and Aura, along with many other PHP frameworks that target PHP 5.3 or hight nowadays. This article attempts to explore the problem that a DIC tries to solve.He gives an example (somewhat based on the same structure of his Zend Framework tutorial) showing how you could use DI to inject the Artist object into the Album object. This allows for more flexibility if more Artist types are added (extending the main Artist, of course). His second example shows how to use a DIC to hold album information.
7php.com: Interview with Chris Hartjes - The "Grumpy Programmer" of the PHP Community
7php.com has posted their latest interview with a member of the PHP community - Chris Hartjes, the "grumpy programmer".
In this edition I talked with Chris Hartjes (@grmpyprogrammer), the co-organizer of the GTA PHP User Group (@gtaphp). Chris is a real Grumpy PHP Programmer! But grumpy in a very positive sense though. He focuses his effort in applying and transcending his best practice ideals with the codes he write. I would tag him as the "perfectionist programmer"; he will not hesitate to scrap his piece of work if he finds a fault or a room for improvement and start all over again with that "eye for perfection". In this interview, he will talk a bit about those coding best practices fortunately.Chris answers questions about:
- His history with PHP
- His favorite PHP book
- What tools he uses (IDE)
- His description of the PHP community
- His favorite conference
You can read the answers to these and more in the full interview.
Symfony Blog: Symfony Live 2012: Paris Edition
On the Symfony Community Blog Fabien Potencier has officially announced Symfony Live 2012: Paris Edition, a Symfony-focused event that will take place in June.
Today, I'm excited to announce the fourth Symfony Live Conference in Paris. It will take place on June 7-8th; Paris in the Spring is a lovely city! Like last year, we will have two parallel tracks and the conference will be held in English (with probably a few sessions in French). The call for papers is open until March 30th; if you want to share your real-life Symfony experience, consider submitting a session proposal (SensioLabs covers travel and accommodation expenses for foreign speakers.)As in years before, there will be an unconference and Symfony training sessions will be on the day before the event (the 6th). Tickets are already on sale so if you're interested in attending or just want more information about the event, check out the main conference website.
SpyreStudios.com: Connecting with API Data from Instagr.am using PHP
On SpyreStudios.com there's a post showing you how to connect to the Instagr.am API and pull data back with a bit of simple PHP.
The process of connecting into API data via OAuth is tricky. Some of the more notable social networks which have adopted this technology include Foursquare, Twitter, and Facebook. But Instagram is a very popular mobile app which has grown tremendously fast. Their recent API v1.0 release has some really neat features where you can pull popular photos, recent users, follower lists, and a whole bunch more.He points to the Instagr.am PHP API scripts that the service already provides and shows how to set up an application on your Instagr.am account. This application then has OAuth keys you can use to connect to the service (via the PHP API scripts) and pull back basic user information - profile picture, number of photos, followers, etc. There's also a live demo you can test out.
Sameer Borate's Blog: Building a adjacency matrix of a graph
Building on the graphing tutorial in his last post Sameer continues on looking at graphs in PHP with this new post showing how to create an "agency matrix" of a currently built graph.
Building a graph is not enough; we also need the ability to search through it. To make it easier to build search algorithms, it is useful if we can represent the graph and its connections in a different way; adjacency matrix being one such representation. An adjacency matrix is a means of representing which vertices (or nodes) of a graph are adjacent to which other vertices.He includes some sample code to extract the data from a graph (built with the PEAR Structures_Graph package) and create a basic "table" of information about each nodes' connections.
Markus Pullmann's Blog: Remote Debugging in PHP with XDebug
Markus Pullmann has a new post to his blog about setting up XDebug in your PHP installation to help you narrow down those elusive issues more quickly.
Debugging locally is a nice improvement to have no debugger at all, but in many situations there is the need to debug on production server, where the application is running on the web. There are different reasons for that, but the most important one for me is, that my local environment / installation is different from the one i have on servers in data center and bugs can be related to the environment.He walks you through the installation and server-side configuration of XDebug first then shows how to install the Komodo Remote Debugging Client to help with multi-user debugging setups. He mentions setting up the debugging on the client/IDE side, but there's no specific instructions for any particular IDE - just how it works overall.
Site News: Popular Posts for the Week of 02.17.2012
- Reddit.com: What non-PHP stuff should a PHP developer know?
- Dave Gardner's Blog: PHP Deployment with Capistrano
- 7php.com: PHP Interview with Cal Evans - Get Involved if you want to be a Pro PHPer
- John Conde's Blog: My experience seeking employment as a PHP developer
- PHPMaster.com: Autoloading in PHP and the PSR-0 Standard
- Pim Elshoff's Blog: Dependency management
- Cloud Out Loud Podcast: Interview with Ed Finkler
- Robert Basic's Blog: Zend Framework full page cache tips
- Community News: The Changelog Podcast
- Sameer Borate's Blog: Building a Graph data structure in PHP
Odafe Ojenikoh's Blog: Interactive PHP CLI Applications using Zend Form
Odafe Ojenikoh has submitted a post he's written up showing how to create a command line PHP application with the help of the Zend Framework and it's Zend_Form elements.
Over the weekend, I was toying with the idea of interactive cli applications using readline() and Zend Form for validating input. My motivation for using Zend Form or rather Zend Form elements was to exploit the power of features such as labels, validators, filters and the prospect of reusing forms within web application code.His example code defines a Filter for the form errors (returning them as a string) and a "Cli" class that handles the interaction with the command line. Next up is a class defining the form elements - a prompt for a color name and either of the words "thank" and "you". The Cli class transforms the form elements into prompts on the command line and lets you define validators to check their input.
Voices of the ElePHPant: Interview with Chris Shiflett
The Voices of the ElePHPant podcast has released their latest episode, an interview with Chris Shiflett (as recorded in 2011).
In the interview they talk about things like:
- Chris' security experience
- The PHP community's shifting focus on security
- What's the biggest security mistake PHP developers still make?
- Cross-site request forgeries
- Chris' current work with Mapalong
You can listen to this latest episode either by using the in-page player or by downloading the mp3 directly. You can also subscribe to their feed to get the latest.
PHPMaster.com: Packaging Your Apps with Phar
On PHPMaster.com today there's a new tutorial showing you how to package up your applications using the phar functionality that's bundled in to recent PHP versions.
PHAR ("Php ARchive") is analogous to the JAR file concept but for PHP. If you have PHP 5.3 or greater, the Phar extension is built-in and enabled; you can start using it without any additional requirements. This article is intended to shed some light on this important feature for those who haven't used it before. Hopefully you'll find it a very helpful tool and have a better and faster deployment experience.They show you how to create a sample project to build the phar from - a simple application that prints out a message and the contents of a configuration file. Code is included to help you build the phar file and how to define the stub file to pull in your application's files and folder.
Rob Allen's Blog: A primer on PHP namespaces
For those that either haven't worked much with PHP 5.3 in their applications (or just haven't gotten around to using the feature) Rob Allen has put together an introduction to namespaces to guide you through some first steps and share some example usage.
I know that there are a lot of posts now about namespaces in PHP 5.3. This is mine which is how I learnt how they work. [...] That is, namespaces allow us to: combine libraries with the same classnames, avoid very long classnames and organise our code easily. Note that namespaces do not just affect classes. They also affect functions and constants.He starts with the basic namespace definition (using the "namespace" keyword), shows how to import another namespace with "use" and the use of the __NAMESPACE__ constant to determine what namespace you're operating in. More information on namespaces can be found in the PHP manual.
Site News: Blast from the Past - One Year Ago in PHP
- Brian Swan's Blog: Do Stored Procedures Protect Against SQL Injection?
- Phil Sturgeon's Blog: PHP Format abstraction with a simple class
- Elliot Haughin's Blog: CodeIgniter 1.7.x, 'Core' 2.0, CodeIgniter Reactor, Bitbucket, Zips...
- Berry Langerak's Blog: Getters and setters: evil or necessary evil?
- Web Development Blog: Why should you cache your PHP website?
- Zend Developer Zone: A little fun with the average tech salaries as reported by dice.com
- Lorna Mitchell's Blog: Callbacks in PHP
- PHPBuilder.com: Harness the Scripting Power of PHP and cURL to Update Facebook
- Cal Loveless' Blog: On Continuous Deployment
- Lorna Mitchell's Blog: Using Gearman from PHP
- WebDev Radio Podcast: Episode 84: Travis Swicegood
- Community News: Dutch PHP Conference Ticket Sales Open
- Community News: Voices of the Elephpant Podcast
- Rob Allen's Blog: Using your own View object with Zend_Application
- Phil Sturgeon's Blog: Getting involved with CodeIgniter

