[ create a new paste ] login | about

Link: http://codepad.org/QWjwl3vQ    [ raw code | output | fork ]

PHP, pasted on Nov 21:
<?php

function getVar(){
    return "some string";
}

function test1(){
    if($a = getVar()){
        echo $a;
    }
}

function test2(){
    if($a = getVar() && $b=getVar()){
        echo $a;
    }
}

//test1();
test2();


?>


Output:
1
1


Create a new paste based on this one


Comments: