Doc #81065 [Opn]: Display problems

From: Date: Fri, 21 May 2021 11:17:39 +0000
Subject: Doc #81065 [Opn]: Display problems
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18776@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81065&edit=1 ID: 81065 Updated by: imsop@php.net Reported by: yuki dot nishida at sys21 dot co dot jp Summary: Display problems Status: Open Type: Documentation Problem Package: Unknown/Other Function Operating System: none PHP Version: 7.3.28 Block user comment: N Private report: N New Comment: I agree that the manual should be clearer here. There are probably other similar constants which are exposed from internal values and subject to change between versions. * We should have a standard note such as "The values of constants may change between versions or environments. It is recommended to always use the constants directly and not rely on the values directly." * Should we show the values for these at all, since users shouldn't be relying on them? Previous Comments: ------------------------------------------------------------------------ [2021-05-21 11:12:09] yuki dot nishida at sys21 dot co dot jp I'm sorry! I forgot about this one...(*'omega'*) It's not on the changelog, which I think is the most confusing thing about it. I'd like to see the change of the actual value of algebraic constants in the changelog. I'm sorry. I'm sorry. I think this is the essence of what I want to request. ------------------------------------------------------------------------ [2021-05-21 11:03:02] yuki dot nishida at sys21 dot co dot jp Description: ------------ The constant value is different in different versions, so it may need to be annotated. ReflectionProperty (also ReflectionMethod)::IS_XXXX In my program, constant values are used in bitwise operations (logical products), and I noticed that I was facing a problem where bits with different numbers of digits could not be calculated with each other. (Sorry, I'm Japanese and not good at English, so I'm using a translation tool, so please forgive any grammatical errors. ) I checked the source code from Git, and it is listed at the bottom of this column. I apologize for the poor quality of this document, but I would appreciate it if you could help my future students. Thank you for reading to the end. -----checked the source code ------ [source1] php-src/ext/reflection/php_reflection.c // new (7.4) 6996 REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_PUBLIC", ZEND_ACC_PUBLIC); 6997 REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_PROTECTED", ZEND_ACC_PROTECTED); 6998 REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_PRIVATE", ZEND_ACC_PRIVATE); [source1] php-src/Zend/zend_compile.h // changed version (7.4) 203 #define ZEND_ACC_PUBLIC (1 << 0) /* | X | X | X */ // -> 1 204 #define ZEND_ACC_PROTECTED (1 << 1) /* | X | X | X */ // -> 2 205 #define ZEND_ACC_PRIVATE (1 << 2) /* | X | X | X */ // -> 4 //old (5.4) -> my use version... sory!! 130 #define ZEND_ACC_PUBLIC 0x100 // -> 256 131 #define ZEND_ACC_PROTECTED 0x200 // -> 512 132 #define ZEND_ACC_PRIVATE 0x400 // -> 1024 // old (7.3.28) 212 #define ZEND_ACC_PUBLIC (1 << 8) /* | X | X | X */ // -> 256 213 #define ZEND_ACC_PROTECTED (1 << 9) /* | X | X | X */ // -> 512 214 #define ZEND_ACC_PRIVATE (1 << 10) /* | X | X | X */ // -> 1024 Expected result: ---------------- https://www.php.net/manual/en/class.reflectionproperty I think it would be desirable to have annotations added to this page. Actual result: -------------- There are no annotations. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81065&edit=1

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