PHP 5.5.0 alpha 1 was released a few days ago. New features include: support for Generators, a new password hashing API, support for finally in try/catch blocks, support for list() in foreach, constant array/string dereferencing, ext/intl improvement More info on these features can be read in Test Drive PHP 5.5: A Sneak Peek and What […]
Tag Archives: php
Faker
Faker is a PHP library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you. Uses formatters for the different types of data (e.g. names, addresses, etc) you want […]
Geocoder β The almost missing Geocoder PHP 5.3 library.
Uses FreeGeoIp, HostIp, IpInfoDB, Yahoo! PlaceFinder, Google Maps, Bing Maps, OpenStreetMaps, Geoip, and CloudMade geocoding services to geocode addresses and IP Addresses. <?php // Create an adapter $adapter = new \Geocoder\HttpAdapter\BuzzHttpAdapter(); // Create a Geocoder object and pass it your adapter $geocoder = new \Geocoder\Geocoder(); // Then, register all providers your want $geocoder->registerProviders(array( new \Geocoder\Provider\YahooProvider( […]
React: Event-driven, non-blocking I/O with PHP
Inspired upon Node.js: <?php require ‘vendor/autoload.php’; $stack = new React\Espresso\Stack(function ($request, $response) { $response->writeHead(200, array(‘Content-Type’ => ‘text/plain’)); $response->end(‘Hello World\n’); }); echo ‘Server running at http://127.0.0.1:1337’ . PHP_EOL; $stack->listen(1337); React →
PHP Sadness
These are things in PHP which make me sad. They are real, objective issues which I have personally encountered in my normal day-to-day activites. Especially the part on Inconsistency has been bothering me from whenever I started developing in PHP (as it’s one of the first things you encounter). PHP Sadness → Also see: PHP, […]
PHP: The Right Way
Thereβs a lot of outdated information on the Web 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 Web. A must read! PHP: The Right Way […]
PHP CLI, The Other SAPI
Most developers use PHP in a web context and run their code via Apache. The command line interface (CLI) is another approach to run PHP without the overhead of your webserver. This talk not only illustrates the usage of the PHP binary, but also some use cases for which the CLI is the better tool. […]
Automatic website publishing with Git, GitHub-Style
One of the things I like about GitHub is the fact that it sports a gh-pages branch. Anything you push to it, is automatically published on your GitHub subdomain http://username.github.com/projectname/. Inspired by this GitHub publishing flow, I’ve set up a likewise method on our web servers at work: a branch which gets published automatically onto […]
PHP 5.4.0 Released
The PHP development team is proud to announce the immediate release of PHP 5.4.0. This release is a major improvement in the 5.x series, which includes a large number of new features and bug fixes. Support for traits has been added. Short array syntax has been added, e.g. $a = [1, 2, 3, 4]; or […]
PHPBench.com
PHPBench.com was constructed as a way to open people’s eyes to the fact that not every PHP code snippet will run at the same speed. You may be surprised at the results that this page generates, but that is ok. PHPBench.com →