3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * created on 1.2.2008 */ class RootObj implements JsonSerializable { private $_data; public function __construct($data = null) { $this->_data = $data; } public function &__get($name) { return $this->_data[$name]; } public function __set($name, $value) { $this->_data[$name] = $value; } public function __isset($name) { return isset($this->_data[$name]); } public static function createObjectsFromArray($className, $array, $defaults = [], $idAsKey = false) { $results = []; foreach ($array as $data) { $result = new $className ($data); if ($idAsKey) { if (is_object($data) && isset($data->id)) { $results[$data->id] = $result; } else { $results[$data['id']] = $result; } } else { $results[] = $result; } foreach ((array)$defaults as $key => $value) { $result->{$key} = $value; } } return $results; } public function asArray() { return $this->_data; } public static function collectionToIds($collection) { $ids = []; foreach ($collection as $item) { $id = null; if (is_array($item)) { $id = $item['id']; } else { $id = $item->id; } if ($id != null) { $ids[] = $id; } } return $ids; } public function getSaveSql($table) { $sqlSnippets = []; foreach ($this->_data as $key => $value) { if ($key == 'id') { continue; } if (is_array($value)) { continue; } if (is_object($value)) { continue; } if (is_bool($value)) { $value = $value ? 1 : 0; } if ($value === null) { $sqlSnippet = "{$key} = null"; } else { $sqlSnippet = "{$key} = '" . addslashes($value) . "'"; } $sqlSnippets[] = $sqlSnippet; } return ($this->_data['id'] > 0 ? 'update' : 'insert into') . " {$table} set " . implode(',', $sqlSnippets) . ($this->_data['id'] > 0 ? " where id = {$this->_data['id']}" : ''); } /** * @param string $propName * @param null|string $lang * * @return string */ public function _($propName, $lang = null) { if ($lang === null) { $lang = LangUtils::getLang(); } $localizedPropName = "{$propName}_{$lang}"; if ($lang === null || $lang === 'cs') { $localizedPropName = $propName; } return $this->{$localizedPropName}; } public function __toString() { $out = get_class($this) . ': '; $itemsTxt = []; foreach (array_merge($this->_data, get_object_vars_compatible($this)) as $key => $value) { $value = json_encode($value); $itemsTxt[] = "{$key} = {$value}"; } $out .= implode(',', $itemsTxt); return $out; } /** * Specify data which should be serialized to JSON * @link http://php.net/manual/en/jsonserializable.jsonserialize.php * @return mixed data which can be serialized by <b>json_encode</b>, * which is a value of any type other than a resource. * @since 5.4.0 */ public function jsonSerialize() { // we do not want to include classes like Maternia_Translate or ServiceManager $attr = get_object_vars_compatible($this); foreach ($attr as $k => $a) { if (is_object($a) && ! ($a instanceof stdClass)) { unset($attr[$k]); } } return add($this->_data, $attr); } public function __debugInfo() { $class = new \ReflectionClass($this); $properties = []; /** @var \ReflectionProperty $staticProperty */ foreach ($class->getStaticProperties() as $staticProperty) { var_dump($staticProperty); $staticProperty->setAccessible(true); $properties[$staticProperty->getName()] = $staticProperty->getValue(); } /** @var \ReflectionProperty $staticProperty */ foreach ($class->getProperties() as $property) { $property->setAccessible(true); $properties[$property->getName()] = $property->getValue($this); } var_dump($properties, $class->getParentClass()); $data = $properties['_data']; unset($properties['_data']); return array_merge($properties, $data); } } $a = new RootObj(); $a->sfdgsdfg = 'sfgsdfg'; class Bb extends RootObj { private $test = 'sdfs'; private static $sss = 'sdfs'; } $b = new Bb(); $b->sfsdfgsdfg = 'asf'; var_dump($a, $b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r0dap
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'rootobj'
  198     1        NEW                                              $2      'RootObj'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
  199     4        ASSIGN_OBJ                                               !0, 'sfdgsdfg'
          5        OP_DATA                                                  'sfgsdfg'
  201     6        DECLARE_CLASS                                            'bb', 'rootobj'
  206     7        NEW                                              $6      'Bb'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $6
  207    10        ASSIGN_OBJ                                               !1, 'sfsdfgsdfg'
         11        OP_DATA                                                  'asf'
  209    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Class RootObj:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r0dap
function name:  __construct
number of ops:  4
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV_INIT                                        !0      null
   16     1        ASSIGN_OBJ                                               '_data'
          2        OP_DATA                                                  !0
   17     3      > RETURN                                                   null

End of function __construct

Function __get:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/r0dap
function name:  __get
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   22     1        FETCH_OBJ_W                                      $1      '_data'
          2        FETCH_DIM_W                                      $2      $1, !0
          3      > RETURN_BY_REF                                            $2
   23     4*     > RETURN_BY_REF                                            null

End of function __get

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

End of function __set

Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r0dap
function name:  __isset
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
   34     1        FETCH_OBJ_IS                                     ~1      '_data'
          2        ISSET_ISEMPTY_DIM_OBJ                         0  ~2      ~1, !0
          3      > RETURN                                                   ~2
   35     4*     > RETURN                                                   null

End of function __isset

Function createobjectsfromarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 37
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 37
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 26
Branch analysis from position: 13
2 jumps found. (Code = 46) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 77) Position 1 = 30, Position 2 = 35
Branch analysis from position: 30
2 jumps found. (Code = 78) Position 1 = 31, Position 2 = 35
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 35
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 17
Branch analysis from position: 26
2 jumps found. (Code = 77) Position 1 = 30, Position 2 = 35
Branch analysis from position: 30
Branch analysis from position: 35
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/r0dap
function name:  createObjectsFromArray
number of ops:  40
compiled vars:  !0 = $className, !1 = $array, !2 = $defaults, !3 = $idAsKey, !4 = $results, !5 = $data, !6 = $result, !7 = $value, !8 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      <array>
          3        RECV_INIT                                        !3      <false>
   40     4        ASSIGN                                                   !4, <array>
   41     5      > FE_RESET_R                                       $10     !1, ->37
          6    > > FE_FETCH_R                                               $10, !5, ->37
   42     7    >   FETCH_CLASS                                   0  $11     !0
          8        NEW                                              $12     $11
          9        SEND_VAR_EX                                              !5
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !6, $12
   43    12      > JMPZ                                                     !3, ->26
   44    13    >   TYPE_CHECK                                  256  ~15     !5
         14      > JMPZ_EX                                          ~15     ~15, ->17
         15    >   ISSET_ISEMPTY_PROP_OBJ                           ~16     !5, 'id'
         16        BOOL                                             ~15     ~16
         17    > > JMPZ                                                     ~15, ->22
   45    18    >   FETCH_OBJ_R                                      ~17     !5, 'id'
         19        ASSIGN_DIM                                               !4, ~17
         20        OP_DATA                                                  !6
         21      > JMP                                                      ->25
   47    22    >   FETCH_DIM_R                                      ~19     !5, 'id'
         23        ASSIGN_DIM                                               !4, ~19
         24        OP_DATA                                                  !6
         25    > > JMP                                                      ->28
   50    26    >   ASSIGN_DIM                                               !4
         27        OP_DATA                                                  !6
   52    28    >   CAST                                          7  ~22     !2
         29      > FE_RESET_R                                       $23     ~22, ->35
         30    > > FE_FETCH_R                                       ~24     $23, !7, ->35
         31    >   ASSIGN                                                   !8, ~24
   53    32        ASSIGN_OBJ                                               !6, !8
         33        OP_DATA                                                  !7
   52    34      > JMP                                                      ->30
         35    >   FE_FREE                                                  $23
   41    36      > JMP                                                      ->6
         37    >   FE_FREE                                                  $10
   57    38      > RETURN                                                   !4
   58    39*     > RETURN                                                   null

End of function createobjectsfromarray

Function asarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r0dap
function name:  asArray
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   63     0  E >   FETCH_OBJ_R                                      ~0      '_data'
          1      > RETURN                                                   ~0
   64     2*     > RETURN                                                   null

End of function asarray

Function collectiontoids:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
Branch analysis from position: 16
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/r0dap
function name:  collectionToIds
number of ops:  20
compiled vars:  !0 = $collection, !1 = $ids, !2 = $item, !3 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   67     0  E >   RECV                                             !0      
   69     1        ASSIGN                                                   !1, <array>
   70     2      > FE_RESET_R                                       $5      !0, ->17
          3    > > FE_FETCH_R                                               $5, !2, ->17
   71     4    >   ASSIGN                                                   !3, null
   72     5        TYPE_CHECK                                  128          !2
          6      > JMPZ                                                     ~7, ->10
   73     7    >   FETCH_DIM_R                                      ~8      !2, 'id'
          8        ASSIGN                                                   !3, ~8
          9      > JMP                                                      ->12
   75    10    >   FETCH_OBJ_R                                      ~10     !2, 'id'
         11        ASSIGN                                                   !3, ~10
   77    12    >   IS_NOT_EQUAL                                             !3, null
         13      > JMPZ                                                     ~12, ->16
   78    14    >   ASSIGN_DIM                                               !1
         15        OP_DATA                                                  !3
   70    16    > > JMP                                                      ->3
         17    >   FE_FREE                                                  $5
   82    18      > RETURN                                                   !1
   83    19*     > RETURN                                                   null

End of function collectiontoids

Function getsavesql:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 39
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 39
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 22
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 28
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 28
Branch analysis from position: 24
Branch analysis from position: 28
Branch analysis from position: 22
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 46
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 60, Position 2 = 66
Branch analysis from position: 60
1 jumps found. (Code = 42) Position 1 = 67
Branch analysis from position: 67
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 66
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 46
2 jumps found. (Code = 43) Position 1 = 60, Position 2 = 66
Branch analysis from position: 60
Branch analysis from position: 66
Branch analysis from position: 39
filename:       /in/r0dap
function name:  getSaveSql
number of ops:  70
compiled vars:  !0 = $table, !1 = $sqlSnippets, !2 = $value, !3 = $key, !4 = $sqlSnippet
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   86     0  E >   RECV                                             !0      
   88     1        ASSIGN                                                   !1, <array>
   90     2        FETCH_OBJ_R                                      ~6      '_data'
          3      > FE_RESET_R                                       $7      ~6, ->39
          4    > > FE_FETCH_R                                       ~8      $7, !2, ->39
          5    >   ASSIGN                                                   !3, ~8
   91     6        IS_EQUAL                                                 !3, 'id'
          7      > JMPZ                                                     ~10, ->9
   92     8    > > JMP                                                      ->4
   94     9    >   TYPE_CHECK                                  128          !2
         10      > JMPZ                                                     ~11, ->12
   95    11    > > JMP                                                      ->4
   97    12    >   TYPE_CHECK                                  256          !2
         13      > JMPZ                                                     ~12, ->15
   98    14    > > JMP                                                      ->4
  101    15    >   TYPE_CHECK                                   12          !2
         16      > JMPZ                                                     ~13, ->22
  102    17    > > JMPZ                                                     !2, ->20
         18    >   QM_ASSIGN                                        ~14     1
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~14     0
         21    >   ASSIGN                                                   !2, ~14
  104    22    >   TYPE_CHECK                                    2          !2
         23      > JMPZ                                                     ~16, ->28
  105    24    >   NOP                                                      
         25        FAST_CONCAT                                      ~17     !3, '+%3D+null'
         26        ASSIGN                                                   !4, ~17
         27      > JMP                                                      ->36
  107    28    >   NOP                                                      
         29        FAST_CONCAT                                      ~19     !3, '+%3D+%27'
         30        INIT_FCALL                                               'addslashes'
         31        SEND_VAR                                                 !2
         32        DO_ICALL                                         $20     
         33        CONCAT                                           ~21     ~19, $20
         34        CONCAT                                           ~22     ~21, '%27'
         35        ASSIGN                                                   !4, ~22
  109    36    >   ASSIGN_DIM                                               !1
         37        OP_DATA                                                  !4
   90    38      > JMP                                                      ->4
         39    >   FE_FREE                                                  $7
  112    40        FETCH_OBJ_R                                      ~25     '_data'
         41        FETCH_DIM_R                                      ~26     ~25, 'id'
         42        IS_SMALLER                                               0, ~26
         43      > JMPZ                                                     ~27, ->46
         44    >   QM_ASSIGN                                        ~28     'update'
         45      > JMP                                                      ->47
         46    >   QM_ASSIGN                                        ~28     'insert+into'
         47    >   ROPE_INIT                                     3  ~30     '+'
         48        ROPE_ADD                                      1  ~30     ~30, !0
         49        ROPE_END                                      2  ~29     ~30, '+set+'
         50        CONCAT                                           ~32     ~28, ~29
         51        INIT_FCALL                                               'implode'
         52        SEND_VAL                                                 '%2C'
         53        SEND_VAR                                                 !1
         54        DO_ICALL                                         $33     
         55        CONCAT                                           ~34     ~32, $33
         56        FETCH_OBJ_R                                      ~35     '_data'
         57        FETCH_DIM_R                                      ~36     ~35, 'id'
         58        IS_SMALLER                                               0, ~36
         59      > JMPZ                                                     ~37, ->66
         60    >   NOP                                                      
         61        FETCH_OBJ_R                                      ~38     '_data'
         62        FETCH_DIM_R                                      ~39     ~38, 'id'
         63        FAST_CONCAT                                      ~40     '+where+id+%3D+', ~39
         64        QM_ASSIGN                                        ~41     ~40
         65      > JMP                                                      ->67
         66    >   QM_ASSIGN                                        ~41     ''
         67    >   CONCAT                                           ~42     ~34, ~41
         68      > RETURN                                                   ~42
  113    69*     > RETURN                                                   null

End of function getsavesql

Function _:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 47) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 15
Branch analysis from position: 7
filename:       /in/r0dap
function name:  _
number of ops:  20
compiled vars:  !0 = $propName, !1 = $lang, !2 = $localizedPropName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  122     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
  124     2        TYPE_CHECK                                    2          !1
          3      > JMPZ                                                     ~3, ->7
  125     4    >   INIT_STATIC_METHOD_CALL                                  'LangUtils', 'getLang'
          5        DO_FCALL                                      0  $4      
          6        ASSIGN                                                   !1, $4
  128     7    >   ROPE_INIT                                     3  ~7      !0
          8        ROPE_ADD                                      1  ~7      ~7, '_'
          9        ROPE_END                                      2  ~6      ~7, !1
         10        ASSIGN                                                   !2, ~6
  129    11        TYPE_CHECK                                    2  ~10     !1
         12      > JMPNZ_EX                                         ~10     ~10, ->15
         13    >   IS_IDENTICAL                                     ~11     !1, 'cs'
         14        BOOL                                             ~10     ~11
         15    > > JMPZ                                                     ~10, ->17
  130    16    >   ASSIGN                                                   !2, !0
  133    17    >   FETCH_OBJ_R                                      ~13     !2
         18      > RETURN                                                   ~13
  134    19*     > RETURN                                                   null

End of function _

Function __tostring:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 27
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 27
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/r0dap
function name:  __toString
number of ops:  37
compiled vars:  !0 = $out, !1 = $itemsTxt, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  139     0  E >   FETCH_THIS                                       ~4      
          1        GET_CLASS                                        ~5      ~4
          2        CONCAT                                           ~6      ~5, '%3A+'
          3        ASSIGN                                                   !0, ~6
  140     4        ASSIGN                                                   !1, <array>
  142     5        INIT_FCALL                                               'array_merge'
          6        FETCH_OBJ_R                                      ~9      '_data'
          7        SEND_VAL                                                 ~9
          8        INIT_FCALL_BY_NAME                                       'get_object_vars_compatible'
          9        FETCH_THIS                                       $10     
         10        SEND_VAR_EX                                              $10
         11        DO_FCALL                                      0  $11     
         12        SEND_VAR                                                 $11
         13        DO_ICALL                                         $12     
         14      > FE_RESET_R                                       $13     $12, ->27
         15    > > FE_FETCH_R                                       ~14     $13, !2, ->27
         16    >   ASSIGN                                                   !3, ~14
  143    17        INIT_FCALL                                               'json_encode'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                         $16     
         20        ASSIGN                                                   !2, $16
  144    21        ROPE_INIT                                     3  ~20     !3
         22        ROPE_ADD                                      1  ~20     ~20, '+%3D+'
         23        ROPE_END                                      2  ~19     ~20, !2
         24        ASSIGN_DIM                                               !1
         25        OP_DATA                                                  ~19
  142    26      > JMP                                                      ->15
         27    >   FE_FREE                                                  $13
  147    28        INIT_FCALL                                               'implode'
         29        SEND_VAL                                                 '%2C'
         30        SEND_VAR                                                 !1
         31        DO_ICALL                                         $22     
         32        ASSIGN_OP                                     8          !0, $22
  149    33        VERIFY_RETURN_TYPE                                       !0
         34      > RETURN                                                   !0
  150    35*       VERIFY_RETURN_TYPE                                       
         36*     > RETURN                                                   null

