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!

April 20, 2017

Greetings PHP Fans,

Couple of releases from the PHP development team; PHP 7.1.4 and PHP 7.0.18, both available immediately.

Also this week, the Sound of Symfony podcast team are back together to discuss all the exciting new things coming up in Symfony 4, plus Symfony Flex and much more.

We take a look at resizing an image using maths and logic, as opposed to squeezing or stretching the original image.

Plus on the Exakat blog is a post about how they managed to move from an array to a class.

And finally DrupalCon North America takes place next week, over four days in Baltimore. The last few tickets are on sale now.

Have a great weekend,

Katie and Ade

Please help us by clicking to our sponsor:

encrypt php scriptsProtect your PHP Code

Why not try SourceGuardian 11. Click here to download a 14 Day Trial copy. Protect your code using Windows, Linux or Mac and run everywhere with our free Loaders.


A Small Update About sabre/dav And Baikal Maintenance
Hi there! My name is Evert Pot, and for the past 10 years I’ve probably done around 90-95% of development for the sabre/* packages, and took over Baikal development last year. After this time, it all became a little bit too much for me to maintain these. I wrote a blog post about this. This post is a follow-up that I’m cross-posting on both my own blog and

Technical Advisory Committee Update
In October of last year the Technical Advisory Committee was formed to evaluate options for the developer tools we use on The TAC consists of Angie Byron, Moshe Weitzman, and Steve Francia, acting as advisors to Megan Sanicki, the Executive Director of the Drupal Association. The TAC's mandate is to recommend a direction for the future of our tools on Megan will evaluate this recommendation, make a decision, and prioritise that work in the development roadmap of the Drupal Association engineering team.

Tutorials and Talks

Symfony 4: Directory Structure
Symfony 3 came with a slightly different directory structure than Symfony 2. Symfony 4 will also come with a reworked directory structure, mostly incremental adjustments to support new features and best practices. The Symfony 3 directory structure introduced a more standard Unix-like directory structure, with less sub-directories. Symfony 4 keeps going in that direction.

Automatically Running PHPUnit With Watchman
A little bash script to run tests when a file has been changed.

Easy Docker Dev Environments for PHP with CloudEstuary
Lately I’ve been messing around with Docker, and specifically with containerising PHP applications to perform quick services, such as static analysis of PHP code, compatibility of existing PHP code to specific versions of PHP, and performing security checks on PHP libraries included in my projects. However, I’ve not created a development environment for my projects using Docker.

Building a Social Network with Laravel and Stream? Easy!
In the previous post we saw how to add the follow functionality to a Laravel app. We also looked at how to configure our app to use Stream. This part will focus on configuring our models in order to make it possible to track activities, the different types of feeds that Stream provides, getting feeds from Stream and rendering the different types of feeds in a view.

Moving From Array to Class
Ever since I started using PHP, arrays have always been my friend. They are versatile, they have a wide range of functions, and they are easy to use. I kept using them versions after versions, and even with PHP 7.2, I still rely on them a lot. Over the years, classes have also made their way into my toolset. They have a different usage: classes are for complex data structures, for business logic. Simple data structures get an array. Until we tried what seemed impossible: moving from an array to a class.

PHP 7 Virtual Machine
This article aims to provide an overview of the Zend Virtual Machine, as it is found in PHP 7. This is not a comprehensive description, but I try to cover most of the important parts, as well as some of the finer details.

Scraping Uber Ride History Data
This month I’ll complete 1 year riding with Uber. The process of booking a ride and the response time has been amazing. This post however is on a different matter. As a data aficionado I was curious on the various locations I had travelled over the year and the cost each month. Heading over to the Uber API docs was a disappointment as Uber does not provide any API for getting the ride history data. My next plan was to scrape the data from Uber pages using PHP or Python. Just when I was going to start the project to scrape Uber trip data, a little Google search returned a nice bookmarklet by @ummjackson that scrapes the data and exports it to a CSV file.

PHP VAT Calculation For Any EU Country 
As you may know, VAT is a tax used in European Union countries. It is added to the price of products and services, but the actual percentage of the tax varies from country to country, as well from product to product or service to service. If you or your clients need to add value-added taxes (VAT) within the European Union or validate VAT numbers, then there is a service available to get the latest rates for each country including rates within reduced rate categories. Read this article to learn more about how you can use this service to help determine the VAT taxes to use on different purchases using PHP applications.

(Almost) Stupid Easy PHP Integration With Active Directory On Azure
One of the things that I’m doing is looking around at integrations and integration management. As a Linux-based PHP developer I have had a cloudy view of much of the Microsoft server world. I use Windows for most of my development and I use my Mac largely for creating videos… showcasing software I wrote on my Windows machine, for Linux… 🙂 But the Microsoft world has also made me a little jealous. There is something nice about simply having to go to one company and say “I need X” and, lo, you have it. Clearly that’s an over-simplification and, to some degree, a lie, but for the Microsoft developers I’ve talked to who have had to make the switch to PHP that is one of the things that they have said they liked best about Microsoft.

Resize Image Without Stretching in Codeigniter
In this article I’m going to show you the mathematics and logics of resizing an image to a different width and height without squeezing or stretching the original image. If the source image has a different aspect ratio than the destination image, the source image will be cropped.

Develop Expressive Applications Rapidly Using CLI Tooling
First impressions matter, particularly when you start using a new framework. As such, we're striving to improve your first tasks with Expressive. With the 2.0 release, we provided several migration tools, as well as tooling for creating, registering, and deregistering middleware modules. Each was shipped as a separate script, with little unification between them. Today, we've pushed a unified script, Expressive, which provides access to all the migration tooling, module tooling, and new tooling to help you create http-interop middleware. Our hope is to make your first few minutes with Expressive a bit easier, so you can start writing powerful applications.

Quick Tip on Working With Timezone in CakePHP 3
In a recent project, we need to allow users to set start and end time of their events and the application is targeted worldwide clients, which leads us to discover some tips on working with timezone in CakePHP 3. In this post, we share some tips we have learned.

How You Can Successfully Ship New Code in a Legacy Codebase
The Greek philosopher Heraclitus already knew that "change is the only constant" and as software developers we know this to be true for much of software development and business requirements. Usually the problems software needs to solve get more complex over time. As the software itself needs to model this increased complexity it is often necessary to replace entire subsystems with more efficient or flexible solutions. Instead of starting from scratch whenever this happens (often!), a better solution is to refactor the existing code, therefore reducing the risk of losing existing business rules and knowledge. A good strategy for this kind of change is called "Branch By Abstraction". While the term is certainly clumsy and overloaded, the idea itself is genius.

Building Your Startup: Running Multiple Domains
Expanding awareness and usage of Meeting Planner is my greatest challenge right now. Without lots of input, it's hard to make the product better, and without fast growth, it's hard to attract investors. I've had concerns that the brand Meeting Planner might lead to people misunderstanding the app's social usefulness, such as planning friendly get-togethers, dates, and parties. Obviously, choosing names is limited by domain availability and/or the budget you have to invest in buying alternatives. Meeting Planner seemed best at the time. Recently, I noticed was available, so I registered it and began to integrate the domain alongside the existing Meeting Planner service.
News and Announcements

PHP 7.1.4 Released
The PHP development team announces the immediate availability of PHP 7.1.4. Several bugs have been fixed. All PHP 7.1 users are encouraged to upgrade to this version.

PHP 7.0.18 Released
The PHP development team announces the immediate availability of PHP 7.0.18. Several bugs have been fixed. All PHP 7.0 users are encouraged to upgrade to this version.

Atlas ORM 1.2.0 Released
The 1.2.0 release adds the ability to define WHERE conditions on relationships. (The 1.1.0 release added functionality to ignore foreign key string case when wiring up objects in memory, and 1.0.0 was released pretty quietly a couple of weeks ago.) Try it out today, because you like keeping your persistence layer separate from your domain layer. Now, read on for some history, if you care about that kind of thing.

DrupalCon - April 24-28th 2017, Baltimore
The Drupal community is one of the largest open source communities in the world. We're developers, designers, strategists, coordinators, editors, translators, and more. Once a year, our community comes together at the biggest Drupal event in the world: DrupalCon North America. This year, from April 24-28, we'll be in Baltimore, Maryland. There are 12 session tracks, featuring topics like UX, DevOps, project management, and PHP. Tickets are on sale now.

PHP South Coast - June 9-10th 2017, Portsmouth
That’s right, PHP South Coast conference in 2017 will be running not one, but two days of talks on 9th-10th June 2017. This means there will be more opportunity for new speakers to be a part of the conference as well as more experienced speakers being present on the lineup. On the Friday we will have two tracks all day, followed by a social event in the evening (more details to be announced). On Saturday we will have one track of talks, starting slightly later in the morning so that everyone is nice and refreshed from the night before :) Tickets are on sale now.

CoderCruise - July 16th-23rd 2017, New Orleans
CoderCruise is the spiritual successor to php[cruise] that was run in 2016. The PHP community had so much fun that we decided we needed to expand the idea to the greater web tech community! This will be a 7-day cruise out of the port of New Orleans that will include 3 days of conference (while at sea) and 3 days at the ports of Montego Bay, Grand Cayman, and Cozumel. We are looking for a broad range of submissions covering a wide range of web technology topics including coding, design, content, and more. Given the scope of this conference, emphasis will be given to talks that appeal to all web technologists regardless of their programming language of choice (or lack thereof). Tickets are on sale now.

Web Summer Camp - August 30th-September 2nd 2017, Croatia
Hands-on and engaging workshops providing useful know-how and first-hand experience, along with encouraging knowledge sharing. We are looking for PHP, eZ Publish/eZ Platform, Symfony, JavaScript, React/React native, user experience, user research, information architecture, design systems, CSS and project management workshops. Early Bird tickets are on sale now.


Three Devs and a Maybe Podcast - 19th January 2038: The End of Time
In this weeks episode we start off the podcast with discussion around Timezones, Daylight saving time and how the Year 2038 will be an interesting one. We then move on to highlight the results of our recent PHPStorm Twitter poll, End-to-end encryption and Hot Picks is back! (at least for one show). Finally, we highlight the differences between Software/Hardware video-decoding and some interesting PHP function aliases.

Voices of the ElePHPant - Interview with Eric Mann
This week Cal Evans chatted to Eric Mann, a seasoned web developer working with Tozny.

Sound of Symfony Podcast: Episode 17 - Symfony 4
The band is back together. Fabien's grand (8-part) unveiling of Symfony Flex has inspired us to get together and talk about all the exciting new things waiting for us in the upcoming Symfony 4. Tune in to find out what's happening and to get our take on Symfony Flex, the new directory structure, makefiles, and much more.

The Changelog Podcast #245: Open Source at Google
Will Norris (Engineering Manager at Googles Open Source office) joined the show to talk about their new release of the Google Open Source website, as well as the release of Googles internal documentation on how they do open source. Nearly 70 pages of documentation have been made public under creative commons license for the world to use. We talked about the backstory of Googles Open Source office, their philosophy on OSS, their involvement in the TODO group, and much more.

Full Stack Radio Podcast Episode 62: Timezones, Webhook Security, and UI Decisions
In this episode, David talks about adding timezone support to Crondog, and Adam wrestles with some decisions about dealing with failed webhooks in KiteTail. We also talk a lot about different strategies for securing webhooks, and what we're looking forward to at MicroConf.

MageTalk Magento Podcast #124 - #roadtoimagine Series Part 3: Magento Security Council (w/ Eric Hileman of MageMojo)
The MageTalk guys hang out with Eric Hileman of MageMojo and talk about the recent launch of "Magesec".

PHP Roundtable Podcast Episode 61: Dependency Injection
Dependency Injection has been a design principle that the PHP community has embraced more fully than a lot of other programming communities. There's even an official PHP-FIG standard being discussed called PSR-11 which will standardise dependency injection containers. Today we chat all things dependency injection.

Laravel News Podcast LN35: Interview with Mohamed Said, Laravel's First Employee
Get to know Mohamed Said in his first ever interview, where we discuss how he got into programming, being Laravels first ever employee, and what it's like working with Taylor Otwell.

LaraChat Live - Episode #24 Tony Lea (
Today we talk with Tony Lea of Tony will talk with us about Voyager as an open source package and making money with side projects in Laravel.

The Laracasts Snippets Episode 61: The Quest to Upgrade and Update
Moving to a new server while upgrading to the latest version of a framework is always a scary thing. Even the smallest change can send you down a two hour rabbit hole, as you search for a solution. In this episode, I discuss my basic process, as well as the tools I prefer.

PHP Ugly Podcast #56:Johnny Apple Seed(er)
Topics this week include an introduction to Mastodon and the release of Laravel 5.4.17.

North Meets South Web Podcast Episode 26 - Docker, Rancher, and Geocities with TJ Miller
In this episode, Jake and Michael are joined by TJ Miller to talk about Docker, Rancher, and journeys in development through Geocities and MySpace.

Reading and Viewing

PHP Town Hall Podcast #53: Developer Relations, Travel, and Bedbugs with Jessica Rose
Amanda Folson and Ben Edmunds are joined by Jessica Rose to discuss developer relations, travel, and bedbugs. Watch the video here.

Acquia Podcast: No One Wants a Website - Don't Sell Drupal, Move Up The Value Chain!
Thank you, Drupal community - I want to express my sincere thanks to everyone who helped me prepare this presentation, sharing their insights into how Drupal fits into bigger and better ways of doing business. The fact that we can all talk about this so openly while competing for business is one more sign of how special the Drupal community is. I’m so glad you all choose to “open source” some of the ways you are succeeding and help the rest of us along the way! And thank you Drupal Camp London organisers for the invitation to give a keynote address at your conference, and thanks to the audience for your presence and warm reception despite the early hour on Sunday. Watch the video here.

Cloudways Interviews Ivelina Dimova of Crowd Favorite
Ivelina Dimova is an enthusiastic web developer with an immense passion for WordPress. She has gained vast years of experience in various web applications (PHP, Drupal, WordPress) and many other custom frameworks. Her experience is not only limited to the back-end development, but her contributions also expand to plugin and theme development. She has also worked with WordPress Genesis Framework and Hybrid Core Framework. She has created entire projects for various clients from scratch. Her contributions don’t limit till here but also expand to WooCommerce projects including plugin customisation and much more.

PHP UK Conference 2017 Videos Have Been Released
All sessions from the PHP UK Conference were recorded. Last week the organisers released all the videos. Here’s the entire playlist.


Do you have a position that you would like to fill? PHP Weekly is ideal for targeting developers and the cost is only $50/week for an advert.  Please let me know if you are interested by emailing me at [email protected]

Interesting Projects, Tools and Libraries

Engintron for cPanel/WHM is the easiest way to integrate Nginx on your cPanel/WHM server.

A thing to make PHAR self-updates easy and secure.

Simple PHP library to improve verbosity in HTTP response codes.

This bundle is a replacement for the controller system of the Symfony framework and for its command system.

A WordPress plugin to combine CSS and Javascript files.

This is a userland replacement for PHP's native get_browser() function, which is officially supported by the Browser Capabilities Project.

The environment for local web development, ready for use. 

PHP client capable of executing Celery tasks and reading asynchronous results.

The next-generation Q&A and Forum software that makes online discussion, question and answer site for professional and enthusiast people. 

This is an "obfuscator" for PSR/OOp PHP code.

Promises/A+ library for PHP with synchronous support.

PHP client library for interacting with a RETS server to pull real estate listings, photos and other data made available from an MLS system.

Fast router and dispatcher built on top of FastRoute.

A SQL query builder for PHP with zero dependencies.

Please help us by clicking to our sponsor:

encrypt php scriptsProtect your PHP Code
Why not try SourceGuardian 11. Click here to download a 14 Day Trial copy. Protect your code using Windows, Linux or Mac and run everywhere with our free Loaders.

So, how did you like this issue?

Like us on FacebookFollow us on Twitter
We are still trying to grow our list. If you find PHP Weekly useful please tweet about us! Thanks.
Also, if you have a site or blog related to PHP then please link through to our site.

unsubscribe from this list | update subscription preferences 

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 ©