Looking for more information on how to do PHP the right way? Check out PHP: The Right Way


Danny van Kooten:
Moving from PHP (Laravel) to Go
Apr 27, 2017 @ 10:14:04

Danny van Kooten has an interesting post on his site sharing his experience in converting a Laravel-based application to Go, briefly describing some of the changes made, performance differences and the lines of code required.

Earlier this year, I made an arguably bad business decision. I decided to rewrite the Laravel application powering Boxzilla in Go.

No regrets though.

Just a few weeks later I was deploying the Go application. Building it was the most fun I had in months, I learned a ton and the end result is a huge improvement over the old application. Better performance, easier deployments and higher test coverage.

He talks about why he selected Go and some of the external services he would need to interface with to make the transition complete. He then gets into the actual porting of the codebase and some of the challenges involved to replace Laravel functionality. With the application ported, he then compares the performance of the Laravel application versus the Go version, sharing the request of requests/second for each. He finishes out the post looking at a lines of code comparison between the two and how testing was handled on the Go side.

tagged: laravel move rewrite application go summary experience performance

Link: https://dannyvankooten.com/laravel-to-golang/

Cal Evans:
Thank you Derick Rethans for 15 years of XDebug
Apr 27, 2017 @ 09:38:58

Recently the Xdebug PHP debugging tool turned 15 and PHP community member Cal Evans wanted to do something special for the author, Derick Rethans. He started a secret fundraiser to gather contributions from all around the community and used the funds to purchase Derick several bottles of his favorite beverage. In this new post to his site Cal shares some about XDebug, Derick and a video of James Titcumb presenting Derick with his present.

There are a handful of tools that have actually changed how many of us code PHP. XDebug is one of those tools[1]. There is no doubt of the impact that XDebug has has on PHP developers and PHP projects.

Recently, XDebug turned 15. This means that the man responsible for XDebug, Derick Rethans, has been supporting XDebug for 15 years, for free. [...] So on this the (close to) anniversary of this product, many of us in the PHP community decided to do something to show Derick how much we appreciate it. Those that know him know that Derick loves a good Scotch. So we decided to buy him some.

Cal has the video embedded in the post (or here on YouTube) and offers thanks to the people and groups that helped to make the project successful.

tagged: celebrate xdebug fifteen years derickrethans gift donation

Link: https://blog.calevans.com/2017/04/26/thank-derick-rethans-15-years-xdebug/

Site News:
Blast from the Past - One Year Ago in PHP (04.27.2017)
Apr 27, 2017 @ 08:05:01

Here's what was popular in the PHP community one year ago today:

tagged:

Link:

Voices of the ElePHPant:
Interview with Adam Englander
Apr 26, 2017 @ 12:52:14

The Voices of the ElePHPant podcast, hosted by PHP community member Cal Evans, has posted its latest interview with a member of the PHP community. In this latest show Cal talks with Adam Englander, Senior Engineer at Iovation.

Cal and Adam talk about the work Adam does in cryptography circles and some of the main issues he sees developers using over and over. They also talk about some of the current PHP functionality around hashing, multi-factor authentication, the use of JWT/JOSE for authentication. They also talk about the Lets Encrypt service and how it's helping to make the web a safer place.

You can listen to this latest episode either using the in-page audio player or by downloading the mp3 directly. If you enjoy the episode, be sure to subscribe to their feed and follow them on Twitter for updates when new shows are released.

tagged: voicesoftheelephpant community interview adamenglander podcast

Link: https://voicesoftheelephpant.com/2017/04/25/interview-adam-englander/

TutsPlus.com:
Working With PHP Arrays in the Right Way
Apr 26, 2017 @ 11:57:09

If you're relatively new to the PHP language and are just getting your feet wet, the massive amounts of array functionality included in the language could be confusing. This is where this new article on the TutsPlus.com site comes in, showing you how to work with PHP arrays "the right way".

n this tutorial, I am going to make a list of common PHP array functions with examples of usage and best practices. Every PHP developer must know how to use them and how to combine array functions to make code readable and short.

Also, there is a presentation with given code examples, so you can download it from the related links and show it to your colleagues to build a stronger team.

He starts out with some of the basics around using arrays in PHP and then quickly moves into other topics:

  • shortening code with functions like list
  • using the filtering functions
  • walking through array values
  • joining arrays
  • generating arrays
  • sorting the contents of arrays

He ends the post with a look at combining array functions to make it simpler to do things like remove empty values or return just the top three values.

