php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29433 The built in function is_callable, does not return false, on unreachable functi
Submitted: 2004-07-28 18:22 UTC Modified: 2004-07-29 20:06 UTC
From: freeload at softhome dot net Assigned:
Status: Closed Package: *General Issues
PHP Version: 5.0.0 OS: Windows NT/XP
Private report: No CVE-ID: None
 [2004-07-28 18:22 UTC] freeload at softhome dot net
Description:
------------
The built in function is_callable, does not return false, on unreachable functions, like protected and private ones.

Reproduce code:
---------------
<?php
class test_class {
   private function test_func1(){}
   protected function test_func2(){}
}
$object = new test_class;

var_dump(is_callable(array($object,'test_func1')));
echo chr(10);
var_dump(is_callable(array($object,'test_func2')));
?>


Expected result:
----------------
bool(false)
bool(false)

Actual result:
--------------
bool(true)
bool(true)

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-29 00:59 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

Works just fine here. 
 [2004-07-29 20:06 UTC] freeload at softhome dot net
Arg, also used php5 rc2 :P, sry! my mistake!! thanx!!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Aug 17 12:01:29 2024 UTC