District5
  • Home
  • Blog
  • Our Work
  • Contact Us
Tagged

PHP

A collection of 2 posts

Moving your PHP code into reusable composer packages
Development

Moving your PHP code into reusable composer packages

Writing code for anything takes time. Time usually spent lifting some components from other projects. After a while, you've probably already got 99% of the initial setup code for the new project elsewhere, floating around in your git repositories. Imagine just reusing this code from a single place in multiple

  • District5
District5 Sep 2, 2021 • 9 min read
Variable length argument lists for functions in PHP
Development

Variable length argument lists for functions in PHP

Ever found yourself needing a function that can take an arbitrary number of arguments? Luckily it's pretty easy to do in PHP (as of 5.6) with something called a variadic function. [Pre 5.6 you would need to rely on using func_get_args()] PHP's sprintf function is a

  • District5
District5 Sep 2, 2021 • 1 min read
District5 ©2016-2025 - All rights reserved
  • Data & privacy
  • Contact