Belt: A Handful Of Tools For PHP Developers
longren.io
longren.io
One criticism. There appears to be many 1 to 1 equivalents to existing PHP functions. For instance:
<?php Belt::max([1, 2, 3]); // 3 ?>
Does the same thing as the built-in max() function: <?php max(array(2, 5, 4)); // 5 ?>
The Belt::is* functions seem to have many direct equivalents to the built-in PHP is_* functions like is_array, is_null, is_numeric, etc. The Belt::indexOf() function appears to be the equivalent of array_search() - with array_search() being the better function, as it has an additional third parameter to control strict type checking.If there is a substantive difference between these functions it should be documented.