3v4l.org

run code in 200+ PHP versions simultaneously
<?php $SAFE_SCRIPTS = '"/path/to/a.php","/path/to/b.php"'; $file = '/path/to/a.php/../something'; if(strpos($SAFE_SCRIPTS,"\"$file\"")===false) echo 'NOT SAFE!!'; else echo 'safe :-)';
based on 357Xg
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DLSo6
function name:  (null)
number of ops:  15
compiled vars:  !0 = $SAFE_SCRIPTS, !1 = $file
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   QM_ASSIGN                                                !0
   4     1        QM_ASSIGN                                                !1
   6     2        INIT_FCALL                                               'strpos'
         3        SEND_VAR                                                 !0
         4        ROPE_INIT                                     3  ~5      '%22'
         5        ROPE_ADD                                      1  ~5      ~5, !1
         6        ROPE_END                                      2  ~4      ~5, '%22'
         7        SEND_VAL                                                 ~4
         8        DO_ICALL                                         $7      
         9        IS_NOT_IDENTICAL                                 ~8      $7, <false>
        10      > JMPZ                                                     ~8, ->13
        11    >   ASSIGN_OBJ                                               'NOT+SAFE%21%21'
        12      > JMP                                                      ->14
   7    13    >   ASSIGN_OBJ                                               'safe+%3A-%29'
        14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.4.0