3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mystring = "micha<?php </textarea>l' OR 1=1"; $findme = "="; $pos = strpos($mystring, $findme); // Note our use of ===. Simply == would not work as expected // because the position of 'a' was the 0th (first) character. if (strpos($mystring, $findme) === false) { //echo "The string '$findme' was not found in the string '$mystring'"; echo 'nenasiel som :('; } else { echo 'je tam'; //echo "The string '$findme' was found in the string '$mystring'"; //echo " and exists at position $pos"; } echo "\n"; echo 'This ', 'string ', 'was ', 'made ', 'with multiple parameters.', chr(10); echo 'This ' . 'string ' . 'was ' . 'made ' . 'with concatenation.' . "\n"; $forbiddenChar = array("<", ">", "'", "=", "--"); echo $forbiddenChar[0] . ", ". $forbiddenChar[1] . ", " . $forbiddenChar[2] . ", " . $forbiddenChar[3] . ", " . $forbiddenChar[4] . "\n"; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qp7jM
function name:  (null)
number of ops:  41
compiled vars:  !0 = $mystring, !1 = $findme, !2 = $pos, !3 = $forbiddenChar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'micha%3C%3Fphp+%3C%2Ftextarea%3El%27+OR+1%3D1'
    3     1        ASSIGN                                                   !1, '%3D'
    4     2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    8     7        INIT_FCALL                                               'strpos'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $8      
         11        TYPE_CHECK                                    4          $8
         12      > JMPZ                                                     ~9, ->15
   10    13    >   ECHO                                                     'nenasiel+som+%3A%28'
         14      > JMP                                                      ->16
   12    15    >   ECHO                                                     'je+tam'
   16    16    >   ECHO                                                     '%0A'
   17    17        ECHO                                                     'This+'
         18        ECHO                                                     'string+'
         19        ECHO                                                     'was+'
         20        ECHO                                                     'made+'
         21        ECHO                                                     'with+multiple+parameters.'
         22        ECHO                                                     '%0A'
   18    23        ECHO                                                     'This+string+was+made+with+concatenation.%0A'
   20    24        ASSIGN                                                   !3, <array>
   21    25        FETCH_DIM_R                                      ~11     !3, 0
         26        CONCAT                                           ~12     ~11, '%2C+'
         27        FETCH_DIM_R                                      ~13     !3, 1
         28        CONCAT                                           ~14     ~12, ~13
         29        CONCAT                                           ~15     ~14, '%2C+'
         30        FETCH_DIM_R                                      ~16     !3, 2
         31        CONCAT                                           ~17     ~15, ~16
         32        CONCAT                                           ~18     ~17, '%2C+'
         33        FETCH_DIM_R                                      ~19     !3, 3
         34        CONCAT                                           ~20     ~18, ~19
         35        CONCAT                                           ~21     ~20, '%2C+'
         36        FETCH_DIM_R                                      ~22     !3, 4
         37        CONCAT                                           ~23     ~21, ~22
         38        CONCAT                                           ~24     ~23, '%0A'
         39        ECHO                                                     ~24
   22    40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.33 ms | 1400 KiB | 15 Q