3v4l.org

run code in 500+ PHP versions simultaneously
<?php function chars($a) { return addslashes(implode("", $a)); } $set = implode("", array_map("chr", range(32, 127))); var_dump(preg_match_all('/[A-\d]/', $set, $m) ? chars($m[0]) : null); var_dump(preg_match_all('/[\d-A]/', $set, $m) ? chars($m[0]) : null);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 39
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 39
Branch analysis from position: 33
Branch analysis from position: 39
filename:       /in/LC0hG
function name:  (null)
number of ops:  43
compiled vars:  !0 = $set, !1 = $m
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                                   'array_map'
          1        SEND_VAL                                                     'chr'
          2        INIT_FCALL                                                   'range'
          3        SEND_VAL                                                     32
          4        SEND_VAL                                                     127
          5        DO_ICALL                                             $2      
          6        SEND_VAR                                                     $2
          7        DO_ICALL                                             $3      
          8        FRAMELESS_ICALL_2                implode             ~4      '', $3
          9        ASSIGN                                                       !0, ~4
    6    10        INIT_FCALL                                                   'var_dump'
         11        INIT_FCALL                                                   'preg_match_all'
         12        SEND_VAL                                                     '%2F%5BA-%5Cd%5D%2F'
         13        SEND_VAR                                                     !0
         14        SEND_REF                                                     !1
         15        DO_ICALL                                             $6      
         16      > JMPZ                                                         $6, ->23
         17    >   INIT_FCALL                                                   'chars'
         18        FETCH_DIM_R                                          ~7      !1, 0
         19        SEND_VAL                                                     ~7
         20        DO_FCALL                                          0  $8      
         21        QM_ASSIGN                                            ~9      $8
         22      > JMP                                                          ->24
         23    >   QM_ASSIGN                                            ~9      null
         24    >   SEND_VAL                                                     ~9
         25        DO_ICALL                                                     
    7    26        INIT_FCALL                                                   'var_dump'
         27        INIT_FCALL                                                   'preg_match_all'
         28        SEND_VAL                                                     '%2F%5B%5Cd-A%5D%2F'
         29        SEND_VAR                                                     !0
         30        SEND_REF                                                     !1
         31        DO_ICALL                                             $11     
         32      > JMPZ                                                         $11, ->39
         33    >   INIT_FCALL                                                   'chars'
         34        FETCH_DIM_R                                          ~12     !1, 0
         35        SEND_VAL                                                     ~12
         36        DO_FCALL                                          0  $13     
         37        QM_ASSIGN                                            ~14     $13
         38      > JMP                                                          ->40
         39    >   QM_ASSIGN                                            ~14     null
         40    >   SEND_VAL                                                     ~14
         41        DO_ICALL                                                     
         42      > RETURN                                                       1

Function chars:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LC0hG
function name:  chars
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        INIT_FCALL                                                   'addslashes'
          2        FRAMELESS_ICALL_2                implode             ~1      '', !0
          3        SEND_VAL                                                     ~1
          4        DO_ICALL                                             $2      
          5      > RETURN                                                       $2
          6*     > RETURN                                                       null

End of function chars

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.47 ms | 2103 KiB | 20 Q