PHP.net

Dutch PHP Conference 2013

PHP Conferences - Tue, 23/04/2013 - 00:00
Ibuildings is proud to organise the seventh Dutch PHP Conference on June 7 and 8, plus a pre-conference tutorial day on June 6. Both programs will be completely in English so the only Dutch thing about it is the location. This year we have 30+ speakers gathering in Amsterdam. The 3-track main conference covers topics like PHP 5.5, software design, APIs, Zend Framework 2, Symfony 2, security, scalability and more. Our Tutorial Day has an additional 16 in-depth sessions to choose from. Your DPC ticket also lets you into the Dutch Mobile Conference: an additional two tracks about cutting edge javascript and non-native application development. This year features several side events: a bigger and better unconference, a Zend sponsored hackathon, a social in downtown Amsterdam, and a Symfony2 certification exam. The Early Bird special ends April 28th, so book right away for a 15% discount. We look forward to seeing you in June!
Categories: PHP.net

7PHP.com: Zend Certifications Tips & Tricks - Hear It From Zend Certified Engineer Eric Hogue

PHPDeveloper.org - Mon, 22/04/2013 - 19:16

On 7PHP.com there's a new post that interviews a PHP community member, Eric Hogue, about his experience with the Zend Certified Engineer exam.

This is the 3rd set of Zend Certification Tips and Advice to help anyone taking either of the two Zend Exams powered by Zend Technologies: the Zend PHP Certification Exam and/or the Zend Framework Certification Exam. The aim being to help people who want to sit for those exams and inform them what it is all about & what to expect by hearing it from (pro) PHP Guys who have already been through it, that is => Hear It From Zend Certified Engineers!

He starts off with some general questions to Eric about the exam and its structure and how he prepared himself for it. He mentions some of the resources he used to study and what kind of topics to pay attention to. There's also a few quotes included at the end giving another perspective on the exam (specifically, some frustrations).

Link: http://7php.com/zend-certification-advice-eric-hogue

PHPMaster.com: Consuming Feeds with SimplePie

PHPDeveloper.org - Mon, 22/04/2013 - 18:47

In a recent post to PHPMaster.com Kevin Mowry shows you how to use SimplePie, a simple to use programatic feed reader you can use to parse things like RSS feeds.

If you're an avid feed consumer like I am, you might be a bit sad to see Google's recent announcement of Reader reaching end of life. Reader was simple and easy to use, but there's no reason you can't have the same functionality with your own homegrown project. The PHP library SimplePie allows for quick and easy feed consumption and display. Here's how you can get started on your own feed reader.

He helps you get it installed (via Composer) and shows you how to use some of its most basic functionality to parse the New York Times' feed. He also includes examples of getting the information back out of the SimplePie object. There's also some snippets that show how to only get the latest items and how to cache the results.

Link: http://phpmaster.com/consuming-feeds-with-simplepie

DZone.com: Trying out PHP Refactoring Browser

PHPDeveloper.org - Mon, 22/04/2013 - 17:03

On DZone.com Giorgio Sironi has written up a post about some testing he's done with the ""PHP Refactoring Browser" (more on that here) on some basic code examples.

IDE proponents love, in fact, an Integrated Development Environment that provides all the functionalities you need while writing and editing code; the followers of the Unix way typically write code in Vim while augmenting it via plugins where feasible and leveraging external tools that do one thing, and do it well. [...] Automated refactorings in PHP were out of the league of Vim and Unix users; thanks to Qafoo, however, a new open source tool is able to edit code with predefined refactoring recipes: PHP Refactoring Browser.

He goes through some of the basic features and functionality of the browser, setting expectations a bit. He shows how to get it installed (via Composer) and the results of some of his testing. Rather than including them all in the post, he opted to make actual commits on github of the changes.

Link: http://css.dzone.com/articles/trying-out-php-refactoring

PHP Town Hall Podcast: Episode #6 - PSR-X and the Mexican Standoff

PHPDeveloper.org - Mon, 22/04/2013 - 16:56

The PHP Town Hall podcast has released the latest episode of their show - Episode #6, "PSR-X and the Mexican Standoff".

PHP-FIG member Paul M. Jones and PHP contributor Anthony Ferrera come on the podcast with Ben, Phil and regular guest Zack Kitzmiller to discuss the new Package Orientated Autoloader Proposal (a.k.a PSR-X), and wether or not PSR's should ever be amended.[...] Nobody wins, but the argument brings up a lot of interesting topics and points of view, and that is mostly what we are here for.

You can listen to this latest episode either through the in-page player by downloading the mp3 or by subscribing to their feed. The post also contains links to several of the groups and technologies mentioned in the episode.

