3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { public function baz() { return $this; } public static function foo() { return new (get_called_class()); } public function somethingElse() {} } Bar::foo()->baz()->somethingElse();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sc5Ff
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                  'Bar', 'foo'
          1        DO_FCALL                                      0  $0      
          2        INIT_METHOD_CALL                                         $0, 'baz'
          3        DO_FCALL                                      0  $1      
          4        INIT_METHOD_CALL                                         $1, 'somethingElse'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Bar:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sc5Ff
function name:  baz
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_THIS                                       ~0      
          1      > RETURN                                                   ~0
    6     2*     > RETURN                                                   null

End of function baz

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sc5Ff
function name:  foo
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   GET_CALLED_CLASS                                 ~0      
          1        FETCH_CLASS                                   0  $1      ~0
          2        NEW                                              $2      $1
          3        DO_FCALL                                      0          
          4      > RETURN                                                   $2
          5*     > RETURN                                                   null

End of function foo

Function somethingelse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sc5Ff
function name:  somethingElse
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   null

End of function somethingelse

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.93 ms | 1394 KiB | 13 Q