3v4l.org

run code in 500+ PHP versions simultaneously
<?php $basename = "a\xFFnything"; print("Before: ".$basename.PHP_EOL); $basename = preg_replace('/[\x00-\x1F]/u', '_', $basename); print("After: ".array_flip(get_defined_constants(true)['pcre'])[preg_last_error()]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EfiFs
function name:  (null)
number of ops:  20
compiled vars:  !0 = $basename
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 'a%FFnything'
    3     1        CONCAT                                               ~2      'Before%3A+', !0
          2        CONCAT                                               ~3      ~2, '%0A'
          3        ECHO                                                         ~3
    4     4        FRAMELESS_ICALL_3                preg_replace        ~4      '%2F%5B%5Cx00-%5Cx1F%5D%2Fu', '_'
          5        OP_DATA                                                      !0
          6        ASSIGN                                                       !0, ~4
    5     7        INIT_FCALL                                                   'array_flip'
          8        INIT_FCALL                                                   'get_defined_constants'
          9        SEND_VAL                                                     <true>
         10        DO_ICALL                                             $6      
         11        FETCH_DIM_R                                          ~7      $6, 'pcre'
         12        SEND_VAL                                                     ~7
         13        DO_ICALL                                             $8      
         14        INIT_FCALL                                                   'preg_last_error'
         15        DO_ICALL                                             $9      
         16        FETCH_DIM_R                                          ~10     $8, $9
         17        CONCAT                                               ~11     'After%3A+', ~10
         18        ECHO                                                         ~11
         19      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
178.11 ms | 2314 KiB | 18 Q