Skip to content

zend_compile: Use return true / return false for functions returning bool#21649

Merged
TimWolla merged 1 commit intophp:masterfrom
TimWolla:zend-compile-bool
Apr 6, 2026
Merged

zend_compile: Use return true / return false for functions returning bool#21649
TimWolla merged 1 commit intophp:masterfrom
TimWolla:zend-compile-bool

Conversation

@TimWolla
Copy link
Copy Markdown
Member

@TimWolla TimWolla commented Apr 6, 2026

Changes done with Coccinelle:

@r1 exists@
identifier fn;
typedef bool;
symbol false;
symbol true;
@@

bool fn ( ... )
{
...
return
(
- 0
+ false
|
- 1
+ true
)
;
}

…ing `bool`

Changes done with Coccinelle:

    @r1 exists@
    identifier fn;
    typedef bool;
    symbol false;
    symbol true;
    @@

    bool fn ( ... )
    {
    ...
    return
    (
    - 0
    + false
    |
    - 1
    + true
    )
    ;
    }
@TimWolla TimWolla merged commit 19eabc6 into php:master Apr 6, 2026
19 checks passed
@TimWolla TimWolla deleted the zend-compile-bool branch April 6, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants