3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $_foo = array(); public function fill(){ array_push($this->_foo, "hello"); array_push($this->_foo, "world"); } public function getFoo() { return $this->_foo; } } $foo = new Foo(); var_dump($foo->getFoo()); $foo->fill(); var_dump($foo->getFoo());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6Jci6
function name:  (null)
number of ops:  16
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'getFoo'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
   16     8        INIT_METHOD_CALL                                         !0, 'fill'
          9        DO_FCALL                                      0          
   17    10        INIT_FCALL                                               'var_dump'
         11        INIT_METHOD_CALL                                         !0, 'getFoo'
         12        DO_FCALL                                      0  $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Class Foo:
Function fill:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6Jci6
function name:  fill
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'array_push'
          1        FETCH_OBJ_W                                      $0      '_foo'
          2        SEND_REF                                                 $0
          3        SEND_VAL                                                 'hello'
          4        DO_ICALL                                                 
    7     5        INIT_FCALL                                               'array_push'
          6        FETCH_OBJ_W                                      $2      '_foo'
          7        SEND_REF                                                 $2
          8        SEND_VAL                                                 'world'
          9        DO_ICALL                                                 
    8    10      > RETURN                                                   null

End of function fill

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

End of function getfoo

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.22 ms | 1396 KiB | 17 Q