Skip to content

Instantly share code, notes, and snippets.

@necenzurat
Last active December 15, 2015 14:49
Show Gist options
  • Save necenzurat/5277692 to your computer and use it in GitHub Desktop.
Save necenzurat/5277692 to your computer and use it in GitHub Desktop.
<?php
$var = NULL "" 0 "0" 1
strlen($var) = 0 0 1 1 1
is_null($var) = TRUE FALSE FALSE FALSE FALSE
$var == "" = TRUE TRUE TRUE FALSE FALSE
!$var = TRUE TRUE TRUE TRUE FALSE
!is_null($var)= FALSE TRUE TRUE TRUE TRUE
$var != "" = FALSE FALSE FALSE TRUE TRUE
$var = FALSE FALSE FALSE FALSE TRUE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment