Skip to content

Glossary: PHP Basics

bin2hex()

Also written: bin2hex

A function that turns raw bytes into readable letters and digits. With `random_bytes(16)` it produces a 32-character random token.

Where the book teaches it

Related terms

random_bytes()CSRF token