End of function __tostring

Function jsonserialize:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 15
Branch analysis from position: 13
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/r0dap
function name:  jsonSerialize
number of ops:  25
compiled vars:  !0 = $attr, !1 = $a, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  163     0  E >   INIT_FCALL_BY_NAME                                       'get_object_vars_compatible'
          1        FETCH_THIS                                       $3      
          2        SEND_VAR_EX                                              $3
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                                   !0, $4
  164     5      > FE_RESET_R                                       $6      !0, ->16
          6    > > FE_FETCH_R                                       ~7      $6, !1, ->16
          7    >   ASSIGN                                                   !2, ~7
  165     8        TYPE_CHECK                                  256  ~9      !1
          9      > JMPZ_EX                                          ~9      ~9, ->13
         10    >   INSTANCEOF                                       ~10     !1, 'stdClass'
         11        BOOL_NOT                                         ~11     ~10
         12        BOOL                                             ~9      ~11
         13    > > JMPZ                                                     ~9, ->15
  166    14    >   UNSET_DIM                                                !0, !2
  164    15    > > JMP                                                      ->6
         16    >   FE_FREE                                                  $6
  170    17        INIT_FCALL_BY_NAME                                       'add'
         18        CHECK_FUNC_ARG                                           
         19        FETCH_OBJ_FUNC_ARG                               $12     '_data'
         20        SEND_FUNC_ARG                                            $12
         21        SEND_VAR_EX                                              !0
         22        DO_FCALL                                      0  $13     
         23      > RETURN                                                   $13
  171    24*     > RETURN                                                   null

End of function jsonserialize

Function __debuginfo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 23
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 23
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 23
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 40
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 40
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
Branch analysis from position: 23
filename:       /in/r0dap
function name:  __debugInfo
number of ops:  56
compiled vars:  !0 = $class, !1 = $properties, !2 = $staticProperty, !3 = $property, !4 = $data
line      #* E I O op                           fetch          ext  return  operands
------------------

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.87 ms | 1428 KiB | 23 Q