A Look At PHP’s isset()

Link – medium.com

Liam Hammet wrote a good blogpost on the isset language construct.

Let’s take a look through how isset behaves and what’s so special about it. Even if you’re a veteran PHP developer, hopefully, you’ll pick up something new here.

Read more [medium.com]

Sending and receiving webhooks in Laravel apps

Original – by Freek Van der Herten – 8 minute read

A webhook is a mechanism where an application can notify an other application that something has happened. Technically, the application sends an HTTP request to that other application. In this blog post, I'd like to introduce you to two packages that we recently released. The first is…

Read more

Stay up to date with all things Laravel, PHP, and JavaScript.

Every two weeks I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.

Timelapse of the future

Link –

An amazing video on the fate of our universe.

To me, this overhead view of time gives a profound perspective - that we are living inside the hot flash of the Big Bang, the perfect moment to soak in the sights and sounds of a universe in its glory days, before it all fades away. Although the end will eventually come, we have a practical infinity of time to play with if we play our cards right. The future may look bleak, but we have enormous potential as a species.

Read more

Typed properties in PHP

Link – stitcher.io

Brent wrote another nice post on PHP. This time on the upcoming typed hints feature of PHP 7.4.

Typed class properties were added in PHP 7.4 and provide a major improvement to PHP's type system. These changes are fully opt-in and backwards compatible. In this post we'll look at the feature in-depth.

Read more [stitcher.io]

A package to control the flow of time

Original – by Freek Van der Herten – 2 minute read

Imagine you're building that your app can notify your user, but you don't want to send more than one notification in a timeframe of five seconds. How are you going to test the time aspect? Do you have to create a test that takes five minutes?

Read more

Your first performance budget with Lighthouse

Link – bitsofco.de

Ire Aderinokun, Front-End Developer and User Interface Designer, explains how you can Lighthouse in CI.

Until recently, I also hadn't setup an official performance budget and enforced it. This isn’t to say that I never did performance audits. I frequently use tools like PageSpeed Insights and take the feedback to make improvements. But what I had never done was set a list of metrics that I needed the site to meet, and enforce them using some automated tool.

Read more [bitsofco.de]

Learning Laravel - Observations, part 1: The service container

Link – matthiasnoback.nl

Matthias Noback wrote down some thoughts on the Laravel container

Laravel's service container looks great. I like the idea that it can figure things out mostly by itself. I like that it's PHP-based, and that its syntax is quite compact. I think that most of the convenience functions (e.g. resolve()) and exotic options (like $this->app->resolving()) should be ignored. The best thing you can do for your application in the long term is to let all your services use dependency injection, and to inject only constructor arguments. This keeps things simple, but also portable to other frameworks with other dependency injection containers, or other architectural styles, when the time is there.

Read more [matthiasnoback.nl]

Tests and types

Link – stitcher.io

My colleague Brent wrote another excellent blog post, this time on tests and types.

So while strong types can help us to ensure program correctness, some tests will always be a necessity to ensure business correctness. It's a matter of "both and", not "either or".

Read more [stitcher.io]

Refactoring to actions

Original – by Freek Van der Herten – 6 minute read

In our recent projects at Spatie, we've started using a concept called "actions". It keeps our controllers and models skinny. It's a straightforward practice. In this blog post, I'd like to explain it to you.

Read more

Internal classes in PHP

Link – nunomaduro.com

Nuno Maduro, engineer at Algolia, explains what is the value of the @internal tag

The PHP @internal tag can be used to denote that the associated class/method is internal to the library. It's supported by PHPStorm and it warns people that those classes/methods are not meant to be used

Read more [nunomaduro.com]

Sharing learning via code

Link – stakeholderwhisperer.com

Konstantin Kudryashov, one of the speakers at the upcoming Full Stack Europe conference, makes the case for sharing new insights early.

When you build new feature as a team, and it requires a lot of new learning, do not hoard new knowledge in your head. Instead, incrementally commit each unit of learning into working code. Hide that partial logic behind a feature flag. The feature would be incomplete, but work-in-progress outputs will expose meaningful and demonstrable progress. To increase team’s awareness of outputs, add links into the feature tracker or documentation.

Read more [stakeholderwhisperer.com]

A project at Spatie

Link – stitcher.io

My colleague Brent offers some insights on a big project we're currently working on at Spatie.

The month May marks the first year anniversary of a client project I've been working on at Spatie. I thought it useful to share some statistics with the community, and give you a feeling of what a "real life web project" might look like.

Read more [stitcher.io]

Parallel PHP: The Next Chapter

Link –

Joe Watkins, core contributor and pthreads author, is working on a new threading API for PHP called parallel. It might be a while before it is released.

Recently, I set to work on a new threading API, named Parallel, it is not an exact clone of any existing threading API, it is an API focused on being simple and hiding the complexity inherent in utilising parallelism in your application, it is also focused on being forward compatible with the JIT, for that day when we can actually execute machine code in userland and in parallel.

https://blog.krakjoe.ninja/2019/02/parallel-php-next-chapter.html

EDIT: meanwhile a stable version has been released. You can find it in this repo on GitHub.

Read more