note 106187 added to function.array-filter

From: Date: Tue, 18 Oct 2011 03:30:49 +0000
Subject: note 106187 added to function.array-filter
Groups: php.notes 
Request: Send a blank email to php-notes+get-183942@lists.php.net to get a copy of this message
Beware. <?php $array = array('one', 'two', 'three'); function test($what) { if ($what === $what) { // lol return true; } } // this will not work array_filter($array, 'test'); // this will $array = array_filter($array, 'test'); ?> It must be called inside a variable. Strange behavior, if you ask me. ---- Server IP: 69.147.83.197 Probable Submitter: 93.137.134.119 ---- Manual Page -- http://www.php.net/manual/en/function.array-filter.php Edit -- https://master.php.net/note/edit/106187 Del: integrated -- https://master.php.net/note/delete/106187/integrated Del: useless -- https://master.php.net/note/delete/106187/useless Del: bad code -- https://master.php.net/note/delete/106187/bad+code Del: spam -- https://master.php.net/note/delete/106187/spam Del: non-english -- https://master.php.net/note/delete/106187/non-english Del: in docs -- https://master.php.net/note/delete/106187/in+docs Del: other reasons-- https://master.php.net/note/delete/106187 Reject -- https://master.php.net/note/reject/106187 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#183942) next »