3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = array( 'this is a string', 'this is $ a string', 'this is 12 string', 'this is $12.99 string', ); foreach ($strings as $string) { var_dump(strtolower(preg_replace('#[^a-z0-9]#', '', preg_replace('#[\s+]#', '-', $$string)))); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 21
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/hqMoi
function name:  (null)
number of ops:  23
compiled vars:  !0 = $strings, !1 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1      > FE_RESET_R                                       $3      !0, ->21
          2    > > FE_FETCH_R                                               $3, !1, ->21
    9     3    >   INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'strtolower'
          5        INIT_FCALL                                               'preg_replace'
          6        SEND_VAL                                                 '%23%5B%5Ea-z0-9%5D%23'
          7        SEND_VAL                                                 ''
          8        INIT_FCALL                                               'preg_replace'
          9        SEND_VAL                                                 '%23%5B%5Cs%2B%5D%23'
         10        SEND_VAL                                                 '-'
         11        FETCH_R                      local               ~4      !1
         12        SEND_VAL                                                 ~4
         13        DO_ICALL                                         $5      
         14        SEND_VAR                                                 $5
         15        DO_ICALL                                         $6      
         16        SEND_VAR                                                 $6
         17        DO_ICALL                                         $7      
         18        SEND_VAR                                                 $7
         19        DO_ICALL                                                 
    8    20      > JMP                                                      ->2
         21    >   FE_FREE                                                  $3
   10    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.51 ms | 1395 KiB | 19 Q