3v4l.org

run code in 300+ 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:  23
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        INIT_FCALL                                               'preg_replace'
          5        SEND_VAL                                                 '%2F%5B%5Cx00-%5Cx1F%5D%2Fu'
          6        SEND_VAL                                                 '_'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !0, $4
    5    10        INIT_FCALL                                               'array_flip'
         11        INIT_FCALL                                               'get_defined_constants'
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $6      
         14        FETCH_DIM_R                                      ~7      $6, 'pcre'
         15        SEND_VAL                                                 ~7
         16        DO_ICALL                                         $8      
         17        INIT_FCALL                                               'preg_last_error'
         18        DO_ICALL                                         $9      
         19        FETCH_DIM_R                                      ~10     $8, $9
         20        CONCAT                                           ~11     'After%3A+', ~10
         21        ECHO                                                     ~11
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.18 ms | 940 KiB | 22 Q