3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrayData = 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 "arrayData - isset:\n"; isset($arrayData['foo']) ? NULL : NULL; echo "arrayData - null coalescing operator:\n"; $arrayData['foo'] ?? NULL; $fixedData = new class extends \SplFixedArray { public function offsetExists($offset) { echo "offsetExists\n"; } public function offsetGet($offset) { echo "offsetGet\n"; } public function offsetSet($offset, $value) { } public function offsetUnset($offset) { } }; echo "fixedData - isset:\n"; isset($fixedData['foo']) ? NULL : NULL; echo "fixedData - null coalescing operator:\n"; $fixedData['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
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
Branch analysis from position: 25
filename:       /in/BudKa
function name:  (null)
number of ops:  33
compiled vars:  !0 = $arrayData, !1 = $fixedData
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <true>  
          1        NEW                                              $3      $2
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   26     4        ECHO                                                     'arrayData+-+isset%3A%0A'
   27     5        ISSET_ISEMPTY_DIM_OBJ                         0          !0, 'foo'
          6      > JMPZ                                                     ~6, ->9
          7    >   QM_ASSIGN                                        ~7      null
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~7      null
         10    >   FREE                                                     ~7
   28    11        ECHO                                                     'arrayData+-+null+coalescing+operator%3A%0A'
   29    12        FETCH_DIM_IS                                     ~8      !0, 'foo'
         13        COALESCE                                         ~9      ~8
         14        QM_ASSIGN                                        ~9      null
         15        FREE                                                     ~9
   32    16        DECLARE_ANON_CLASS                               <unknown> 'splfixedarray'
         17        NEW                                              $11     $10
         18        DO_FCALL                                      0          
         19        ASSIGN                                                   !1, $11
   56    20        ECHO                                                     'fixedData+-+isset%3A%0A'
   57    21        ISSET_ISEMPTY_DIM_OBJ                         0          !1, 'foo'
         22      > JMPZ                                                     ~14, ->25
         23    >   QM_ASSIGN                                        ~15     null
         24      > JMP                                                      ->26
         25    >   QM_ASSIGN                                        ~15     null
         26    >   FREE                                                     ~15
   58    27        ECHO                                                     'fixedData+-+null+coalescing+operator%3A%0A'
   59    28        FETCH_DIM_IS                                     ~16     !1, 'foo'
         29        COALESCE                                         ~17     ~16
         30        QM_ASSIGN                                        ~17     null
         31        FREE                                                     ~17
         32      > 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/BudKa
function name:  offsetExists
number of ops:  3
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        ECHO                                                     'offsetExists%0A'
    8     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/BudKa
function name:  offsetGet
number of ops:  3
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        ECHO                                                     'offsetGet%0A'
   14     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/BudKa
function name:  offsetSet
number of ops:  3
compiled vars:  !0 = $offset, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   19     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/BudKa
function name:  offsetUnset
number of ops:  2
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
   24     1      > RETURN                                                   null

End of function offsetunset

End of class ArrayAccess@anonymous.

Class SplFixedArray@anonymous:
Function offsetexists:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BudKa
function name:  offsetExists
number of ops:  3
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   RECV                                             !0      
   36     1        ECHO                                                     'offsetExists%0A'
   37     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/BudKa
function name:  offsetGet
number of ops:  3
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   40     0  E >   RECV                                             !0      
   42     1        ECHO                                                     'offsetGet%0A'
   43     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/BudKa
function name:  offsetSet
number of ops:  3
compiled vars:  !0 = $offset, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   46     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   48     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/BudKa
function name:  offsetUnset
number of ops:  2
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   51     0  E >   RECV                                             !0      
   53     1      > RETURN                                                   null

End of function offsetunset

End of class SplFixedArray@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.02 ms | 1403 KiB | 13 Q