标签: php
$_SESSION['val'] += 9;
如果$_SESSION['val']未初始化,则会发出$_SESSION['val']未定义的通知。
$_SESSION['val']
if (!isset($_SESSION['val'])) $_SESSION['val'] = 9; else $_SESSION['val'] += 9;
有没有办法在PHP中简化这个? (PHP 7)