3v4l.org

run code in 300+ PHP versions simultaneously
<?php function change_this(&$self = NULL) { $self = (object) array ('foo' => 100); } class test extends stdClass { public $foo = 1; public function test() { change_this($this); print 'test(): '; var_dump($this); $this->test_this(); } public function test_this() { print 'test_this: '; var_dump($this); } } $x = new test; $x->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lMcRC
function name:  (null)
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   31     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function change_this:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lMcRC
function name:  change_this
number of ops:  4
compiled vars:  !0 = $self
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
    5     1        CAST                                          8  ~1      <array>
          2        ASSIGN                                                   !0, ~1
    6     3      > RETURN                                                   null

End of function change_this

Class test:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lMcRC
function name:  test
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'change_this'
          1        FETCH_THIS                                       $0      
          2        SEND_REF                                                 $0
          3        DO_FCALL                                      0          
   16     4        ECHO                                                     'test%28%29%3A+'
   17     5        INIT_FCALL                                               'var_dump'
          6        FETCH_THIS                                       ~2      
          7        SEND_VAL                                                 ~2
          8        DO_ICALL                                                 
   19     9        INIT_METHOD_CALL                                         'test_this'
         10        DO_FCALL                                      0          
   20    11      > RETURN                                                   null

End of function test

Function test_this:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lMcRC
function name:  test_this
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   ECHO                                                     'test_this%3A+'
   25     1        INIT_FCALL                                               'var_dump'
          2        FETCH_THIS                                       ~0      
          3        SEND_VAL                                                 ~0
          4        DO_ICALL                                                 
   26     5      > RETURN                                                   null

End of function test_this

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.09 ms | 1399 KiB | 16 Q