Home  >  Article  >  Backend Development  >  How to delete variables and detect variables in PHP

How to delete variables and detect variables in PHP

小云云
小云云Original
2018-03-26 14:21:141540browse

This article mainly shares with you the methods of deleting variables and detecting variables in PHP. I hope it can help you.

1. Delete variables:

Syntax:

unset($variable name);

2. Detect variables

Syntax: isset($variable name); detects whether the variable exists, only true and false, the browser displays 0 or 1.

When you want to display true or false, use var_dump(isset($variable name) ) to make a judgment.

var_dump() output content length, type, value, mainly used for program debugging


Related recommendations:

String equality and deletion of variables in php

The above is the detailed content of How to delete variables and detect variables in PHP. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn