3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $field; public function setField($field) { $this->field = $field; } public function getField() { return $this->field; } } $test1 = new Test(); $test2 = new Test(); $arr = array(); $arr[] = $test1; $arr[] = $test2; $arr[0]->setField(10); $arr[1]->setField(20); var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8S1GZ
function name:  (null)
number of ops:  23
compiled vars:  !0 = $test1, !1 = $test2, !2 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $3      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   14     3        NEW                                              $6      'Test'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $6
   16     6        ASSIGN                                                   !2, <array>
   17     7        ASSIGN_DIM                                               !2
          8        OP_DATA                                                  !0
   18     9        ASSIGN_DIM                                               !2
         10        OP_DATA                                                  !1
   20    11        FETCH_DIM_R                                      ~12     !2, 0
         12        INIT_METHOD_CALL                                         ~12, 'setField'
         13        SEND_VAL_EX                                              10
         14        DO_FCALL                                      0          
   21    15        FETCH_DIM_R                                      ~14     !2, 1
         16        INIT_METHOD_CALL                                         ~14, 'setField'
         17        SEND_VAL_EX                                              20
         18        DO_FCALL                                      0          
   23    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Class Test:
Function setfield:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8S1GZ
function name:  setField
number of ops:  4
compiled vars:  !0 = $field
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN_OBJ                                               'field'
          2        OP_DATA                                                  !0
    7     3      > RETURN                                                   null

End of function setfield

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

End of function getfield

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.42 ms | 1396 KiB | 15 Q