3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B { public function addHello( $string ) { return $string . ' Hello!'; } } class A { public static function test() { $B = new B(); $name = 'Eugene'; return $B->addHello( $name ); } } A::test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DIbFK
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_STATIC_METHOD_CALL                                  'A', 'test'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class B:
Function addhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DIbFK
function name:  addHello
number of ops:  4
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        CONCAT                                           ~1      !0, '+Hello%21'
          2      > RETURN                                                   ~1
    8     3*     > RETURN                                                   null

End of function addhello

End of class B.

Class A:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DIbFK
function name:  test
number of ops:  9
compiled vars:  !0 = $B, !1 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $2      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   16     3        ASSIGN                                                   !1, 'Eugene'
   19     4        INIT_METHOD_CALL                                         !0, 'addHello'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0  $6      
          7      > RETURN                                                   $6
   20     8*     > RETURN                                                   null

End of function test

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.1 ms | 1394 KiB | 13 Q