3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = 'aböd%&/-cd#Ä'; $value = str_replace(array('ä','ö','ü','Ä','Ö','Ü','ß'), array('ae','oe','ue','Ae','Oe','Ue','ss'), $value); echo strtolower(preg_replace(array('/-+/', '/^-/', '/-$/'), array('-', '', ''), preg_replace('/[^\da-zA-Z-]/', '-', $value)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8i83Y
function name:  (null)
number of ops:  22
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'ab%C3%B6d%25%26%2F-cd%23%C3%84'
    3     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 <array>
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    4     7        INIT_FCALL                                               'strtolower'
          8        INIT_FCALL                                               'preg_replace'
          9        SEND_VAL                                                 <array>
         10        SEND_VAL                                                 <array>
         11        INIT_FCALL                                               'preg_replace'
         12        SEND_VAL                                                 '%2F%5B%5E%5Cda-zA-Z-%5D%2F'
         13        SEND_VAL                                                 '-'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $4      
         16        SEND_VAR                                                 $4
         17        DO_ICALL                                         $5      
         18        SEND_VAR                                                 $5
         19        DO_ICALL                                         $6      
         20        ECHO                                                     $6
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.1 ms | 1395 KiB | 19 Q