3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); phpversion() >= "7.0.0" or die(); class Nul { } class C extends Nul { } function m() : C { return new Nul; } var_dump(m());
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LtqQD
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'phpversion'
          1        DO_ICALL                                         $0      
          2        IS_SMALLER_OR_EQUAL                              ~1      '7.0.0', $0
          3      > JMPNZ_EX                                         ~1      ~1, ->6
          4    > > EXIT                                                     
          5*       BOOL                                             ~1      <true>
   17     6    >   INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'm'
          8        DO_FCALL                                      0  $2      
          9        SEND_VAR                                                 $2
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

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

End of function m

Class Nul: [no user functions]
Class C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.46 ms | 1397 KiB | 18 Q