3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function bad_3rd_partycode( $p ) { return null; } function my_code( string $path ): string { if ( is_file( $path ) ) { unlink( $path ); } return ''; } $value = 'foo.log'; $value = call_user_func( 'bad_3rd_partycode', $value ); echo call_user_func( 'my_code', $value );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PMSFB
function name:  (null)
number of ops:  10
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, 'foo.log'
   17     1        INIT_FCALL                                               'bad_3rd_partycode'
          2        SEND_USER                                                !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
   18     5        INIT_FCALL                                               'my_code'
          6        SEND_USER                                                !0
          7        DO_FCALL                                      0  $4      
          8        ECHO                                                     $4
          9      > RETURN                                                   1

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

End of function bad_3rd_partycode

Function my_code:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/PMSFB
function name:  my_code
number of ops:  11
compiled vars:  !0 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'is_file'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > JMPZ                                                     $1, ->8
   10     5    >   INIT_FCALL                                               'unlink'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   13     8    > > RETURN                                                   ''
   14     9*       VERIFY_RETURN_TYPE                                       
         10*     > RETURN                                                   null

End of function my_code

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.22 ms | 1002 KiB | 17 Q