3v4l.org

run code in 300+ PHP versions simultaneously
<?php function doArrayStuff(array $stuff = null) { // do stuff // If this worked without fatal erroring, echo worked! echo 'worked!'; } function doFileStuff(SplFileInfo $finfo = null) { // do stuff // If this worked without fatal erroring, echo worked! var_dump($finfo instanceof SplFileInfo); echo 'worked!'; } doArrayStuff(null); doFileStuff(new SplFileInfo(""));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6phmh
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'doarraystuff'
          1        SEND_VAL                                                 null
          2        DO_FCALL                                      0          
   17     3        INIT_FCALL                                               'dofilestuff'
          4        NEW                                              $1      'SplFileInfo'
          5        SEND_VAL_EX                                              ''
          6        DO_FCALL                                      0          
          7        SEND_VAR                                                 $1
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function doarraystuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6phmh
function name:  doArrayStuff
number of ops:  3
compiled vars:  !0 = $stuff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
    6     1        ECHO                                                     'worked%21'
    7     2      > RETURN                                                   null

End of function doarraystuff

Function dofilestuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6phmh
function name:  doFileStuff
number of ops:  7
compiled vars:  !0 = $finfo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV_INIT                                        !0      null
   12     1        INIT_FCALL                                               'var_dump'
          2        INSTANCEOF                                       ~1      !0, 'SplFileInfo'
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
   13     5        ECHO                                                     'worked%21'
   14     6      > RETURN                                                   null

End of function dofilestuff

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.9 ms | 1389 KiB | 17 Q