I and lately I\'m seeing h()
and e()
functions in PHP. I have googled them, but they are so short that results don\'t give any idea of what they are. I
Likely the framework you're using is doing some escaping and has defined some short hands for htmlentities
and htmlspecialchars
or equivalents.
I'd do a search on whatever framework you're using for "function h("
http://book.cakephp.org/view/121/Global-Functions these are shortcut functions in cakePHP
Many of them are deprecated in 1.3 so beware of using them yourself
h()
is global function in CakePHP. Documents about h()
for CakePHP version 2.5.7 : http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#global-functions
Laravel also use e()
helper function to runs htmlentities over the given string.
echo e('<html>foo</html>');
// <html>foo</html>
documentation : https://laravel.com/docs/5.8/helpers#method-e
As several readers have said, these are CakePHP-specific short-cuts. You can find them in the API docs at: here (for CakePHP 2.x)
I think I read that some of these are going to be removed in 1.3, personally I never used e() as typing echo really doesn't take that much longer :)
edit: e() is deprecated in 1.3 and no longer available in 2.0 see here
If you are using a decent editor press ctrl and click on the function. It should take you to the function's declaration.