3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FooBar { private function __construct() { } public static function newBaz() { return new Baz(); } } class Baz extends FooBar {} var_dump(get_class(FooBar::newBaz())); //var_dump(get_class(new Baz()));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h4Mq3
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'FooBar', 'newBaz'
          2        DO_FCALL                                      0  $0      
          3        GET_CLASS                                        ~1      $0
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
   16     6      > RETURN                                                   1

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

End of function __construct

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

End of function newbaz

End of class FooBar.

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

End of function __construct

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

End of function newbaz

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.18 ms | 1446 KiB | 14 Q