Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

An Elephpant In The Code

<?php

// decimal version
echo mb_chr(128024);

// hexadecimal version
echo "\u{01f418}";

When there is a need an elePHPant in a text, PHP always have one ready: well, an elephant, at least.

The unicode for an elephant is 128024 or 0x1F418. It may be used directly inside a string, or with the mb_chr() function, and not with the chr function, which is only handling a single byte.

See Also

PHP Features

Last updated: 10 September 2026