Posts Tagged ‘Programming’

PHP Tutorial: A Quick Way to Break up a URL into usable Pieces

PHP has a built in function which allows for the quick breaking up of a well formed URL into usable pieces, namely parse_url. This function parses a URL and returns an associative array containing any of the various components of the URL that are present. It is important to note that parse_url does not validate [...]

Closures are coming to PHP

Dagfinn has a post looking at using the new closure feature of PHP 5.3. He compares using foreach for iteration versus array_map. “Interesting,” he concludes, “but not necessarily better than conventional alternatives.” I agree for that case. Consider instead, a more complicated operation that requires a setup and a tear down after. setup(); operation(); teardown();

Powered by WordPress | Designed by: best suv | Thanks to trucks, infiniti suv and toyota suv