Link: http://phptownhall.com/blog/2013/04/19/episode-6-psr-x-and-the-mexican-standoff

Community News: Latest Releases from PHPClasses.org

PHPDeveloper.org - Wed, 17/04/2013 - 14:09
  • Page File
    Screen shot measuring with chrome tools approx difference is 6 msecs
    Package:
    Summary:
    Generate pages and save to files
    Groups:
    Author:
    Description:
    This class can Generate pages and save to files...

    Read more at http://www.phpclasses.org/package/8002-PHP-Generate-pages-and-save-to-files.html


  • PHP Collections Framework
    Package:
    Summary:
    Manipulate collections of objects like Java and C#
    Groups:
    Author:
    Description:
    This package can be used to manipulate collections of objects like Java and C#...

    Read more at http://www.phpclasses.org/package/8008-PHP-Manipulate-collections-of-objects-like-Java-and-C-.html


  • QdbQuery
    Package:
    Summary:
    Query MySQL databases using parameters
    Groups:
    Author:
    Description:
    This class can query MySQL databases using parameters...

    Read more at http://www.phpclasses.org/package/8011-PHP-Query-MySQL-databases-using-parameters.html


  • MySQL Database usage
    Package:
    Summary:
    Query MySQL database tables
    Groups:
    Author:
    Description:
    This class can query MySQL database tables...

    Read more at http://www.phpclasses.org/package/8009-PHP-Query-MySQL-database-tables.html


  • PHP Compare Objects
    Package:
    Summary:
    Compare objects using reflection
    Groups:
    Author:
    Description:
    This class can compare objects using reflection...

    Read more at http://www.phpclasses.org/package/8012-PHP-Compare-objects-using-reflection.html


  • PHP Curl Parallel Requests
    Package:
    Summary:
    Send multiple HTTP parallel requests with Curl
    Groups:
    Author:
    Description:
    This class can send multiple HTTP parallel requests with the Curl extension...

    Read more at http://www.phpclasses.org/package/8014-PHP-Send-multiple-HTTP-parallel-requests-with-Curl.html


  • wURI
    Package:
    Summary:
    Parse an URL and extract its parts
    Groups:
    Author:
    Description:
    This class can parse an URL and extract its parts...

    Read more at http://www.phpclasses.org/package/8005-PHP-Parse-an-URL-and-extract-its-parts.html


  • PHP Reduce JSON
    Package:
    Summary:
    Compress JSON data using the reduced JSON format
    Groups:
    Author:
    Description:
    This class can compress and decompress JSON data using the reduced JSON format...

    Read more at http://www.phpclasses.org/package/8007-PHP-Compress-JSON-data-using-the-reduced-JSON-format.html


  • File Reader
    Package:
    Summary:
    Read and search text files
    Groups:
    Author:
    Description:
    This class can read and search text files...

    Read more at http://www.phpclasses.org/package/8006-PHP-Read-and-search-text-files.html


Tom Butler: PHP: PSR-0: Pretty Shortsighted, Really

PHPDeveloper.org - Tue, 16/04/2013 - 20:12

In a new post to his site Tom Butler gives some reasoning as to why he thinks PSR-0 is shortsighted and some examples of a possible better alternative.

A little background for those unaware of what PSR-0 is: There's a self-declared PHP "standards" group called PHP-FIG attempting to push several "standards" throughout the PHP community. [...] I have little interest in debating the politics behind pushing standards or whether small groups of developers trying to make decisions that affect the entire community is good or not, but I do object to the PSR-0 standard itself. My issues are purely practical, PSR-0 reduces flexibility and makes life more difficult for developers

While he likes the idea of a standard way to be able to include third-party libraries that can be reused in multiple systems, he suggests that it answers the wrong question. In his view, it should be up to the library/tool developers to ensure the structure of their code to work with a standard, not the other way around. He points out that a "standard" is something that should apply to all situations and some of the workarounds that are needed for PSR-0 negate this idea.

In his alternative method, he suggests an "Autloadable" interface that can be implemented by the library/tool that includes a "load" method to handle the actual class loading. Then this autoloader would be registered via a json configuration file for the package. This allows the developer to control the loading and place any exceptions they might need into their own logic instead of trying to work around possible issues with the PSR-0 loading scheme.

PSR-0 is a bad solution to a good problem. If you take anything from reading this post, remember this: If the standard defined how autoloaders could be extended, rather than how autoloaders worked, then each library or vendor could provide its own extension to the autoloader and everyone would be happy. Link: http://r.je/php-psr-0-pretty-shortsighted-really.html

Reddit.com: Dependency injection in ZF2 and Symfony 2 are service locators

PHPDeveloper.org - Tue, 16/04/2013 - 19:40

On Reddit's PHP section there's a discussion happening about dependency injection versus service locators in two popular PHP frameworks - Zend Framework 2 and Symfony 2 (and how they're not really DI at all).

Both ZF2 and Symfony 2 offer the same behavior: if I'm in a controller, and I want to use a service, I have to get it from the container with $this->get('my_service'). As such, the controller is not using DI, this is the service locator pattern. Controllers become more difficult to tests because of that, and they depend on the container now. I wonder why both frameworks didn't go further: why not treat controllers like services and use dependency injection on them. In other words: if a controller needs a service "A", then it should get it in the constructor, or through setter/property injection.

The comments talk some about the "controller from the DI container" idea, some other ways around the problem and some clarification as to what the frameworks are actually doing related to the container injection.

Link: http://www.reddit.com/r/PHP/comments/1caidn/dependency_injection_in_zf2_and_symfony_2_are

Extending Twig Templates: Inheritance, Filters, and Functions

PHPDeveloper.org - Tue, 16/04/2013 - 18:05

On PHPMaster.com today there's a new tutorial for the Twig templating users out there showing you how to extend your templates via inheritance, filters and functions - all abilities already built in to the tool.

When working within an MVC architecture, it's common to use a template library to populate the dynamic content of our views. There are dozens of such libraries available for PHP, but Twig is one of the standouts because of the ability to extend core features with custom implementations. In this article we'll explore how Twig templates can be extended using template inheritance, filters, and functions.

He starts first with some of the common limitations of templating frameworks (extension) and how Twig gets around this. He shows the use of the "extends" keyword and the "block"/"endblock" for splitting up the page into reusable chunks. He also shows how to use filters and functions in your Twig tags, allowing for more customized content and functionality for your output.

Link: http://phpmaster.com/extending-twig-templates-inheritance-filters-and-functions/

Automated backups to Google Drive with PHP API

PHPDeveloper.org - Tue, 16/04/2013 - 17:57

On his site Lukasz Kujawa has posted a new tutorial showing you how to perform automated backups to Google Drive of files through their API (using his own library).

Where do you keep backups? I guess that depends on what do you backup. You might have a very clever answer for a business critical data but what about less important content? The best example would be a private blog. It will hurt if you lose your data but the odds are you're not willing to pay for any reliable storage. [...] There is one reliable storage, which is 100% free and almost everybody have access to it. Yes, I'm talking about Google Drive.

He walks you through the process of setting up your Google Drive account API access and where to find the data you'll need to make the connection. He then links over to his project that makes the backup a simple few lines of code (mostly configuration) of a backup path of your choice out to the remote Google Drive account.

Link: http://systemsarchitect.net/automated-backups-to-google-drive-with-php-api

Matt Setter: How Simplicity Leads to Greater: Productivity, Quality & Satisfaction

PHPDeveloper.org - Tue, 16/04/2013 - 16:39

Matt Setter has a quick new post that suggests a way you can get more done with less work - simplicity.

Though we can do so many things simultaneously - should we? Does it actually reduce effectiveness and productivity which are the antithesis of professional application development? [...] I had the thought, as is common in a western-based mentality, that to be busy, to be industrious, to try and multi-task a series of independent tasks and projects simultaneously was the right thing to do. It's meant to be a simple formula: "Greater productivity = Greater self-worth right?" Sounds almost like Thatcherism. I felt that this was not only right, but the sign of an intelligent and sophisticated developer, who truly had honed his craft. Perhaps you've felt the same at one time or another?

He points out that, while it's very easy for developers to fall into this trap and way of thinking, it's not sustainable. It leads to stress, bad code and even - possibly - an even higher bug count. Instead he suggests the good standby idea of "KISS" (essentially, simplicity).

Instead of trying to do everything at once - I stopped and decided to only do one thing at once. And that one thing, had my full attention and focus. When it was done, I then moved on to the next one. Not before and not after.

He includes some of his own experience trying to apply this in a Zend Framework 2 application.

Link: http://www.maltblue.com/software-engineering-2/how-simplicity-leads-to-greater-productivity-quality-and-satisfaction

Community News: Packagist Latest Releases for 04.16.2013

PHPDeveloper.org - Tue, 16/04/2013 - 15:01
Recent releases from the Packagist:

Community News: Latest PECL Releases for 04.16.2013

PHPDeveloper.org - Tue, 16/04/2013 - 14:01
Latest PECL Releases:
  • pcsc 0.2 Fixed compile error on >= PHP5.4 and added w32 support

  • couchbase 1.1.4 - Prototype trying to get the thing working for PECL - Reset the error code between each request of a persistent connection - Report libcouchbase version in phpinfo - Remove gettimeofday implementation for win32 - PCBC-206: Prototype for configuration caching - Fixup memory allocation for URL path - PCBC-186: Add method to list all design docs - PCBC-178: Add support for connection_timeout - Update GetReplica test - PCBC-218: Detect invalid characters in CAS - Add bucket manipulation example - PCBC-172: Add design document examples - PCBC-191 Don't coredump for invalid argument - Update the list of supported PHP versions

  • mongo 1.3.7 ** Bug * [PHP-700] - 'MongoCursorException' with message '127.0.0.1:27017: request/cursor mismatch

Dayle Rees: Composer primer

PHPDeveloper.org - Mon, 15/04/2013 - 19:55

For those that might have heard about the Composer package management system for PHP but haven't had the time to get into it, you should definitely check out this great primer from Dayle Rees.

Composer is something special in the world of PHP. It has changed the way we handle application dependencies, and quelled the tears of many PHP developers. You see, in the olden days, when you wanted to build an application that relied on third party dependencies you would have to install them with PEAR or PECL. These two dependency managers both have a very limited set of outdated dependencies and have been a thorn in the side of PHP developers for a long time. [...] Enter composer, king of the package managers.

He jumps right in and gets into the configuration (the composer.json file) and using it to describe the package. He shows how to set up "required" resources complete with version number information. There's a bit about setting up autoloading and classmaps too. He then moves on to getting the tool installed and using the composer.json definition to load in needed packages (and development ones if needed).

Link: http://daylerees.com/composer-primer

7PHP.com: Interview with Manuel Lemos - Founder of PHPClasses.org

PHPDeveloper.org - Mon, 15/04/2013 - 18:43

On 7PHP.com today they've posted the latest PHP community interview - this time with Manuel Lemos of the PHPClasses site.

In this edition I talked with Manuel Lemos who is the founder of the famous and huge PHPClasses.org. @ManuelLemos has been rambling a lot about PHP, doing all sorts of stuffs on phpclasses back since 1999 - podcasts, interviews, sharing scripts, writing scripts, blogging, shouting and I even doubt he drinks-eats-sleeps there too (just to say how much he is hooked in there).

In the interview he answers questions about:

  • His background and how he got started with PHP
  • What he sees as the good and bad parts of the language
  • Some suggestions for developers wanting to learn
  • What frameworks/unit testing tool and CMS he recommends

There's also a section more specifically focused on the Brazilian PHP community, PHP conferences and some of the things he's learned in his time in the wider PHP community.

Link: http://7php.com/php-interview-manuel-lemos

Fabien Potencier: About Symfony: Stability over Features

PHPDeveloper.org - Mon, 15/04/2013 - 17:12

Fabien Potencier (of the Symfony framework) has a new post to his site talking about a philosophy that the Symfony framework community should work towards, providing stability over features.

Long story short: in the coming months, the Symfony core contributors should focus their efforts toward stabilizing the existing features instead of working on new ones. At this point, backward compatibility and stability are more important than everything else.

He highlights some of the points that come along with this effort including less refactoring for the sake of refactoring, fixing more bugs/edge cases and writing more tests/documentation. He gets into some of the specifics of this kind of thinking and points out the things that can and can't be changed during this time. He talks more about stability and suggests that not only can it help enhance performance but it could also help motivate more projects/corporate users to start using the framework.

Link: http://fabien.potencier.org/article/68/about-symfony-stability-over-features

SitePoint.com: What Happened when we Talked PHP with the Experts

PHPDeveloper.org - Mon, 15/04/2013 - 16:05

On SitePoint.com today they've posted the transcript of a "Talk with the Experts" session they did with Lorna Mitchell (instructor of their recent OOP sessions). The transcript includes questions and answers to those in attendance as well as some good links and advice.

Last Thursday I broke with tradition slightly and ran a Talk with the Experts session in the evening (down under), making it a bit more time-zone friendly for our UK audience. It also meant that I was able to swap my usual coffee for a wine, which probably made the session run a bit more smoothly. The subject was PHP and our expert was Lorna Mitchell, tutor of Object-oriented PHP and co-author of PHP Master: Write Cutting-edge Code.

The transcript starts with a collection of some of the links provided during the discussion and then runs through the entire conversation. There's some good advice in there, especially if you're relatively new to the world of PHP object-oriented programming.

Link: http://www.sitepoint.com/what-happened-when-we-talked-php-with-the-experts

Community News: Packagist Latest Releases for 04.15.2013

PHPDeveloper.org - Mon, 15/04/2013 - 15:06
Recent releases from the Packagist:

Community News: Packagist Latest Releases for 04.14.2013

PHPDeveloper.org - Sun, 14/04/2013 - 15:04
Recent releases from the Packagist:
Syndicate content