PHP - Manual: FETCH_IS
2024-12-21
<?php
/*
* Fetch the value from variable which is to be used to test if it is set or not, through isset()/isempty().
* opcode number: 89
*/
echo isset($_SESSION['userid']);
echo isset($_SESSION['userid'][1]);
echo isset($_SESSION->prop->prop);
?>
Function name: (null)
Compiled variables: none
line | # | op | fetch | ext | return | operands |
---|---|---|---|---|---|---|
6 | 0 | FETCH_IS | $0 | '_SESSION' | ||
1 | ZEND_ISSET_ISEMPTY_DIM_OBJ | 1 | ~1 | $0,'userid' | ||
2 | ECHO | ~1 | ||||
7 | 3 | FETCH_IS | $2 | '_SESSION' | ||
4 | FETCH_DIM_IS | $3 | $2,'userid' | |||
5 | ZEND_ISSET_ISEMPTY_DIM_OBJ | 1 | ~4 | $3,1 | ||
6 | ECHO | ~4 | ||||
8 | 7 | FETCH_IS | $5 | '_SESSION' | ||
8 | FETCH_OBJ_IS | $6 | $5,'prop' | |||
9 | ZEND_ISSET_ISEMPTY_PROP_OBJ | ~7 | $6,'prop' | |||
10 | ECHO | ~7 | ||||
9 | 11 | RETURN | 1 |
官方地址:https://www.php.net/manual/en/internals2.opcodes.fetch-is.php