peachpiecompiler / peachpie

PeachPie - the PHP compiler and runtime for .NET and .NET Core
https://www.peachpie.io
Apache License 2.0
2.31k stars 201 forks source link

isset() gives wrong result #1085

Closed kripper closed 1 year ago

kripper commented 1 year ago

In this simplified test case, $t is never set, but isset($t) returns true.

<?php

function Test() {
    if(false) {
        $t = $dummy . 'garbage';
    }

    $b = isset($t);
    if($b) echo "BUG: Shouldn't be true";

    // HINT: Uncommenting this line changes the previous result (!)
    // if(isset($t)) echo "BUG: Same here";
}

Test();
jakubmisek commented 1 year ago

fixed, thank you!