3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Pessoa { // Propriedades private $nome = 'Luiz'; // __isset é invocado quando tentamos utilizar isset ou empty em métodos protegidos ou privados public function __isset($name) { return isset($this->$name) && !empty($this->$name); } } // Pessoa $pessoa = new Pessoa(); // Utiliza isset em $pessoa->nome if ( isset( $pessoa->nome ) ) { echo 'Dado existe.'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/mtlqc
function name:  (null)
number of ops:  7
compiled vars:  !0 = $pessoa
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'Pessoa'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        ISSET_ISEMPTY_PROP_OBJ                                   !0, 'nome'
          4      > JMPZ                                                     ~4, ->6
   18     5    >   ECHO                                                     'Dado+existe.'
   19     6    > > RETURN                                                   1

Class Pessoa:
Function __isset:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/mtlqc
function name:  __isset
number of ops:  8
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        ISSET_ISEMPTY_PROP_OBJ                           ~1      !0
          2      > JMPZ_EX                                          ~1      ~1, ->6
          3    >   ISSET_ISEMPTY_PROP_OBJ                           ~2      !0
          4        BOOL_NOT                                         ~3      ~2
          5        BOOL                                             ~1      ~3
          6    > > RETURN                                                   ~1
   10     7*     > RETURN                                                   null

End of function __isset

End of class Pessoa.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
349.1 ms | 1393 KiB | 13 Q