1.2.619. Isset Multiple Arguments

isset() may be used with multiple arguments and acts as a AND.

<?php

// isset without and
if (isset($a, $b, $c)) {
    // doSomething()
}

// isset with and
if (isset($a) && isset($b) && isset($c)) {
    // doSomething()
}

?>

See also Isset.

1.2.619.1. Suggestions

  • Merge all isset() calls into one

1.2.619.2. Specs

Short name

Php/IssetMultipleArgs

Rulesets

All, Changed Behavior, Suggestions, php-cs-fixable

Exakat since

0.12.4

PHP Version

All

Severity

Minor

Time To Fix

Instant (5 mins)

Precision

High

Features

isset, coalesce

Examples

ThinkPHP, LiveZilla

Available in

Entreprise Edition, Exakat Cloud