3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $field; public function setFiled($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);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WLdgP
function name:  (null)
number of ops:  20
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          
         19      > RETURN                                                   1

Class Test:
Function setfiled:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WLdgP
function name:  setFiled
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 setfiled

Function getfield:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WLdgP
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:
147.44 ms | 1395 KiB | 13 Q