Skip to content

Instantly share code, notes, and snippets.

@jeff1326
jeff1326 / Function.Array-Group-By.php
Last active August 31, 2018 19:55 — forked from mcaskill/Function.Array-Group-By.php
PHP : Groups an array by a given key
<?php
if (!function_exists('array_group_by')) {
/**
* Groups an array by a given key.
*
* Groups an array into arrays by a given key, or set of keys, shared between all array members.
*
* Based on {@author Jake Zatecky}'s {@link https://github.com/jakezatecky/array_group_by array_group_by()} function.
* This variant allows $key to be closures.
@jeff1326
jeff1326 / shellcommand.sh
Last active October 28, 2019 11:37 — forked from anonymous/shellcommand.sh
script to parse PHP short open tags and convert ones to normal
find project/dir/ -type f -iname "*.php" -exec php -d short_open_tag=On the_script.php {} \;