在PHP中,三元和If语句之间的执行逻辑区别是什么?

I don't know what I am missing! I have the following code

//does not work
$arg = (isset($_REQUEST['TEST']))? $_REQUEST['TEST'] : $_REQUEST['test'];

// While this works
if(isset($_REQUEST['TEST'])){ $arg = $_REQUEST['TEST']; }
if(isset($_REQUEST['test'])){ $arg = $_REQUEST['test']; }

Is there a difference in how each conditional handle the above code? It reads the same to me! any explanation?

P.S

There should not be a difference ! Is there a global PHP setting that could affect this?

I do not think there is any functional difference between the two

$arg = (isset($_REQUEST['TEST']))? $_REQUEST['TEST'] : $_REQUEST['test'];

are you sure $_REQUEST['test'] exists and has a value ? Because in your second statement

 if(isset($_REQUEST['test']))

you are explicitly checking its value but in the first statement you are not.