3v4l.org

run code in 300+ PHP versions simultaneously
<?php function i_test_type_or_null(int $i = null) {} i_test_type_or_null() || print "test type or nullable ok\n"; function i_test_nullable(?int $i) {} i_test_nullable() || print "never reached";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/b2Dfc
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'i_test_type_or_null'
          1        DO_FCALL                                      0  $0      
          2      > JMPNZ_EX                                         ~1      $0, ->5
          3    >   ECHO                                                     'test+type+or+nullable+ok%0A'
          4        BOOL                                             ~1      1
    8     5    >   INIT_FCALL                                               'i_test_nullable'
          6        DO_FCALL                                      0  $2      
          7      > JMPNZ_EX                                         ~3      $2, ->10
          8    >   ECHO                                                     'never+reached'
          9        BOOL                                             ~3      1
         10    > > RETURN                                                   1

Function i_test_type_or_null:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b2Dfc
function name:  i_test_type_or_null
number of ops:  2
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      null
          1      > RETURN                                                   null

End of function i_test_type_or_null

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

End of function i_test_nullable

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
255.46 ms | 1003 KiB | 15 Q