3v4l.org

run code in 500+ PHP versions simultaneously
<?php $url = 'http://a.com/php/abcpdf/'; $url_data = parse_url($url); if(strpos(trim($url_data['path'],'/') . "/","php/") !== false){ echo "exists"; // your task }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/XQlF1
function name:  (null)
number of ops:  13
compiled vars:  !0 = $url, !1 = $url_data
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'http%3A%2F%2Fa.com%2Fphp%2Fabcpdf%2F'
    5     1        INIT_FCALL                                                   'parse_url'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $3      
          4        ASSIGN                                                       !1, $3
    7     5        FETCH_DIM_R                                          ~5      !1, 'path'
          6        FRAMELESS_ICALL_2                trim                ~6      ~5, '%2F'
          7        CONCAT                                               ~7      ~6, '%2F'
          8        FRAMELESS_ICALL_2                strpos              ~8      ~7, 'php%2F'
          9        TYPE_CHECK                                      1018          ~8
         10      > JMPZ                                                         ~9, ->12
    8    11    >   ECHO                                                         'exists'
    9    12    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
221.05 ms | 2088 KiB | 14 Q