3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function __isset($name) {echo 'isset'; return false;} public function __set($name, $value) {echo 'set';} public function __get($name) {echo 'get'; return NULL;} public function __unset($name) {echo 'unset';} } $x = new foo; $y = 'bar'; var_dump(is_callable($x->{$y}));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3KaN0
function name:  (null)
number of ops:  12
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $2      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   11     3        ASSIGN                                                   !1, 'bar'
   13     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'is_callable'
          6        FETCH_OBJ_R                                      ~6      !0, !1
          7        SEND_VAL                                                 ~6
          8        DO_ICALL                                         $7      
          9        SEND_VAR                                                 $7
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class foo:
Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3KaN0
function name:  __isset
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        ECHO                                                     'isset'
          2      > RETURN                                                   <false>
          3*     > RETURN                                                   null

End of function __isset

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3KaN0
function name:  __set
number of ops:  4
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        ECHO                                                     'set'
          3      > RETURN                                                   null

End of function __set

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3KaN0
function name:  __get
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        ECHO                                                     'get'
          2      > RETURN                                                   null
          3*     > RETURN                                                   null

End of function __get

Function __unset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3KaN0
function name:  __unset
number of ops:  3
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        ECHO                                                     'unset'
          2      > RETURN                                                   null

End of function __unset

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.17 ms | 1400 KiB | 17 Q