3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface NodeInterface { public function addNode(Node $node); public function isLeaf(); public function isNode(); public function getKey(); public function setKey($key); public function getValue(); public function setValue($value); public function getUid(); public function uid(); public function key(); public function value(); } class ArrComp implements NodeInterface { protected $uid; protected $nodes; protected $value; public function __construct($key = null, $value = null) { $this->uid = rand(0, 9) . md5(rand(10, 99) . time() . rand(100, 999)) . rand(1000, 9999); $this->value->key = $key; $this->value->val = $value; } public function addNode(Node $node) { $this->nodes[] = $node; return $this; } public function isLeaf() { return count($this->nodes) == 0; } public function isNode() { return count($this->nodes) > 0; } public function getKey() { return $this->value->key; } public function key() { return $this->value->key; } public function setKey($key = null) { $this->value->key = $key; return $this; } public function getValue() { return $this->value->val; } public function value() { return $this->value->val; } public function setValue($value = null) { $this->value->val = $value; return $this; } public function getUid() { return $this->uid; } public function uid() { return $this->uid; } } $comp = new ArrComp('pk'); var_dump($comp);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  (null)
number of ops:  9
compiled vars:  !0 = $comp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   DECLARE_CLASS                                            'arrcomp'
   90     1        NEW                                              $1      'ArrComp'
          2        SEND_VAL_EX                                              'pk'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   91     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class NodeInterface:
Function addnode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  addNode
number of ops:  2
compiled vars:  !0 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function addnode

Function isleaf:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  isLeaf
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   null

End of function isleaf

Function isnode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  isNode
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   null

End of function isnode

Function getkey:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  getKey
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   null

End of function getkey

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

End of function setkey

Function getvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  getValue
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   null

End of function getvalue

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

End of function setvalue

Function getuid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  getUid
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   null

End of function getuid

Function uid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  uid
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   null

End of function uid

Function key:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  key
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E > > RETURN                                                   null

End of function key

Function value:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  value
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   null

End of function value

End of class NodeInterface.

Class ArrComp:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  __construct
number of ops:  36
compiled vars:  !0 = $key, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      null
   26     2        INIT_FCALL                                               'rand'
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 9
          5        DO_ICALL                                         $3      
          6        INIT_FCALL                                               'md5'
          7        INIT_FCALL                                               'rand'
          8        SEND_VAL                                                 10
          9        SEND_VAL                                                 99
         10        DO_ICALL                                         $4      
         11        INIT_FCALL                                               'time'
         12        DO_ICALL                                         $5      
         13        CONCAT                                           ~6      $4, $5
         14        INIT_FCALL                                               'rand'
         15        SEND_VAL                                                 100
         16        SEND_VAL                                                 999
         17        DO_ICALL                                         $7      
         18        CONCAT                                           ~8      ~6, $7
         19        SEND_VAL                                                 ~8
         20        DO_ICALL                                         $9      
         21        CONCAT                                           ~10     $3, $9
         22        INIT_FCALL                                               'rand'
         23        SEND_VAL                                                 1000
         24        SEND_VAL                                                 9999
         25        DO_ICALL                                         $11     
         26        CONCAT                                           ~12     ~10, $11
         27        ASSIGN_OBJ                                               'uid'
         28        OP_DATA                                                  ~12
   27    29        FETCH_OBJ_W                                      $13     'value'
         30        ASSIGN_OBJ                                               $13, 'key'
         31        OP_DATA                                                  !0
   28    32        FETCH_OBJ_W                                      $15     'value'
         33        ASSIGN_OBJ                                               $15, 'val'
         34        OP_DATA                                                  !1
   29    35      > RETURN                                                   null

End of function __construct

Function addnode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  addNode
number of ops:  7
compiled vars:  !0 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   RECV                                             !0      
   33     1        FETCH_OBJ_W                                      $1      'nodes'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   34     4        FETCH_THIS                                       ~3      
          5      > RETURN                                                   ~3
   35     6*     > RETURN                                                   null

End of function addnode

Function isleaf:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  isLeaf
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   FETCH_OBJ_R                                      ~0      'nodes'
          1        COUNT                                            ~1      ~0
          2        IS_EQUAL                                         ~2      ~1, 0
          3      > RETURN                                                   ~2
   40     4*     > RETURN                                                   null

End of function isleaf

Function isnode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  isNode
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   44     0  E >   FETCH_OBJ_R                                      ~0      'nodes'
          1        COUNT                                            ~1      ~0
          2        IS_SMALLER                                       ~2      0, ~1
          3      > RETURN                                                   ~2
   45     4*     > RETURN                                                   null

End of function isnode

Function getkey:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  getKey
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   49     0  E >   FETCH_OBJ_R                                      ~0      'value'
          1        FETCH_OBJ_R                                      ~1      ~0, 'key'
          2      > RETURN                                                   ~1
   50     3*     > RETURN                                                   null

End of function getkey

Function key:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  key
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   54     0  E >   FETCH_OBJ_R                                      ~0      'value'
          1        FETCH_OBJ_R                                      ~1      ~0, 'key'
          2      > RETURN                                                   ~1
   55     3*     > RETURN                                                   null

End of function key

Function setkey:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  setKey
number of ops:  7
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   57     0  E >   RECV_INIT                                        !0      null
   59     1        FETCH_OBJ_W                                      $1      'value'
          2        ASSIGN_OBJ                                               $1, 'key'
          3        OP_DATA                                                  !0
   60     4        FETCH_THIS                                       ~3      
          5      > RETURN                                                   ~3
   61     6*     > RETURN                                                   null

End of function setkey

Function getvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  getValue
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   65     0  E >   FETCH_OBJ_R                                      ~0      'value'
          1        FETCH_OBJ_R                                      ~1      ~0, 'val'
          2      > RETURN                                                   ~1
   66     3*     > RETURN                                                   null

End of function getvalue

Function value:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  value
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   70     0  E >   FETCH_OBJ_R                                      ~0      'value'
          1        FETCH_OBJ_R                                      ~1      ~0, 'val'
          2      > RETURN                                                   ~1
   71     3*     > RETURN                                                   null

End of function value

Function setvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  setValue
number of ops:  7
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   73     0  E >   RECV_INIT                                        !0      null
   75     1        FETCH_OBJ_W                                      $1      'value'
          2        ASSIGN_OBJ                                               $1, 'val'
          3        OP_DATA                                                  !0
   76     4        FETCH_THIS                                       ~3      
          5      > RETURN                                                   ~3
   77     6*     > RETURN                                                   null

End of function setvalue

Function getuid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7R9kc
function name:  getUid
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   81     0  E >   FETCH_OBJ_R                                      ~0      'uid'
          1      > RETURN                                                   ~0
   82     2*     > RETURN                                                   null

End of function getuid

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

End of function uid

End of class ArrComp.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.19 ms | 957 KiB | 22 Q