lib/Inflector/Methods.php
public static function humanize($lower_case_and_underscored_word){
		$result = $lower_case_and_underscored_word;
		foreach(static::inflections()->humans as $rule => $replacement){
			if(($result = preg_replace($rule, $replacement, $result, 1)))break;
		};
		$result = preg_replace('/_id$/', "", $result);
		$result = strtr($result, '_', ' ');
		return ucfirst(preg_replace_callback('/([a-z\d]*)/i', function($matches){
			return isset(static::inflections()->acronyms[$matches[0]]) ? static::inflections()->acronyms[$matches[0]] : strtolower($matches[0]);
		}, $result));
	}
public static function humanize($lower_case_and_underscored_word){
		$result = $lower_case_and_underscored_word;
		foreach(static::inflections()->humans as $rule => $replacement){
			if(($result = preg_replace($rule, $replacement, $result, 1)))break;
		};
		$result = preg_replace('/_id$/', "", $result);
		$result = strtr($result, '_', ' ');
		return ucfirst(preg_replace_callback('/([a-z\d]*)/i', function($matches){
			return isset(static::inflections()->acronyms[$matches[0]]) ? static::inflections()->acronyms[$matches[0]] : strtolower($matches[0]);
		}, $result));
	}
public static function humanize ( $ lower_case_and_underscored_word ) { $ result = $ lower_case_and_underscored_word ; foreach ( static :: inflections ( ) -> humans as $ rule => $ replacement ) { if ( ( $ result = preg_replace ( $ rule , $ replacement , $ result , 1 ) ) ) break ; } ; $ result = preg_replace ( '/_id$/' , "" , $ result ) ; $ result = strtr ( $ result , '_' , ' ' ) ; return ucfirst ( preg_replace_callback ( '/([a-z\d]*)/i' , function ( $ matches ) { return isset ( static :: inflections ( ) -> acronyms [ $ matches [ 0 ] ] ) ? static :: inflections ( ) -> acronyms [ $ matches [ 0 ] ] : strtolower ( $ matches [ 0 ] ) ; } , $ result ) ) ; }
Capitalizes the first word and turns underscores into spaces and strips a
trailing "_id", if any. Like +titleize+, this is meant for creating pretty output.

Examples:
titleize("employee_salary") # => "Employee salary"
titleize("author_id")       # => "Author"

@param string $lower_case_and_underscored_word
@return string Humanized $lower_case_and_underscored_word
@author Koen Punt
Capitalizes the first word and turns underscores into spaces and strips a trailing _id if any . Like + titleize + this is meant for creating pretty output .