Type Hinting Callable Functions in PHP

As of PHP 5.4, you can type hint your method arguments with the callable keyword allowing you to enforce the type of data that is passed via your arguments . Let’s look at an example where we create a Sort class, with a custom method that takes a callable function so that we can customize […]

Read More »