Bug #75389 [Opn->Nab]: function 'isset' not found when using array_filter

From: Date: Mon, 16 Oct 2017 15:56:58 +0000
Subject: Bug #75389 [Opn->Nab]: function 'isset' not found when using array_filter
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211724@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75389&edit=1 ID: 75389 Updated by: requinix@php.net Reported by: g dot sokol99 at g-sokol dot info Summary: function 'isset' not found when using array_filter -Status: Open +Status: Not a bug Type: Bug Package: *General Issues Operating System: Linux PHP Version: 7.1.10 Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php http://php.net/manual/en/function.isset.php > Note: Because this is a language construct and not a function, it cannot be called using > variable functions. Previous Comments: ------------------------------------------------------------------------ [2017-10-16 15:54:22] g dot sokol99 at g-sokol dot info - var_export(array_filter($foo, 'isset'); + var_export(array_filter($foo, 'isset')); ------------------------------------------------------------------------ [2017-10-16 15:52:51] g dot sokol99 at g-sokol dot info Description: ------------ array_filter($some_array, 'isset') cause PHP WARNING. Test script: --------------- <?php $foo = array('a' => 1, 'b' => null); var_export(array_filter($foo, 'isset'); Expected result: ---------------- array ( 'a' => 1, ) Actual result: -------------- PHP Warning: array_filter() expects parameter 2 to be a valid callback, function 'isset' not found or invalid function name in php shell code on line 1 PHP Stack trace: PHP 1. {main}() php shell code:0 PHP 2. array_filter() php shell code:1 NULL ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75389&edit=1

« previous php.bugs (#211724) next »