3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = new class implements \ArrayAccess { public function offsetExists($offset) { echo "offsetExists\n"; } public function offsetGet($offset) { echo "offsetGet\n"; } public function offsetSet($offset, $value) { } public function offsetUnset($offset) { } }; echo "isset:\n"; isset($data['foo']) ? NULL : NULL; echo "null coalescing operator:\n"; $data['foo'] ?? NULL;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xbojv
function name:  (null)
number of ops:  17
compiled vars:  !0 = $data
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   DECLARE_ANON_CLASS                                   <unknown> 
          1        NEW                                                  $2      $1
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $2
   26     4        ECHO                                                         'isset%3A%0A'
   27     5        ISSET_ISEMPTY_DIM_OBJ                             0          !0, 'foo'
          6      > JMPZ                                                         ~5, ->9
          7    >   QM_ASSIGN                                            ~6      null
          8      > JMP                                                          ->10
          9    >   QM_ASSIGN                                            ~6      null
         10    >   FREE                                                         ~6
   28    11        ECHO                                                         'null+coalescing+operator%3A%0A'
   29    12        FETCH_DIM_IS                                         ~7      !0, 'foo'
         13        COALESCE                                             ~8      ~7
         14        QM_ASSIGN                                            ~8      null
         15        FREE                                                         ~8
         16      > RETURN                                                       1

Class ArrayAccess@anonymous:
Function offsetexists:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xbojv
function name:  offsetExists
number of ops:  3
compiled vars:  !0 = $offset
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
    6     1        ECHO                                                         'offsetExists%0A'
    7     2      > RETURN                                                       null

End of function offsetexists

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

End of function offsetget

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

End of function offsetset

Function offsetunset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xbojv
function name:  offsetUnset
number of ops:  2
compiled vars:  !0 = $offset
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E >   RECV                                                 !0      
   23     1      > RETURN                                                       null

End of function offsetunset

End of class ArrayAccess@anonymous.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
236.11 ms | 3023 KiB | 13 Q