Bug #80439 [NEW]: is_callable() does not call autoloader function

From: Date: Sat, 28 Nov 2020 23:15:02 +0000
Subject: Bug #80439 [NEW]: is_callable() does not call autoloader function
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230698@lists.php.net to get a copy of this message
From:             jozyah-etienne at eerees dot com
Operating system: Linux
PHP version:      8.0.0
Package:          *General Issues
Bug Type:         Bug
Bug description:is_callable() does not call autoloader function

Description:
------------
It seems that is callable behavior is changed.
In PHP < 8, is_callable() includes needed class file through autoloader
and returns .
In PHP 8 it returns false.


$callback = ['\Path\To\ClassName, 'methodName'];
is_callable($callback); // always returns false in PHP 8
$callback(); // but loads needed files through autoloader and executes
the callback

Expected result:
----------------
It should loads needed files through autoloader and returns a valid
value.

Actual result:
--------------
Always returns false, no matter if it is really callable or not.

-- 
Edit bug report at https://bugs.php.net/bug.php?id=80439&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=80439&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=80439&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=80439&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=80439&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=80439&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=80439&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=80439&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=80439&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=80439&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=80439&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80439&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=80439&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=80439&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=80439&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=80439&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=80439&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=80439&r=mysqlcfg


Thread (3 messages)

« previous php.bugs (#230698) next »