3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $a = 0; public function printCount() { print $this -> a; print PHP_EOL; // print a new line. } } class B { public $b = 0; public function doSomethingWith( $a ) { $a -> a++; } } $a = new A(); $b = new B(); $a -> printCount(); $b -> doSomethingWith( $a ); $a -> printCount();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JY4qT
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   25     3        NEW                                              $5      'B'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   26     6        INIT_METHOD_CALL                                         !0, 'printCount'
          7        DO_FCALL                                      0          
   27     8        INIT_METHOD_CALL                                         !1, 'doSomethingWith'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
   28    11        INIT_METHOD_CALL                                         !0, 'printCount'
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Class A:
Function printcount:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JY4qT
function name:  printCount
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1        ECHO                                                     ~0
   10     2        ECHO                                                     '%0A'
   11     3      > RETURN                                                   null

End of function printcount

End of class A.

Class B:
Function dosomethingwith:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JY4qT
function name:  doSomethingWith
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   20     1        PRE_INC_OBJ                                              !0, 'a'
   21     2      > RETURN                                                   null

End of function dosomethingwith

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.19 ms | 1385 KiB | 13 Q