PHP variable definition


PHP code writing in the XXX environment requires that all variables need to be declared before use, otherwise there will be an error message. For arrays, when using an uncertain key, for example, first judge isset(), and then Use; for example the following code:

$array = array();
$var = isset($array[3]) ? $array[3] : “”;