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 \0 in 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.
These posts are for my own understanding. Reader beware. Info may be wrong but it reflects my current understanding.