3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class base { public static function factory() { return new self; } } final class concrete extends base { } var_dump(concrete::factory()); var_dump(base::factory());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7bRFt
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'concrete', 'factory'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
   16     5        INIT_FCALL                                               'var_dump'
          6        INIT_STATIC_METHOD_CALL                                  'base', 'factory'
          7        DO_FCALL                                      0  $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

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

End of function factory

End of class base.

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

End of function factory

End of class concrete.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.1 ms | 1395 KiB | 15 Q