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); var_dump($this); $this->test_this(); } public function 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/U1JWV
function name:  (null)
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   29     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/U1JWV
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/U1JWV
function name:  test
number of ops:  11
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        INIT_FCALL                                               'var_dump'
          5        FETCH_THIS                                       ~2      
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
   18     8        INIT_METHOD_CALL                                         'test_this'
          9        DO_FCALL                                      0          
   19    10      > 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/U1JWV
function name:  test_this
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   24     4      > RETURN                                                   null

End of function test_this

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.51 ms | 1399 KiB | 16 Q