Skip to content

Instantly share code, notes, and snippets.

@ScreamingDev
Created November 24, 2013 14:36
Show Gist options
  • Select an option

  • Save ScreamingDev/7627952 to your computer and use it in GitHub Desktop.

Select an option

Save ScreamingDev/7627952 to your computer and use it in GitHub Desktop.
Err... okay...
<?php
$err = array();
var_dump((bool) $err);
// bool(false) - obvoius, it is empty
$err = array(null);
var_dump($err, (bool) $err, empty($arr));
/*
array(1) {
[0] =>
NULL
}
bool(true) - sure, it has content, ...
bool(true) - ... doesn't it?
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment