| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  | 	function utf8ize($_array) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  | 		return travelStringArray($_array,"utf8_encode"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  | 	} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  | 	function unutf8ize($_array) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  | 		return travelStringArray($_array,"utf8_decode"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  | 	} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  | 	function arraySlash($_array) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  | 		return travelStringArray($_array,"addslashes"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  | 	} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  | 	function arrayHtmlParser($_array) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  | 		return travelStringArray($_array,"htmlParser"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  | 	} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  | 	function travelStringArray ( $_array, $_function ) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  | 		if (is_array($_array)) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  | 			foreach ($_array as $k => $v) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  | 				$_array[$k] = travelStringArray($v, $_function); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  | 			} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  | 		} else if (is_string ($_array)) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  | 			return call_user_func($_function,$_array); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  | 		} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  | 		return $_array; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  | 	} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  | 	function arrayDepth( $_array ) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  | 		$maxDepth = 1; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  | 		foreach ($_array as $value) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  | 			if (is_array($value)) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  | 				$depth = arrayDepth($value) + 1; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  | 				if ($depth > $maxDepth) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  | 					$maxDepth = $depth; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  | 				} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  | 			} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  | 		} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  | 		return $maxDepth; | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 35 |  |  | 	} | 
            
                                                        
            
                                    
            
            
                | 36 |  |  | 	function arrayDump( $_array, $_name = "Array", $_tab = "  " ) { | 
            
                                                        
            
                                    
            
            
                | 37 |  |  | 			$position = preg_replace('/  /', '', $_tab, 1); | 
            
                                                        
            
                                    
            
            
                | 38 |  |  | 			echo "$position<span style=\"color:rgb(230,0,0)\">$_name:</span><br>"; | 
            
                                                        
            
                                    
            
            
                | 39 |  |  | 			foreach ($_array as $k => $i) | 
            
                                                        
            
                                    
            
            
                | 40 |  |  | 				if(is_array($i)) | 
            
                                                        
            
                                    
            
            
                | 41 |  |  | 					arrayDump( $i, $k, "  $_tab" ); | 
            
                                                        
            
                                    
            
            
                | 42 |  |  | 				else | 
            
                                                        
            
                                    
            
            
                | 43 |  |  | 					echo "$_tab<b>$k:</b> $i<br>"; | 
            
                                                        
            
                                    
            
            
                | 44 |  |  | 		} | 
            
                                                        
            
                                    
            
            
                | 45 |  |  | ?> | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                        
            
                                    
            
            
                | 46 |  |  |  | 
            
                        
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.
A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.