note 44366 added to function.assert

From: Date: Tue, 03 Aug 2004 21:06:18 +0000
Subject: note 44366 added to function.assert
Groups: php.notes 
Request: Send a blank email to php-notes+get-73877@lists.php.net to get a copy of this message
<?php $array = array( 0, 1, 2 ); assert( "is_array( $array )" ); // Fails assert( 'is_array( $array )' ); // Suceeds ?> The first array passes what is perceived to be the string "Array" to is_array(), causing a failure. According to the Sitepoint article referenced above, both should work. As of PHP 5 at least, only the second will work. ---- Manual Page -- http://www.php.net/manual/en/function.assert.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+44366 Delete -- http://master.php.net/manage/user-notes.php?action=delete+44366&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+44366&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#73877) next »