3v4l.org

run code in 300+ PHP versions simultaneously
<?php function outputofsomeprocess() { return range('A','E'); } class A{ public static $foo = array (); public static function doSomething(){ //... Do some process and instantiate static vairable $face self::$foo = outputofsomeprocess(); } } class B{ public function dosomethingelse(){ A::doSomething(); } } class C{ public function dosomethingelse(){ echo A::$foo[0]; } } $objB = new B(); $objB-> dosomethingelse(); $objC = new C(); $objC->dosomethingelse();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EDJTl
function name:  (null)
number of ops:  11
compiled vars:  !0 = $objB, !1 = $objC
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $2      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   28     3        INIT_METHOD_CALL                                         !0, 'dosomethingelse'
          4        DO_FCALL                                      0          
   30     5        NEW                                              $6      'C'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
   31     8        INIT_METHOD_CALL                                         !1, 'dosomethingelse'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function outputofsomeprocess:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EDJTl
function name:  outputofsomeprocess
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 'A'
          2        SEND_VAL                                                 'E'
          3        DO_ICALL                                         $0      
          4      > RETURN                                                   $0
    5     5*     > RETURN                                                   null

End of function outputofsomeprocess

Class A:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EDJTl
function name:  doSomething
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'outputofsomeprocess'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN_STATIC_PROP                                       'foo'
          3        OP_DATA                                                  $1
   12     4      > RETURN                                                   null

End of function dosomething

End of class A.

Class B:
Function dosomethingelse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EDJTl
function name:  dosomethingelse
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'A', 'doSomething'
          1        DO_FCALL                                      0          
   18     2      > RETURN                                                   null

End of function dosomethingelse

End of class B.

Class C:
Function dosomethingelse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EDJTl
function name:  dosomethingelse
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'foo'
          1        FETCH_DIM_R                                      ~1      ~0, 0
          2        ECHO                                                     ~1
   24     3      > RETURN                                                   null

End of function dosomethingelse

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
264.35 ms | 1012 KiB | 16 Q