Page cover
githubEdit

phpPHP Type Juggling

PHP uses "Loose Comparisons" (==) which automatically converts data types to match before comparing.

chevron-rightBoolean via JSONhashtag
  • Send raw boolean values true or false instead of a string.

  • Ensure Content-Type is application/json.

circle-info

Payloads

{"password": true}
{"admin": true}
{"verified": true}

Last updated