Doc #80515 [Opn->Nab]: The behavior of ReflectionClass::getMethods() changed in 7.4

From: Date: Mon, 14 Dec 2020 19:57:20 +0000
Subject: Doc #80515 [Opn->Nab]: The behavior of ReflectionClass::getMethods() changed in 7.4
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18259@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80515&edit=1 ID: 80515 Updated by: requinix@php.net Reported by: mark at fastmail dot net Summary: The behavior of ReflectionClass::getMethods() changed in 7.4 -Status: Open +Status: Not a bug Type: Documentation Problem -Package: Unknown/Other Function +Package: Reflection related Operating System: Windows PHP Version: 7.4.13 Block user comment: N Private report: N New Comment: || is *boolean* OR | is *bitwise* OR You should have been using the latter. Previous Comments: ------------------------------------------------------------------------ [2020-12-14 19:51:28] mark at fastmail dot net Description: ------------ Specifying logically ORed filter arguments results in "and" behavior in 7.3, but results in "or" behavior in 7.4. The provided test script returns both methods in 7.4, but only the first method in 7.3. Should this change be added to the "Backward Incompatible Changes" page? Test script: --------------- <?php class A{ static function one(){} function two(){} } $class = new ReflectionClass(A::class); var_dump($class->getMethods(ReflectionMethod::IS_PUBLIC || ReflectionMethod::IS_STATIC)); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80515&edit=1

« previous php.doc.bugs (#18259) next »