Category:PHP
Article From:https://www.cnblogs.com/ryanzheng/p/9061737.html

bool isset(mixed var);[;mixed var[,…]]

This function requires a variable name as a parameter. If this variable exists, it returns true, otherwise it returns false.

You can also pass a list of variables separated by commas. If all variables are set, the isset () function will return to true.

You can also use unset () to destroy a variable.

As long as the passed variables are set, both the 0 and the empty strings are true unless the passed variables do not set any values.

Just to make a simple declaration, then return to false.

<?php
    $a;
    echo 'isset($a)' . isset($a);   //In this case, $a returns to false

 

bool empty(mixed var);

Function empty () can be used to check whether a variable exists.And whether its value is empty and non 0, and whether the string is empty.

Return to true and false accordingly.

 

Leave a Reply

Your email address will not be published. Required fields are marked *