3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = 'Nil'; $index = 'surveyandmedia3'; $medianame = preg_match("/surveyandmedia(\d+)$/",$index,$qnumber); if(count($qnumber) > 0) $path = $qnumber; else $path = $index; print_r($path[1]); ?>
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/IZvbo
function name:  (null)
number of ops:  19
compiled vars:  !0 = $path, !1 = $index, !2 = $medianame, !3 = $qnumber
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Nil'
    3     1        ASSIGN                                                   !1, 'surveyandmedia3'
    4     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAL                                                 '%2Fsurveyandmedia%28%5Cd%2B%29%24%2F'
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !3
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
    6     8        COUNT                                            ~8      !3
          9        IS_SMALLER                                               0, ~8
         10      > JMPZ                                                     ~9, ->13
    7    11    >   ASSIGN                                                   !0, !3
         12      > JMP                                                      ->14
    9    13    >   ASSIGN                                                   !0, !1
   11    14    >   INIT_FCALL                                               'print_r'
         15        FETCH_DIM_R                                      ~12     !0, 1
         16        SEND_VAL                                                 ~12
         17        DO_ICALL                                                 
   12    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.73 ms | 1395 KiB | 17 Q