note 88848 modified in function.empty by danbrown

From: Date: Thu, 12 Feb 2009 18:18:14 +0000
Subject: note 88848 modified in function.empty by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-150583@lists.php.net to get a copy of this message
<?php function _empty() { foreach(func_get_args() as $args) { if( !is_numeric($args) ) { if( is_array($args) ) { // Is array? if( count($args, 1) < 1 ) return true; } elseif(!isset($args) || strlen(trim($args)) == 0) return true; } } } return false; } ?> --was-- <?php function _empty() { foreach(func_get_args() as $args) { if( !is_numeric($args) ) { if( is_array($args) ) { // Is array? if( count($args, 1) < 1 ) return true; } elseif( !isset($args[1]) || strlen(trim($args)) == 0 ) { return true; } } } return false; } ?> http://php.net/manual/en/function.empty.php

« previous php.notes (#150583) next »