sticker

Subscribe! Enter your email address below:

NO SPAM: We absolutely hate spam. We will not share, rent, or give away your email address to anyone.You can unsubscribe at any time. Easily!

July 18, 2013

Protect PHP with SourceGuardian
Good day to you!

Here in the UK we have been having great warm weather for a change. That hasn't stopped the stories and links coming in though, so welcome to this weeks edition.  I'd like to thank the contribution of Sam Granger this week, who was able to provide us with a little help in terms of research. We always need help, so if you have some time and would like to get involved please let us know.  We also need help in promotion still. Whilst we are growing, we always need people to put the word out so spread a little of the PHP love by sending this to people you know and asking them to sign up!

Have a great weekend and see you next week

All the best

Katie

Articles

What's New in PHP 5.5
PHP 5.5 was recently released, introducing several exciting new features to the language. In this article, we’ll go through some of the most interesting additions and discuss the benefits they provide to developers.

Contributing to PHP Core
Ben Ramsey shares his personal experience of contributing to core, from start to finish, and how one would go about getting started.

PSR - What?
There's been some cool things happening in the PHP world over the last few years, but with the least helpful names ever ... yes, those PSR-somethings which all do totally different things (apart from two of them which are the same). They're actually all superb things, and done for a good reason. Lorna Jane Mitchell translates them into normal speak.

Using Objects Doesn’t Make an Application Object Oriented
Lots of developers understand that object oriented code offers advantages over procedural programming. And so, they begin working on creating objects in their own projects, and eventually feel pretty good about what they’ve done. After all, if they’re using objects, their code must be object oriented, right? Well, not exactly, explains Brandon Savage.

Testing: Find The Sweet Spot
Talking to Johann Peter Hartmann about testing culture and how PHP projects should approach testing in 2013. Johann is the CTO of Mayflower, one of Germany's top technology service providers, developing leading web solutions for customers like Deutsche Telekom AG, ProSiebenSat.1 Media AG and Vaillant GmbH.

Tutorials and Talks

Twitter Search API Using PHP and Guzzle
In case you missed it, Twitter updated their APIs recently, so that you have to authenticate to use even their search APIs to return publicly-available results. This is an increasing trend for API providers, to provide either very limited or nonexistent access for unauthenticated users. Learn how Lorna Jane Mitchell updated her dashboards that keep an eye on twitter searches to do more than just call file_get_contents in the general direction of the right URL.

PHP Frameworks That Just Work
It's great when you deploy an app and it just works. Troy Topnik recently worked on a proposal for a Stackato prospect who asked about a number of PHP application frameworks (basically "Will the following PHP frameworks run on Stackato"). Though he couldn't think of any reason they wouldn't work, Troy thought it would be prudent to test them before marking them "supported".

Taking Monads to OOP PHP
Anthony Ferrara has been playing around with functional languages and concepts, and found that some of these concepts are directly applicable in the OOP code that he's been writing. One of those concepts worth talking about is the Monad. This is something that every functional developer tries to write a tutorial on, because it's such a cool but hard to grasp concept. This post is not really going to be a Monad tutorial per se, but more of a post about bringing the general concept to OOP, and what that looks like.

Ducks Do Not Type
Even in ecosystems, which generally follow a high standard of code quality, you may find public methods in classes which do not originate from an interface or an abstract class. Kore Nordmann thinks that this is a really bad habit for several reasons that he will explain in this article.

PHP's Resources and Garbage Collection
Joshua Thijssen has put together a new post with details about garbage collection in PHP and a "nice bug/feature/whatsmathing" he found related to it and it's performance.

Uploading Archives to Amazon Glacier from PHP
You can easily upload your data archives to Amazon Glacier by using the Glacier client included in the AWS SDK for PHP. Similar to the Amazon S3 service, Amazon Glacier has an API for both single and multipart uploads. You can upload archives of up to 40,000 GB through the multipart operations. With the UploadArchive operation, you can upload archives of up to 4 GB in a single request; however, we recommended using the multipart operations for archives larger than 100 MB.

PHP Doesn't Have Date Functions Either
A recent article brought you the touching story of Shaun, and his co-worker's mistaken belief that Perl has no built-in methods for working with dates. Well, Shaun can rest easy: he's not alone. Apparently, PHP can't handle dates either.

PHP and cURL Script Data Streaming
Douglas B Miller writes - "In the spring of 2008 I was faced with a quite a challenge. The previous year I had created a website for a financial services company that needed to process and display DST Fan Mail - financial data files from DST Systems, Inc. in Kansas City, Missouri USA. The customer had to manually go through a series of steps to download the data files they needed from the DST Systems, Inc. web server. Then the website I created would process the downloaded data to show monetary changes in the customer accounts over daily, weekly, monthly and quarterly time periods. Manual downloads of data wasn’t a real solution. The employees were too busy with other things to be able to consistently perform this task on a daily basis". Learn about his solutions here.

Moving to Cloud-Based Web Development
In this article Martin Psinas shares how he made the transition from a familiar desktop environment to Cloud-based web development.

From PHP to Go
Dave Gardner has built stuff in PHP for 12 years. For the last 8 weeks he has programmed solely in Go. Go (or golang if you’re Googling it) is a compiled language, with memory management and some nice concurrency features. Learn about his liberation.

Working With Multibyte Strings
A written language, whether it’s English, Japanese, or whatever else, consists of a number of characters, so an essential problem when working with a language digitally is to find a way to represent each character in a digital manner. Back in the day we only needed to represent English characters, but it’s a whole different ball game today and the result is a bewildering number of character encoding schemes used to represent the characters of many different languages. How does PHP relate to and deal with these different schemes?

PHP internationalisation with gettext tutorial
GNU gettext is a package that offers to programmers, translators and even users a well integrated set of tools that provide a framework within which other free packages may produce multi-lingual messages. These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organisation for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and a few stand-alone programs to manipulate in various ways the sets of translatable strings, or already translated strings. In this tutorial we want to document how PHP internationalisation with gettext works. It covers setup, use and best practice.

PHP: HTTP Content Negotiation
HTTP requests contain headers that explain which data the client accepts and is able to understand: Type of the content (Accept➚), language (Accept-Language➚), charset➚ and compression (encoding)➚. By leveraging these header values, your web application can automatically deliver content in the correct language. Using content types in the Accept headers, your REST API  doesn't need versioned URLs ➚ but can react differently on the same URL.
News and Announcements

PHP 5.3.27 Released - PHP 5.3 Reaching End of Life
The PHP development team announces the immediate availability of PHP 5.3.27. About 10 bugs were fixed, including a security fix in the XML parser (Bug #65236). Please Note: This will be the last regular release of the PHP 5.3 series. All users of PHP are encouraged to upgrade to PHP 5.4 or PHP 5.5.

PHP 2013 ZendCon Oct 7-10th Santa Clara, CA
The 9th Annual ZendCon will bring together developers, IT managers and PHP experts from around the world. With a focus on PHP, mobile and cloud development, attendees at this highly acclaimed conference will expand their skills and explore new technologies.

Web and PHP Conference
For this year’s FREE Web & PHP Conference in San Jose, Sep 16-18th, we want YOU to get involved and have YOUR say in the program. We’ve reserved a number of places in the schedule to be picked by the community, decided by an online vote. Each week, we’ll be putting up a group of four abstracts and asking you to vote on your favourite. This week in Round 3, battling it out for your vote we have: Ben Edmunds v Omni Adams v John Mertic v David Stockton. Who is your favourite? Who do you want to see speaking at the Conference? Make your choice and you can see them give their session... and it won't even cost you a penny or a cent! Have your say and vote now!

Reading and Viewing
 

The Maturity of PHP - Lately in PHP Podcast Episode #37
With the release of version 5.5, PHP has reached a new level of maturity that helps making it be taken even more seriously. That was one of the main topics discussed by Manuel Lemos and César Rodas in episode 37 of the Lately in PHP podcast.

Flat vs. Sphere
In preparation of his Finding Pubs... (and other things) presentation given at the PHP NorthWest usergroup some time ago, Derick Rethans created a demo that shows all his flickr photos on a map. View it here.

Jobs

If you have a position that needs filling, let us know and we will include it. The following one is primarily Python, but they do need PHP skills also:

Performance Telecom (UK) seek freelancer (Remote worker) - Python and PHP Developer

Interesting Projects, Tools and Libraries

Pretty Error Display for PHP - Whoops Library
PHP error messages can be extremely terse. Not that they are unhelpful; the major headache is that one has to open the source file at the given error location to check for problems. Also the complete system context (the PHP system variables, cookies, session etc.) is not easily available. Whoops is a nice little library that helps you develop and maintain your PHP projects better, by helping you deal with errors and exceptions in a user friendly way. Whoops is already a part of Laravel 4, and includes providers for Silex and Zend Framework 2.

Carbon DateTime Library 
Carbon is a simple API extension for the DateTime. It enhances the class with some useful methods for working with dates and time, with PHP 5.3+.

Filterus - Filtering Library
A flexible PHP 5.3 filtering package that can not only validate, but also filter input to match a preset pattern.

Mustache.php - Elegant Templating Library
Mustache is a popular templating language that has implementations in practically every programming language. This gives you the benefit that you can reuse your templates in both client and server side. Mustache.php is an implementation that uses – you guessed it – PHP.

Omnipay - Payment Processing Library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. It has a clear and consistent API and supports dozens of gateways. With this library, you only need to learn one API and work with a variety of payment processors.

Upload - For Handling File Uploads
Upload is a library that simplifies file uploading and validation, handling file uploads with extensible validation and storage strategies. When a form is submitted, the library can check the type of file and size.

Monad-PHP
Values are "wrapped" in the monad via either the constructor: new MonadPHP\Identity($value) or the unit() method on an existing instance: $monad->unit($value);

HTML Purifer
Standards compliant HTML filter written in PHP. HTML Purifier is an HTML filtering solution that uses a unique combination of robust whitelists and aggressive parsing to ensure that not only are XSS attacks thwarted, but the resulting HTML is standards compliant.

phpass
Phpass is a portable public domain password hashing framework for use in PHP applications. It is meant to work with PHP 3 and above, and it has actually been tested with at least PHP 3.0.18 through 5.4.x so far.

php-refactoring-browser
A command line refactoring tool for PHP. Automatic Refactoring for PHP Code by generating diffs that describe the refactoring steps. To prevent simple mistakes during refactoring, an automated tool is great.

php-manipulator
A helper library for analysing and modifying PHP source files.

php-passbook
To add PHP-Passbook as a local, per-project dependency to your project, simply add a dependency on eo/passbook to your project's composer.json file. Here is a minimal example of a composer.json file that just defines a development-time dependency on the latest version of the library.

Find Us, Follow Us, Promote Us :)

Show the love

Please let people know about us via Twitter, Facebook or any other social media. If you're involved in another PHP group or forum please pass on our newsletter.

Subscribe! Enter your email address below:

NO SPAM: We absolutely hate spam. We will not share, rent, or give away your email address to anyone.You can unsubscribe at any time. Easily!

Talk to us!

If you have some news, want to share a link with us or chat with us feel free to email us.

And we also have an RSS feed that you can use.

Like us on FacebookFollow us on Twitter

Copyright © PHPWeekly.com