Websitegärtner's tool shed.

A completely disorganised collection of short technical documentation, instructions and templates for self-service. Many of the snippets helped us with web development at the time, but consider the creation date of the contributions as the best-before date, because some of them are no longer "up to date".

Category "php".

View all articles
  • Ternary Operator ?: versus Null Coalescing Operator ?? versus Null Coalescing Assignment Operator ??= explained by cats

    In short, PHP provides two useful operators to simplify condition checking: the ternary operator (?:) and the null coalescing operator (??). Both operators are used to...

    To the article...
  • Shortcode E-Mail Obfuscator

    The following shortcode snippet is useful for disguising emails to protect them from SPAM. Please note that this method only works if Javascript is activated...

    To the article...
  • TranslatePress renders individual language selector for default language incorrectly

    Problem: When creating a custom language selector for TranslatePress: $arr = trp_custom_language_switcher(); $arr returns a multidimensional array with all the necessary parameters to create a custom language selector....

    To the article...
  • Setting up XDebug with PHPStorm and Valet Development Environment

    Preparation: Homebrew should be installed Valet should be installed and running: https://laravel.com/docs/7.x/valet Browser Extension for PHPSTORM should be installed: https://www.jetbrains.com/help/phpstorm/browser-debugging-extensions.html gerry@webgarten ~ % brew install...

    To the article...