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

Laravel News:
Take a deep dive into the Laravel core
Jun 12, 2017 @ 09:48:07

On the Laravel News site there's a post about a new resource for learning more about Laravel and how the framework really works: Diving Laravel.

Mohamed Said, creator of the Laravel Forge SDK, Laravel Language Manager, and more has launched a new learning resource called Diving Laravel. [...] The site currently has the following topics, and more will be added in the future: The Exception Handler, The Task Scheduler, Package Auto Discovery, The Notifications System, and Diving Redis.

The site breaks each of the components down into "dives" with smaller tutorials covering different aspects in each. All of the content is free for anyone that wishes to get a more in-depth look at what happens under the covers when Laravel handles your code.

tagged: laravel core deepdive divinglaravel resource learning

Link: https://laravel-news.com/laravel-deep-dive

Frank de Jonge:
Battle Log: Symfony Routing performance considerations.
Feb 28, 2017 @ 10:55:24

In a new post to his site Frank de Jonge shares his "battle log" when looking into routing performance considerations in Symfony after a "deep dive" into the component's code.

Last week I took a deep dive into Symfony's Routing Component. A project I worked on suffered from a huge performance penalty caused by a routing mistake. This lead me on the path to discovering some interesting performance considerations. Some common practices align nicely with Symfony's optimisations, let's look into those.

He starts off by describing the process he took to start the investigation and what prompted him to investigate the performance issue. He talks about his use of profiling to locate the bottleneck and track down the root cause. He answers the five "why's" about the issue and uses that to guide an approach. Ultimately he located the source of the issue - YAML parsing that shouldn't have been needed - and what the component does to make it more performant in non-development environments. He ends the post with a list of four performance considerations as you're going through your own development to get the most out of the component.

tagged: symfony performance routing considerations deepdive

Link: https://blog.frankdejonge.nl/symfony-routing-performance-considerations/

Matt Stauffer:
Introducing Laravel Spark: A Deep Dive
Sep 17, 2015 @ 10:54:01

In a previous post to the Laravel News site, the latest offering in the Laravel ecosystem, Spark, was introduced. In this post Matt Stauffer takes a "deep dive" into its features and functionality, digging down into the code to see what makes it tick.

If you've been around on the general Laravel-interested Internet over the last month or two, or if you attended Laracon US or Laracon EU, you've probably already heard of Laravel Spark. If you haven't, check out Taylor's introductory video from Laracon EU.

I've held off on writing about it until now, because it has changed a lot over the span of its development. It's released as an Alpha now, so the API has solidified some... but it'll still change quite a bit between now and the release. [...] This is, instead, a deep-dive into how it works and what it does. I'll be writing a more general introduction to Spark once it's actually released, so beware: this is a bit of a deeper dive, for people geeky enough to want to look at an alpha release.

He starts with a recap and a high-level overview of the system, what it's designed to do and how to get it installed (either in a fresh install or an existing application). He then starts breaking down the pieces that make up the system:

  • changes made to files in your current application
  • details on the contents of the SparkServiceProvider
  • the addition of an app.js defining the VueJs bootstrap for the interface

He then starts looking at the interface, showing how to register a new user (with two-factor auth), work with the "teams" functionality to group users and create payment and plan options for your products.

tagged: laravel spark deepdive internal overview alpha release

Link: https://mattstauffer.co/blog/introducing-laravel-spark-a-deep-dive

Joshua Thijssen:
Deepdive into the symfony2 security component: part 1
Oct 20, 2014 @ 10:26:33

On the latest post on his site Joshua Thijssen has kicked off a series taking a deep dive into the Symfony security component, a key piece in the security of Symfony-based applications. In this first part of the series he introduces the component and starts in on some of the features it offers.

Once in a while I like diving into code and see how things work under the hood. And as the symfony2 framework consists of many different components, bundles and bridges, there is a lot to discover. But ultimately, the code itself mostly isn’t really as complex as it might seem from the outside world: just like a good magic trick, once unraveled, it all seems very simple and makes sense.

However, this is not true for one of those components: the security component. This black box full of dark magic doesn’t like to give up its secrets, and after some (miserably) failed attempts, I am trying to unravel it once more in a few blog posts. Either we achieve complete victory, or fail yet again.. At this point, I will give both fair odds.

He starts off with an overview of the component, pointing out the two main things is handles: authentication and authorization. He also pulls in a few other things to do with security in Symfony to give a more complete, well rounded picture - the component itself, the security bundle and security bridges. He gets into a bit more detail about this last one and describes their specific use.

tagged: symfony security bundle component overview deepdive series part1

Link: https://www.adayinthelifeof.nl/2014/10/19/deepdive-into-the-symfony2-security-component-part-1/

Joshua Thijssen:
SPL Deepdive: RegexIterator
Feb 13, 2014 @ 11:18:55

Joshua Thijssen has posted a deep dive with the RegexIterator to his site today. This iterator is part of the SPL (Standard PHP Library) that is included with PHP. It allows you to filter items based a given regular expression.

If everything goes according to plan (which never is the case), I’ll try and highlight some of the fascinating stuff that can be found inside the SPL. I do a lot of presentations about the SPL, and one of the things I like to tell people is that even though the SPL, – iterators particularly – is a magnificent piece of code that is often underused and misunderstood, it does come with some quirks and glitches that aren’t documented properly. Today, i’ll explain a bit indepth the RegexIterator. This iterator extends the FilterIterator, meaning it can be used to filter out unwanted entries from parent iterators.

He gives a brief example of it in use to filter the results from a DirectoryIterator but quickly gets into the more advanced functionality. He looks at the different "modes" it can operate in: all matches, get matches, match, replace and split. He includes code examples and explanations for each of them, including the resulting output. He also shows how to filter based on the keys instead of values and briefly mentions the "preg_flags" but doesn't get too far into them as they change based on the mode being used.

tagged: spl standardphplibrary regexiterator deepdive tutorial

Link: https://www.adayinthelifeof.nl/2014/02/12/spl-deepdive-regexiterator