Doc #76117 [NEW]: uopz flags is NOT for classes, but methods

From: Date: Tue, 20 Mar 2018 04:03:55 +0000
Subject: Doc #76117 [NEW]: uopz flags is NOT for classes, but methods
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15540@lists.php.net to get a copy of this message
From: Andy_Schmidt at HM-Software dot com Operating system: any PHP version: 7.2.3 Package: Documentation problem Bug Type: Documentation Problem Bug description:uopz flags is NOT for classes, but methods Description: ------------ --- From manual page: http://www.php.net/function.uopz-flags --- The manual incorrectly states: "Get or set flags on function or class". This implies to the reader that either the flags of a standalone function, or the flags of the class itself (such as "final class {}") can be queried or manipulated. In reality with version UOPZ 5.02 one can only reference a function or a class::method! One simply cannot omit the function name (e.g., making it NULL, or '' - it can't even be '__construct') The correct text shoud read: "Get or set flags on function or class method" ... "Get or set the flags on a method or function entry at runtime" ... function The name of the function or method Test script: --------------- final class MyClass { function mymethod() {} }; var_dump( ( new ReflectionClass( 'MyClass') )->isFinal() ); if ( !defined( 'ZEND_ACC_FETCH' ) ) define( 'ZEND_ACC_FETCH', PHP_INT_MAX ); // Works: var_dump( uopz_flags( 'MyClass', 'mymethod' , ZEND_ACC_FETCH ) ); // Fails: var_dump( uopz_flags( 'MyClass', '' , ZEND_ACC_FETCH ) ); var_dump( uopz_flags( 'MyClass', NULL , ZEND_ACC_FETCH ) ); -- Edit bug report at https://bugs.php.net/bug.php?id=76117&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76117&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76117&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76117&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76117&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76117&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76117&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76117&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76117&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76117&r=support Expected behavior: https://bugs.php.net/fix.php?id=76117&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76117&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76117&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76117&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76117&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76117&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76117&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76117&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76117&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76117&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76117&r=mysqlcfg

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