3v4l.org

run code in 300+ PHP versions simultaneously
<?php class vldtest { private $vals = array(); public function setVal($name, $val) { $this->vals[$name] = $val; return $this; } public function dump() { var_dump($this->vals); } } $obj = new vldtest(); $obj->setVal('d', 'v'); $obj->setVal('foo', 'bar'); $obj->setVal('a', 'a'); $obj->setVal('er', 'vt'); ; $obj->dump();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rS5ln
function name:  (null)
number of ops:  22
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $1      'vldtest'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    9     3        INIT_METHOD_CALL                                         !0, 'setVal'
          4        SEND_VAL_EX                                              'd'
          5        SEND_VAL_EX                                              'v'
          6        DO_FCALL                                      0          
   10     7        INIT_METHOD_CALL                                         !0, 'setVal'
          8        SEND_VAL_EX                                              'foo'
          9        SEND_VAL_EX                                              'bar'
         10        DO_FCALL                                      0          
   11    11        INIT_METHOD_CALL                                         !0, 'setVal'
         12        SEND_VAL_EX                                              'a'
         13        SEND_VAL_EX                                              'a'
         14        DO_FCALL                                      0          
   12    15        INIT_METHOD_CALL                                         !0, 'setVal'
         16        SEND_VAL_EX                                              'er'
         17        SEND_VAL_EX                                              'vt'
         18        DO_FCALL                                      0          
   15    19        INIT_METHOD_CALL                                         !0, 'dump'
         20        DO_FCALL                                      0          
         21      > RETURN                                                   1

Class vldtest:
Function setval:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rS5ln
function name:  setVal
number of ops:  8
compiled vars:  !0 = $name, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_OBJ_W                                      $2      'vals'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
          5        FETCH_THIS                                       ~4      
          6      > RETURN                                                   ~4
          7*     > RETURN                                                   null

End of function setval

Function dump:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rS5ln
function name:  dump
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'vals'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
          4      > RETURN                                                   null

End of function dump

End of class vldtest.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.4 ms | 1396 KiB | 15 Q