3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { /** * Default store code * * @var string */ protected $_currentStore; public function getStore($id = null) { $id_int = $id; if (!isset($id_int) || ''===$id_int || $id_int === true) { $id_int = $this->_currentStore; echo 'assigning $id_int to $this->_currentStore :: '; } echo 'using id class : ' . get_class($id_int) . ' :: '; if (!isset($id_int)) { echo '$id_int is not set? it has a class=' . get_class($id_int); } return $id_int; } } $x = new X(); $store = $x->getStore();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cMqLR
function name:  (null)
number of ops:  7
compiled vars:  !0 = $x, !1 = $store
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $2      'X'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   30     3        INIT_METHOD_CALL                                         !0, 'getStore'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
          6      > RETURN                                                   1

Class X:
Function getstore:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 24
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
Branch analysis from position: 14
Branch analysis from position: 10
Branch analysis from position: 7
filename:       /in/cMqLR
function name:  getStore
number of ops:  26
compiled vars:  !0 = $id, !1 = $id_int
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV_INIT                                        !0      null
   12     1        ASSIGN                                                   !1, !0
   14     2        ISSET_ISEMPTY_CV                                 ~3      !1
          3        BOOL_NOT                                         ~4      ~3
          4      > JMPNZ_EX                                         ~4      ~4, ->7
          5    >   IS_IDENTICAL                                     ~5      !1, ''
          6        BOOL                                             ~4      ~5
          7    > > JMPNZ_EX                                         ~4      ~4, ->10
          8    >   TYPE_CHECK                                    8  ~6      !1
          9        BOOL                                             ~4      ~6
         10    > > JMPZ                                                     ~4, ->14
   15    11    >   FETCH_OBJ_R                                      ~7      '_currentStore'
         12        ASSIGN                                                   !1, ~7
   16    13        ECHO                                                     'assigning+%24id_int+to+%24this-%3E_currentStore+%3A%3A+'
   19    14    >   GET_CLASS                                        ~9      !1
         15        CONCAT                                           ~10     'using+id+class+%3A+', ~9
         16        CONCAT                                           ~11     ~10, '++%3A%3A++'
         17        ECHO                                                     ~11
   21    18        ISSET_ISEMPTY_CV                                 ~12     !1
         19        BOOL_NOT                                         ~13     ~12
         20      > JMPZ                                                     ~13, ->24
   22    21    >   GET_CLASS                                        ~14     !1
         22        CONCAT                                           ~15     '%24id_int+is+not+set%3F+it+has+a+class%3D', ~14
         23        ECHO                                                     ~15
   25    24    > > RETURN                                                   !1
   26    25*     > RETURN                                                   null

End of function getstore

End of class X.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.47 ms | 1403 KiB | 13 Q