Tag Archives: php

Private Packagist

Mid-December Nils Adermann – Co-Founder of Packagist Conductors & Creator of Composer for PHP – announced Private Packagist. Being a hosted service, setting up your own Composer package repository on Private Packagist is done with a few clicks. No matter … Continue reading

Elsewhere , , , Leave a comment

Facebook Live Reactions

Facebook Live Reactions is a Linux script for creating Facebook Live Streams that contains interactive reaction counts. It also includes an interactive shoutout feature that gives live shoutouts to users who typed “shared” into the comment box. The livestreaming itself … Continue reading

Elsewhere , , , Leave a comment

Using XDebug with PHPStorm

We assume that you use PHPStorm on a daily basis, and this guide will help to debug your code locally using the IDE. A remote debugging guide will come in the future. Make PHPStorm your new home – Configuring and … Continue reading

Elsewhere , , Leave a comment

(Laravel) Uptime Monitor

Today Freek from spatie released a new package: Laravel-uptime-monitor is a powerful, easy to configure uptime monitor. It will notify you when your site is down (and when it comes back up). You can also be notified a few days … Continue reading

Elsewhere , , , Leave a comment

Getting ready for PHP 7.1

In short: Catching multiple exception types Curl HTTP/2 server push support Support class constant visibility Void return types Generalize support of negative string offsets Allow specifying keys in list() and square bracket syntax for array destructuring Warn about invalid strings … Continue reading

Elsewhere , Leave a comment

Minify: A JavaScript and CSS Minifier Written in PHP

MatthiasMullie\Minify is a JavaScript and CSS Minifier written in PHP. Usage is straightforward: use MatthiasMullie\Minify; $sourcePath = '/path/to/source/css/file.css'; $minifier = new Minify\CSS($sourcePath); // we can even add another file, they'll then be // joined in 1 output file $sourcePath2 = … Continue reading

Elsewhere , , , , Leave a comment

Improving readability using array_filter

Great trick by Freek Van der Herten: instead of selectively adding fields onto an array after having verified them to not being falsy – resulting in lots of if blocks in the code – it’s actually a lot easier/readable to … Continue reading

Elsewhere , Leave a comment

Validating SSL certificates with PHP

Great stuff again by Freek Murze from Spatie: A PHP class to easily check the validity of an SSL Certificate. Easily? Yes, easily: $certificate = SslCertificate::createForHostName(‘spatie.be’); $certificate->getIssuer(); // returns “Let’s Encrypt Authority X3” $certificate->isValid(); // returns true if the certificate … Continue reading

Elsewhere , , Leave a comment

Cauditor – PHP Code Audit and Visualisations

Great tool by Matthias Mullie, to analyzing your PHP code (in the screenshot above you can see the analysis of ansi-php): Figure out complexity hotspots in the blink of an eye from a couple of very simple charts [generated by … Continue reading

Elsewhere , , , Leave a comment

PHP HTTP Public-Key-Pinning Builder

HTTP Public-Key-Pinning Builder aims to make it easy to build HTTP Public-Key-Pinning headers in your PHP projects. As so: <?php use \ParagonIE\HPKPBuilder\HPKPBuilder; $hpkp = HPKPBuilder::fromFile('/path/to/source.json'); $hpkp->sendHPKPHeader(); { "hashes": [ { "algo": "sha256", "hash": "hwGEkxDWJ2oHtKv6lsvylKvhotXAAZQR1e0nq0eb2Vw=" }, { "algo": "sha256", "hash": "0jum0Eiu4Eg6vjn3zTmyd/RobfN6e4EagFQcz6E5ZKI=" … Continue reading

Elsewhere , , Leave a comment