3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AnyClass{ public $foo = array(); public function anyMethod(){ $bar = array(); $bar[] = 'anyTextA'; $this->foo[] = 'anyTextB'; return array( $bar, $this->foo ); } } $obj = new AnyClass(); $obj->anyMethod(); // first print_r($obj->anyMethod()); // second
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WsFaf
function name:  (null)
number of ops:  11
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'AnyClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'anyMethod'
          4        DO_FCALL                                      0          
   18     5        INIT_FCALL                                               'print_r'
          6        INIT_METHOD_CALL                                         !0, 'anyMethod'
          7        DO_FCALL                                      0  $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class AnyClass:
Function anymethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WsFaf
function name:  anyMethod
number of ops:  11
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  'anyTextA'
    9     3        FETCH_OBJ_W                                      $3      'foo'
          4        ASSIGN_DIM                                               $3
          5        OP_DATA                                                  'anyTextB'
   10     6        INIT_ARRAY                                       ~5      !0
          7        FETCH_OBJ_R                                      ~6      'foo'
          8        ADD_ARRAY_ELEMENT                                ~5      ~6
          9      > RETURN                                                   ~5
   11    10*     > RETURN                                                   null

End of function anymethod

End of class AnyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.19 ms | 1395 KiB | 15 Q