Code snippets

You will find here 3 code snippets I find useful so I don't have to Google β„’ or Stackoverflow β„’ them when I need. There are also code snippets I always forget! 😁 Sometimes, related links to the code will be available. The main difference with other random snippets you will find on the web is that in most cases (for the Symfony related ones) you will be able to run them directly from this website to check the output so you can verify it works as expected β„’.

This snippet shows how to fix the Β«pcre2.h file not foundΒ» error when compiling a PHP PECL extension with brew. Replace both 10.44...

PHP

Published on 2024-11-29 • Modified on 2024-11-29

 View the code


This snippet shows how to install a beta version of a PHP PECL extension. For example, when PHP 8.4.1 was released; we had the fol...

PHP

Published on 2024-11-24 • Modified on 2024-11-24

 View the code


I always forget this one. We must set the preferred_state setting. Once the package is installed, you can restore the previous set...

PHP

Published on 2020-04-01 • Modified on 2020-04-01

 View the code