Skip to content

Commit da777d4

Browse files
CODING_STANDARDS.md: add rules for bool/zend_result return types (#10630)
This guideline was mentioned on php-internals (https://news-web.php.net/php.internals/119573).
1 parent 25d6c93 commit da777d4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CODING_STANDARDS.md

+5
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ rewritten to comply with these rules.
7878
may need to control or free the memory, or when the memory in question needs
7979
to survive between multiple requests.
8080

81+
1. The return type of "is" or "has" style functions should be `bool`,
82+
which return a "yes"/"no" answer. `zend_result` is an appropriate
83+
return value for functions that perform some operation that may
84+
succeed or fail.
85+
8186
## User functions/methods naming conventions
8287

8388
1. Function names for user-level functions should be enclosed with in the

0 commit comments

Comments
 (0)