3v4l.org

run code in 300+ PHP versions simultaneously
<?php require_once(dirname(__FILE__) . '/loading.html'); // require the file, don't redirect away from your code include ("file\where\the\variable\comes\from.php"); $s = shell_exec("powershell path\\to\\script.ps1 '$variable'< NUL"); if (strpos($s, 'True') === false) { header('Location: /succes.html'); // is this a typo in your code? 'succes' exit(); // need this } else{ header('Location: /failed.html'); exit(); // need this }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/sh7J3
function name:  (null)
number of ops:  29
compiled vars:  !0 = $s, !1 = $variable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'dirname'
          1        SEND_VAL                                                 '%2Fin%2Fsh7J3'
          2        DO_ICALL                                         $2      
          3        CONCAT                                           ~3      $2, '%2Floading.html'
          4        INCLUDE_OR_EVAL                                          ~3, REQUIRE_ONCE
    5     5        INCLUDE_OR_EVAL                                          'file%5Cwhere%09he%0Bariable%5Ccomes%0Crom.php', INCLUDE
    6     6        INIT_FCALL                                               'shell_exec'
          7        ROPE_INIT                                     3  ~7      'powershell+path%5Cto%5Cscript.ps1+%27'
          8        ROPE_ADD                                      1  ~7      ~7, !1
          9        ROPE_END                                      2  ~6      ~7, '%27%3C+NUL'
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !0, $9
    8    13        INIT_FCALL                                               'strpos'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 'True'
         16        DO_ICALL                                         $11     
         17        TYPE_CHECK                                    4          $11
         18      > JMPZ                                                     ~12, ->24
    9    19    >   INIT_FCALL                                               'header'
         20        SEND_VAL                                                 'Location%3A+%2Fsucces.html'
         21        DO_ICALL                                                 
   10    22      > EXIT                                                     
    8    23*       JMP                                                      ->28
   13    24    >   INIT_FCALL                                               'header'
         25        SEND_VAL                                                 'Location%3A+%2Ffailed.html'
         26        DO_ICALL                                                 
   14    27      > EXIT                                                     
   15    28*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.2 ms | 1014 KiB | 17 Q