3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function bar() { return new Bar(); } } class Bar { public function ucase($var) { return strtoupper($var); } } var_dump(Foo::bar()->ucase('qux'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hv1VF
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'Foo', 'bar'
          2        DO_FCALL                                      0  $0      
          3        INIT_METHOD_CALL                                         $0, 'ucase'
          4        SEND_VAL_EX                                              'qux'
          5        DO_FCALL                                      0  $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

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

End of function bar

End of class Foo.

Class Bar:
Function ucase:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hv1VF
function name:  ucase
number of ops:  6
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'strtoupper'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   12     5*     > RETURN                                                   null

End of function ucase

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.26 ms | 1395 KiB | 17 Q