3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Are you sure you want to do this? Type 'yes' to continue: "; $handle = fopen ("php://stdin","r"); $line = fgets($handle); if(trim($line) != 'yes'){ echo "ABORTING!\n"; exit; } echo "\n"; echo "Thank you, continuing...\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kF2r2
function name:  (null)
number of ops:  20
compiled vars:  !0 = $handle, !1 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     'Are+you+sure+you+want+to+do+this%3F++Type+%27yes%27+to+continue%3A+'
    4     1        INIT_FCALL                                               'fopen'
          2        SEND_VAL                                                 'php%3A%2F%2Fstdin'
          3        SEND_VAL                                                 'r'
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !0, $2
    5     6        INIT_FCALL                                               'fgets'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
    6    10        INIT_FCALL                                               'trim'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $6      
         13        IS_NOT_EQUAL                                             $6, 'yes'
         14      > JMPZ                                                     ~7, ->17
    7    15    >   ECHO                                                     'ABORTING%21%0A'
    8    16      > EXIT                                                     
   10    17    >   ECHO                                                     '%0A'
   11    18        ECHO                                                     'Thank+you%2C+continuing...%0A'
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.22 ms | 935 KiB | 20 Q