3v4l.org

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

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

End of function create

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LrqO0
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   'Bin%21'
   11     1*     > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.34 ms | 1395 KiB | 15 Q