On 2023/02/19 08:56, Nikita Popov <nikita....@gmail.com> wrote:
> If you have a function like zend_stream_open_function(), SUCCESS and FAILURE 
> are directly meaningful values.

Agree, but that doesn't explain why FAILURE needs to be negative.

> The current guideline for use of bool and zend_result in php-src is that bool 
> is an appropriate return value for "is" or "has" style functions, which 
> return a yes/no answer. zend_result is an appropriate return value for 
> functions that perform some operation that may succeed or fail.

What does the return value of these functions mean?

- zend_make_printable_zval()
- zend_make_callable()
- zend_parse_arg_bool()
- zend_fiber_init_context()
- zend_observer_remove_begin_handler()
- php_execute_script()1

If I understand the guideline correctly, then those examples (and
countless others) are defective and should be fixed, correct?

Max

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to