3v4l.org

run code in 300+ PHP versions simultaneously
<?php $files = [ 'Hakim_123.txt', 'Mick_MacKusa.jpg', 'henry_rollins.gif', 'Z_zzz_zzz_zzz.csv' ]; $_GET['postname'] = 'H'; if (!preg_match('~^[A-Z]$~', $_GET['postname'] ?? '')) { exit('Stop trying to hack my scripts'); } exit( json_encode( array_values( array_unique( preg_filter( '~^' . strtolower($_GET['postname']) . '[^_]*\K_.*~', '', array_map('strtolower', $files) ) ) ) ) );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/PNKP7
function name:  (null)
number of ops:  42
compiled vars:  !0 = $files
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        FETCH_W                      global              $2      '_GET'
          2        ASSIGN_DIM                                               $2, 'postname'
          3        OP_DATA                                                  'H'
   11     4        INIT_FCALL                                               'preg_match'
          5        SEND_VAL                                                 '%7E%5E%5BA-Z%5D%24%7E'
          6        FETCH_IS                                         ~4      '_GET'
          7        FETCH_DIM_IS                                     ~5      ~4, 'postname'
          8        COALESCE                                         ~6      ~5
          9        QM_ASSIGN                                        ~6      ''
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $7      
         12        BOOL_NOT                                         ~8      $7
         13      > JMPZ                                                     ~8, ->15
   12    14    > > EXIT                                                     'Stop+trying+to+hack+my+scripts'
   16    15    >   INIT_FCALL                                               'json_encode'
   17    16        INIT_FCALL                                               'array_values'
   18    17        INIT_FCALL                                               'array_unique'
   19    18        INIT_FCALL                                               'preg_filter'
   20    19        INIT_FCALL                                               'strtolower'
         20        FETCH_R                      global              ~9      '_GET'
         21        FETCH_DIM_R                                      ~10     ~9, 'postname'
         22        SEND_VAL                                                 ~10
         23        DO_ICALL                                         $11     
         24        CONCAT                                           ~12     '%7E%5E', $11
         25        CONCAT                                           ~13     ~12, '%5B%5E_%5D%2A%5CK_.%2A%7E'
         26        SEND_VAL                                                 ~13
   21    27        SEND_VAL                                                 ''
   22    28        INIT_FCALL                                               'array_map'
         29        SEND_VAL                                                 'strtolower'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                         $14     
         32        SEND_VAR                                                 $14
   19    33        DO_ICALL                                         $15     
   22    34        SEND_VAR                                                 $15
   18    35        DO_ICALL                                         $16     
   22    36        SEND_VAR                                                 $16
   17    37        DO_ICALL                                         $17     
   22    38        SEND_VAR                                                 $17
   16    39        DO_ICALL                                         $18     
   22    40      > EXIT                                                     $18
   27    41*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.69 ms | 1017 KiB | 20 Q