php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60769 typo in callback example http://www.php.net/function.filter-var
Submitted: 2012-01-16 14:19 UTC Modified: 2012-01-21 22:56 UTC
From: owenmck at gmail dot com Assigned: frozenfire (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: any
Private report: No CVE-ID: None
 [2012-01-16 14:19 UTC] owenmck at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.filter-var
---
callback should return the value it was given, not an object. 
i.e.: 
return $ret //wrong should be return $ret->val
NB: using $ret as currently suggested results in PHP Catchable fatal error:  Object of class stdClass could not be converted to string


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-21 22:55 UTC] frozenfire@php.net
Automatic comment from SVN on behalf of frozenfire
Revision: http://svn.php.net/viewvc/?view=revision&revision=322551
Log: Rewrote callback filter example. Closes bug #60769.
 [2012-01-21 22:56 UTC] frozenfire@php.net
-Status: Open +Status: Closed -Package: *General Issues +Package: Documentation problem -Assigned To: +Assigned To: frozenfire
 [2012-01-21 22:56 UTC] frozenfire@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 06:00:01 2026 UTC