Null and the Null Byte
December 21, 2021
note-to-self
The null keyword vs a null byte. They are not the same.
Null Keyword:
- Represents the absence of a value.
- Used in various programming languages to indicate a variable has no assigned value.
- In PHP, it's represented as
null.
Null Byte:
- A single byte with a value of zero.
- Represented as
\0in many programming languages. - Often used as a string terminator in C-style languages.
- Can be used to manipulate strings and file paths in certain contexts.
Most posts are for my own reference and reflection, and shouldn’t be taken as fully accurate or instructional.