Enhanced print_r function for PHP