3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $obj; } class Zoo { public $obj; public function show() { var_dump($this->obj); } } class Bar {} class Baz {} $foo = new Foo(); $zoo = new Zoo(); $a = new Bar(); $b = new Baz(); $zoo->obj = $foo->obj; $zoo->show(); $foo->obj = $a; $zoo->show(); $foo->obj = $b; $zoo->show();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CkTXM
function name:  (null)
number of ops:  26
compiled vars:  !0 = $foo, !1 = $zoo, !2 = $a, !3 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $4      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
   15     3        NEW                                              $7      'Zoo'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $7
   17     6        NEW                                              $10     'Bar'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $10
   18     9        NEW                                              $13     'Baz'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !3, $13
   20    12        FETCH_OBJ_R                                      ~17     !0, 'obj'
         13        ASSIGN_OBJ                                               !1, 'obj'
         14        OP_DATA                                                  ~17
   21    15        INIT_METHOD_CALL                                         !1, 'show'
         16        DO_FCALL                                      0          
   22    17        ASSIGN_OBJ                                               !0, 'obj'
         18        OP_DATA                                                  !2
   23    19        INIT_METHOD_CALL                                         !1, 'show'
         20        DO_FCALL                                      0          
   24    21        ASSIGN_OBJ                                               !0, 'obj'
         22        OP_DATA                                                  !3
   25    23        INIT_METHOD_CALL                                         !1, 'show'
         24        DO_FCALL                                      0          
         25      > RETURN                                                   1

Class Foo: [no user functions]
Class Zoo:
Function show:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CkTXM
function name:  show
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'obj'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
          4      > RETURN                                                   null

End of function show

End of class Zoo.

Class Bar: [no user functions]
Class Baz: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.61 ms | 1396 KiB | 15 Q