3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['adsd.pdf', 'adsd_1.pdf', 'asdasd.docx']; $b = 'adsd'; for($i = 0; $i < count($a); $i++) { print_r(preg_match('/\$' . $b . '_' . '/', $a[$i])); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 4
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 4
Branch analysis from position: 19
Branch analysis from position: 4
filename:       /in/joaQN
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a, !1 = $b, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 'adsd'
    5     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->16
    6     4    >   INIT_FCALL                                               'print_r'
          5        INIT_FCALL                                               'preg_match'
          6        CONCAT                                           ~6      '%2F%5C%24', !1
          7        CONCAT                                           ~7      ~6, '_'
          8        CONCAT                                           ~8      ~7, '%2F'
          9        SEND_VAL                                                 ~8
         10        FETCH_DIM_R                                      ~9      !0, !2
         11        SEND_VAL                                                 ~9
         12        DO_ICALL                                         $10     
         13        SEND_VAR                                                 $10
         14        DO_ICALL                                                 
    5    15        PRE_INC                                                  !2
         16    >   COUNT                                            ~13     !0
         17        IS_SMALLER                                               !2, ~13
         18      > JMPNZ                                                    ~14, ->4
    7    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.72 ms | 1395 KiB | 17 Q