`
ludatong110
  • 浏览: 38586 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

isset function of PHP

    博客分类:
  • PHP
阅读更多

isset

(PHP 4, PHP 5)

issetDetermine if a variable is set and is not NULL

检查参数的值是否已经设置并且不为NULL。

 

Description

bool isset ( mixed $var [, mixed $... ] )

 

Determine if a variable is set and is not NULL .

If a variable has been unset with unset() , it will no longer be set. isset() will return FALSE if testing a variable that has been set to NULL . Also note that a NULL byte ("\0" ) is not equivalent to the PHP NULL constant.

 

检查参数的值是否已经设置并且不为NULL。

如果参数调用unset()而不被设置,那它以后也不会被设置。如果参数设置为NULL,调用isset()会返回FALSE。而且NULL字节不等同PHP中NULL的常量值。

 

If multiple parameters are supplied then isset() will return TRUE only if all of the parameters are set. Evaluation goes from left to right and stops as soon as an unset variable is encountered.

如果想多个参数调用isset()返回TRUE,只有这些函数都被设置过。函数会从左向右检查所有的参数,一直遇到没有设置的或者参数集末尾。

 

Parameters

var    The variable to be checked.      被检查的参数。

...     Another variable ...                  另外的参数。

 

Return Values

Returns TRUE if var exists and has value other than NULL , FALSE otherwise.

假如参数存在或者不为空返回TRUE,其他返回FALSE。

分享到:
评论

相关推荐

    php 实现IOC set 注入

    isset($this->instances[$interface])) { throw new Exception("Interface not registered: $interface"); } if (is_string($this->instances[$interface])) { return new $this->instances[$interface]; } ...

    php.ini-development

    You can redirect all of the output of your scripts to a function. For ; example, if you set output_handler to "mb_output_handler", character ; encoding will be transparently converted to the ...

    Foundations of PEAR: Rapid PHP Development

    Each package is broken down logically by function, and each one is covered in detail. The book presents each package in a manner that allows you to jump quickly to the key items you need to implement ...

    php报时区错误,按照网上说的改时间date.timezone根本不管用!怎么解决,看我的.zip

    Warning: phpinfo() [function.phpinfo]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In ...

    php-7.0.20-nts-Win32-VC14-x64 php7.0资源下载

    $a = isset($_GET['a']) ? $_GET['a'] : 1; 我们知道三元运算符是可以这样用的: ? 1 $a ?: 1 但是这是建立在 $a 已经定义了的前提上。新增的 ?? 运算符可以简化判断。 2. 函数返回值类型声明 ...

    开发PHP扩展详细教程

    /****End of Self control section***/ #ifdef ZTS #define ICBC_G(v) TSRMG(icbc_globals_id, zend_icbc_globals *, v) #else #define ICBC_G(v) (icbc_globals.v) #endif #endif /* PHP_ICBC_H */ 涉及...

    Beginning PHP 5.3

    ### Beginning PHP 5.3: Key IT...- **Overview of PHP:** PHP (Hypertext Preprocessor) is a widely-used open-source scripting language that is especially suited for web development and can be embedded into ...

    ThinkPHP3.2 集成 php-resque: PHP Resque Worker

    $act = isset($argv[1]) ? $argv[1] : 'start'; putenv("Q_ACTION={$act}"); putenv("Q_ARGV=" . json_encode($argv)); require './ThinkPHP/ThinkPHP.php'; ### 创建Queue控制器 ### 在`Home`模块的`...

    vBulletin v2.3.3

    phptest.php - a PHP script to test that PHP is set up and working on your server mailtest.php - a PHP script to test that the mail() function is working on your server index....

    php 魔术函数使用说明

    public function __isset($property) { // 检查逻辑 } } ``` 6. **__unset()**: 当使用 `unset()` 函数删除一个不存在的对象属性时,`__unset()` 会被调用。 ```php class MyClass { public function __unset...

    google api php client

    if (isset($_GET['code'])) { $token = $client->fetchAccessTokenWithAuthCode($_GET['code']); } ``` ### Authentication with Service Accounts ### > An example of this can be seen in [`examples/...

    PHP基础教程 是一个比较有价值的PHP新手教程!

    function do_foo () { echo "Doing foo."; } } $bar = new foo; $bar->do_foo(); 改变变量类型 在PHP手册中提到:"PHP不支持(也不需要)直接在声明变量时定义变量类型;变量类型将根据其被应用的情况决定。如果你...

    php笔试题汇总(超级精华的试题)

    if (isset($_POST['action']) && $_POST['action'] == 'submitted') { $email = $_POST['email']; if (!preg_match("/^[\w\.-]+@[\w\.-]+\.\w+$/", $email)) { echo "电子邮件检测失败"; } } ``` 这些知识点...

    Upload-master操作文件上传的PHP库.zip

     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF  * MERCHANTABILITY, FITNESS FOR ...

    cWhoisv1.52查寻域名是否注册

    4=Referer is not allowed to use function. You can set this if required to control use. 5=Could not contact registry to lookup domain. 6=Domain is available at a premium (currently supported for .tv,...

    php 利用 nusoap 生成 webservices

    if (isset($_SERVER['HTTP_SOAPACTION'])) { $server->service(file_get_contents('php://input')); } else { echo $server->get.wsdl(); } ``` 四、客户端实现 1. 创建一个PHP文件(如client.php),用于调用...

    基于php网上人才招聘系统设计与实现.docx

    In conclusion, the PHP online talent recruitment system is a comprehensive solution addressing the evolving needs of the job market. By leveraging PHP and MYSQL, the system delivers a user-friendly, ...

    ecshop基于php5.0版本以上的配置修改

    Deprecated: Assigning the return value of new by reference is deprecated in F:\wamp\www\ECshop\admin\goods_batch.php on line 921 ``` **解决方法**: ```php $filter = new stdClass(); ``` 以上就是针对...

Global site tag (gtag.js) - Google Analytics