Bug #75853 [Com]: Unexpected fatal error invoking static method as callables

From: Date: Sun, 21 Jan 2018 19:37:58 +0000
Subject: Bug #75853 [Com]: Unexpected fatal error invoking static method as callables
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213647@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75853&edit=1 ID: 75853 Comment by: levim@php.net Reported by: marcospassos dot com at gmail dot com Summary: Unexpected fatal error invoking static method as callables Status: Open Type: Bug Package: Class/Object related PHP Version: 7.2.2RC1 Block user comment: N Private report: N New Comment: This is one of the times I'm want to see some rationale as to why the bug is with callable and not with everything else. You are statically using child's symbol but statically referring to the parent method? If it was dynamic there *might* be a use-case for that but at least directly as written I don't see the value. Is there some use I'm missing? Previous Comments: ------------------------------------------------------------------------ [2018-01-21 19:10:52] marcospassos dot com at gmail dot com Description: ------------ An unrecoverable error occurs when a static method is called as a callable, in the form of [ClassName::class, 'parent::staticMethod'], which is a perfectly valid form of callable. The same does not occur invoking the callable through call_user_func, call_user_func_array or ReflectionMethod::invoke. Test script: --------------- https://3v4l.org/pdTUN Expected result: ---------------- foo ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75853&edit=1

« previous php.bugs (#213647) next »