Functions WebDev/*nix assorted functions & hacks

Search find all
Strings assoc_to_ini($array) befuddle($data, $key, $way = 1) columns($array, $keys=false, $delim=' ') diff grep head($str, $int) htmlents($string) json_clean_decode($json) lsp2tb($string, $tablength = 2) make_csv($data, $delim = ',') mb_str_split($str) nl2unix/mac/dos($string) order_columns($str, array $order) parse_cli($string) rawurlencodeall($string) replace_hash_names($string, $assoc) rstring($len=16) str2arr($string, $del="\t", $le="\n"), str2matrix(...) str2bytes($str) // "2mb" to 2097152 stringToAssoc($string, $bool = false) stro_replace($search, $replace, $subject) strtoint($str), inttostr($int) str_between($str, $start, $end) str_word_count_utf8($string, $format=0) urlify 25 found

auth

Greetings!

What you see here is a growing collection of functions/stuff I've collected and created over the years.
I've put them online so they're at hand wherever I do PHP stuffs, and to have a place that will always have the latest versions of them (theoretically).
You can redistribute and/or modify most (some are not mine) functions and source code offered here under the terms of the GNU
General Public License, available at gnu.org/licenses.
If I didn't write it, it should mention a source url.

Then, there's non-PHP stuff like TextMate commands, Linux tricks & URLs, mod-rewrite & regex, some ancient shellscripts (don't use),
Firefox config settings, OS X tricks, etc etc..

This being the first re-write, I added some shortcuts: j/k for next/previous function in the (found) list, f(ind) to jump to the search box.
When clicking a category, it should still be focused after the page load for easier kb navigation.
In the URL, replacing the id by qs prints just the function in plaintext, like this: funcs.php?qs=264.

M. Spreij <gmail.com@mspreij>

PS. apologies for some functions being way out of date.. the higher their id, the more trustworthy they are :-)
Footer