简单的代码说明

Is this:

$_GET['value'] = isset($_GET['value']) ? $_GET['value'] : '';

same like this:

$_GET['value'] = isset($_GET['value']) ? $_GET['value'] : false;

?

Or is better do a first ? Is there any more variations of this code? Thanks for any advice!

Nope. They're not the same thing.

The first will return an empty string if the value GET parameter is not set, or return the parameter if it is set.

The second will return false if the parameter is not set.

So you're changing the original $_GET array, which is not really a good idea.

An alternative syntax is the null coalesce operator (??) that would turn your code into this:

$variable = $_GET['value'] ?? ''; //or false, if you want to stick with the boolean.

The ?? operator basically runs isset() on the left expression and returns the first ocurrence of a truthy expression.

If you need to check for an empty string, you should use empty instead of isset.