3v4l.org

run code in 500+ 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 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 61) Position 1 = -2
filename:       /in/PNKP7
function name:  (null)
number of ops:  43
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        FETCH_IS                                             ~4      '_GET'
          5        FETCH_DIM_IS                                         ~5      ~4, 'postname'
          6        COALESCE                                             ~6      ~5
          7        QM_ASSIGN                                            ~6      ''
          8        FRAMELESS_ICALL_2                preg_match          ~7      '%7E%5E%5BA-Z%5D%24%7E', ~6
          9        BOOL_NOT                                             ~8      ~7
         10      > JMPZ                                                         ~8, ->14
   12    11    > > INIT_FCALL                                                   'exit'
         12*       SEND_VAL                                                     'Stop+trying+to+hack+my+scripts'
         13*       DO_ICALL                                                     
   27    14    > > INIT_FCALL                                                   'exit'
   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              ~10     '_GET'
         21*       FETCH_DIM_R                                          ~11     ~10, 'postname'
         22*       SEND_VAL                                                     ~11
         23*       DO_ICALL                                             $12     
         24*       CONCAT                                               ~13     '%7E%5E', $12
         25*       CONCAT                                               ~14     ~13, '%5B%5E_%5D%2A%5CK_.%2A%7E'
         26*       SEND_VAL                                                     ~14
   21    27*       SEND_VAL                                                     ''
   22    28*       INIT_FCALL                                                   'array_map'
         29*       SEND_VAL                                                     'strtolower'
         30*       SEND_VAR                                                     !0
         31*       DO_ICALL                                             $15     
         32*       SEND_VAR                                                     $15
   19    33*       DO_ICALL                                             $16     
   22    34*       SEND_VAR                                                     $16
   18    35*       DO_ICALL                                             $17     
   22    36*       SEND_VAR                                                     $17
   17    37*       DO_ICALL                                             $18     
   22    38*       SEND_VAR                                                     $18
   16    39*       DO_ICALL                                             $19     
   22    40*       SEND_VAR                                                     $19
   27    41*       DO_ICALL                                                     
         42*     > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
213.86 ms | 2144 KiB | 20 Q