note 19250 deleted from function.count by philip

From: Date: Fri, 13 Dec 2002 00:28:30 +0000
Subject: note 19250 deleted from function.count by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-40835@lists.php.net to get a copy of this message
If your goal is not to get the "size" of an array but to find out if it is empty. This should, by principal, be faster.(not done any timing tests). Since this do not require any itterations. $stack = array(); array_push ( $stack, "1" ); array_push ( $stack, "2" ); while ( $stack != array() ) { print array_pop ( $stack ); }

« previous php.notes (#40835) next »