<?php declare(strict_types=1); error_reporting(E_ALL); $a = ['key' => false,]; // original with key access arror and correct array but false value var_dump(!$a['key']); var_dump(!$a['key2']); echo PHP_EOL; // changed behavior for false value, array access warning fixed - change in behaviour !!! var_dump(!isset($a['key2'])); var_dump(!isset($a['key2'])); echo PHP_EOL; // this should be used instead, solving array key access error and not changing behaviour var_dump(!($a['key'] ?? false)); var_dump(!($a['key2'] ?? false));
You have javascript disabled. You will not be able to edit any code.