Odd PHP Functions

Scott Truesdell

Last change: Sunday, Nov 11, 2012, 10:42 pm, PST — File created: November 11, 2012

Here are a few of the most useful functions in PHP:
gzgetss() - read a line out of a gzipped file and strip HTML tags
extract() - dynamically destroy local scope
phpcredits() - prints out credits
set_magic_quotes_runtime() - curse your runtime environment with evil spirits
mysql() - undocumented mystery function, call it for yourself!
array_change_key_case() - changes the case of all keys in an array
array_uintersect_uassoc() - simplifies the common operation of map + intersect + map + intersect
mysql_escape_string() - escape a string incorrectly
eval() - gateway to realms of wonder
strstr() - like the C function of the same name, but with a much worse best-case complexity
var_export() - detect cycles in data structures (by crashing)
import_request_variables() - long live register_globals
class_alias() - dependency injection the PHP way
clearstatcache() - just in case you don't want the language to cache results for you