Now that you have some tests I'd really like to move the callback to a defined function. create_function is terrible for static analysis and creates a new function with *every call* of parse_url(): All the evil of eval() and eating up memory, too.