3v4l.org

run code in 300+ PHP versions simultaneously
<?php function create_path($hash) { return preg_replace('#\S#u', '/$0', strtolower(substr($hash, 0, 5))) .'/'; } echo 'path: '.create_path('ahqñree');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c3H1H
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'create_path'
          1        SEND_VAL                                                 'ahq%C3%B1ree'
          2        DO_FCALL                                      0  $0      
          3        CONCAT                                           ~1      'path%3A+', $0
          4        ECHO                                                     ~1
          5      > RETURN                                                   1

Function create_path:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c3H1H
function name:  create_path
number of ops:  17
compiled vars:  !0 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%23%5CS%23u'
          3        SEND_VAL                                                 '%2F%240'
          4        INIT_FCALL                                               'strtolower'
          5        INIT_FCALL                                               'substr'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 0
          8        SEND_VAL                                                 5
          9        DO_ICALL                                         $1      
         10        SEND_VAR                                                 $1
         11        DO_ICALL                                         $2      
         12        SEND_VAR                                                 $2
         13        DO_ICALL                                         $3      
         14        CONCAT                                           ~4      $3, '%2F'
         15      > RETURN                                                   ~4
    6    16*     > RETURN                                                   null

End of function create_path

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.07 ms | 1004 KiB | 17 Q