tagged: tutorial introduction array functionality language

Link: https://code.tutsplus.com/tutorials/working-with-php-arrays-in-the-right-way--cms-28606

Delicious Brains Blog:
Microcaching WordPress in Nginx to Improve Server Requests by 2,400%
Apr 26, 2017 @ 10:18:40

The Delicious Brains has a new tutorial posted sharing a method you can use to setup microcaching in Nginx for your WordPress installation and improve the performance of server requests by a large margin.

We’ve talked a lot about WordPress performance and hosting WordPress here at Delicious Brains. A common theme amongst those articles is the importance of page caching and how it’s arguably the best way to improve the performance of your WordPress site. [...] However, we’ve also alluded to the fact that page caching is difficult to implement on highly dynamic sites.

[...] In these circumstances page caching still has its place but the duration of the cache has to be significantly reduced. This is known as microcaching. Microcaching is a technique where content is cached for a very short period of time, usually in the range of 1-10 seconds. In this article, I’m going to demonstrate how to configure WordPress and bbPress with Nginx FastCGI caching.

They start off with some initial benchmarks performed using the Blitz.io service against a clean WordPress install on a Digital Ocean droplet. The first results are of a test with 100 concurrent users over 60 seconds (with not so great results). Then, using this method in the Nginx configuration, the site is retested resulting in much better performance but with one downfall - the pages are cached and no longer dynamic.

To resolve this they move to the "microcaching" solution, adding the caching to parts of the application that aren't the forum using the "X-Accel-Expires" header sent from WordPress. The post ends with a bit more tweaking to the configuration and some caveats to its use.

tagged: wordpress caching microcaching nginx tutorial dyanmic benchmark

Link: https://deliciousbrains.com/microcaching-wordpress-nginx-improve-server-requests-2400/

Laravel News:
Building an Interactive Voice Response System with Laravel and Nexmo
Apr 26, 2017 @ 09:37:45

On the Laravel News site there's a new tutorial posted showing you how to create a simple iVR system with Laravel and Nexmo that includes voice responses.

Want to dial your Laravel app, and have it talk back to you? Let’s take a quick look at how to build a really simple IVR (interactive voice response) – a ‘phone menu’ – with Laravel and Nexmo. When it’s done, you’ll be able to pick up your cell phone, dial a phone number, and have your Laravel app control what you hear.

It’s probably easier than you think, let’s get started!

Using a standard Laravel application and a Laradoc environment, they pull in the nexmo/laravel to connect with the Nexmo service. They also add two others to add additional functionality for reading Tweets and RSS feeds. After configuring the application providers to pull in the Nexmo and Twitter functionality they go over to the Nexmo site and create the application they'll use. The tutorial then shows how to generate a command (the AppCreate command), its signature and the code to make the Nexmo API request. They then create another command to link the application to numbers on the Nexmo account.

Finally, they get to the "good" part - creating the code to handle the incoming calls over webhooks. This includes the controller, routes and - based on user input - how the IVR will respond. In their example, when the number is called, the latest tweet from @taylorotwell is fetched and is converted to text, then spoken back to the caller.

tagged: tutorial ivr voice response system laravel nexmo api

Link: https://laravel-news.com/laravel-hotline-ivr

Community News:
Recent posts from PHP Quickfix (04.26.2017)
Apr 26, 2017 @ 08:05:02

Recent posts from the PHP Quickfix site:

tagged:

Link:

PHP Town Hall Podcast:
Episode 53: Developer Relations, Travel, and Bedbugs with Jessica Rose
Apr 25, 2017 @ 13:19:29

The PHP Town Hall podcast, with hosts Amanda Folson and Ben Edmunds, has released its latest episode: Episode #53 - Developer Relations, Travel, and Bedbugs with Jessica Rose . Jessica is the lead of developer relations at Crate.io, the company that created the CrateDB product.

Jessica talks about some of her own experiences in developer relations along with some of Amanda's own experiences doing the same in past roles. They also talk about the strain developer relations can put on other parts of peoples' lives and different perspectives on work. They also talk about programming bootcamps, online training, hammocks and speaking at conferences.

You can catch this latest episode either using the in-page audio or video player or you can download the audio and listen offline. If you enjoy the show you can subscribe to their feed to get the latest episodes as they're released.

tagged: phptownhall ep53 benedmunds amandafolson developer relations travel budbugs

Link: https://phptownhall.com/dev-rel-travel-bedbugs/