3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = '8**'; $test_code = str_replace('*', '[0,9]{1}', $code); echo 'test_code = '.$test_code; $course_filters = array('200','809'); if (!empty($course_filters[$subject])) { foreach ($course_filters as $key => $code) { preg_match("/".$test_code."/", $code, $matches); if ($matches) { echo "found = ".$code; } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 28
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 27
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 27
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 26
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 28
filename:       /in/C5Edk
function name:  (null)
number of ops:  29
compiled vars:  !0 = $code, !1 = $test_code, !2 = $course_filters, !3 = $subject, !4 = $key, !5 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '8%2A%2A'
    4     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '%2A'
          3        SEND_VAL                                                 '%5B0%2C9%5D%7B1%7D'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !1, $7
    5     7        CONCAT                                           ~9      'test_code+%3D+', !1
          8        ECHO                                                     ~9
    7     9        ASSIGN                                                   !2, <array>
    9    10        ISSET_ISEMPTY_DIM_OBJ                         1  ~11     !2, !3
         11        BOOL_NOT                                         ~12     ~11
         12      > JMPZ                                                     ~12, ->28
   10    13    > > FE_RESET_R                                       $13     !2, ->27
         14    > > FE_FETCH_R                                       ~14     $13, !0, ->27
         15    >   ASSIGN                                                   !4, ~14
   11    16        INIT_FCALL                                               'preg_match'
         17        CONCAT                                           ~16     '%2F', !1
         18        CONCAT                                           ~17     ~16, '%2F'
         19        SEND_VAL                                                 ~17
         20        SEND_VAR                                                 !0
         21        SEND_REF                                                 !5
         22        DO_ICALL                                                 
   12    23      > JMPZ                                                     !5, ->26
   13    24    >   CONCAT                                           ~19     'found+%3D+', !0
         25        ECHO                                                     ~19
   10    26    > > JMP                                                      ->14
         27    >   FE_FREE                                                  $13
   16    28    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.61 ms | 1396 KiB | 17 Q