php e() and h() functions?

It looks like it might be CakePHP.

See e()

e (mixed $data)

Convenience wrapper for echo().

This has been Deprecated and will be removed in 2.0 version. Use echo() instead.

See h()

h (string $text, string $charset = null)

Convenience wrapper for htmlspecialchars().


Most likely, they are dummy functions someone introduced for the sake of brevity. The h(), for example, looks like an alias for htmlspecialchars():

function h($s)
{
    return htmlspecialchars($s);
}

So look for them in the include files. Espec. the ones with names likes "util.php" or "lib.php".


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

Tags:

Php

Cakephp