glatrofa/DevOps-demo

Null Coalescing Operator

Opened this issue · 0 comments

Hello,

In this case
if(!isset($dbUserName)) $dbUserName = "root";

you can use https://www.php.net/manual/en/language.operators.comparison.php

More simple :)
$dbUserName = $dbUserName ?? 'root';