3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Nečum spaces to dash and LowerCase with PHP'; $separator = '-'; $str_replace = str_replace(' ', $separator, strtolower($str)); $wordwrap = wordwrap(strtolower($str), 1, $separator, 0); $test = iconv('UTF-8','ASCII//TRANSLIT',$wordwrap); echo 'Original: ' . "\t" . $str . "\n"; echo 'str_replace: ' . "\t" . $str_replace . "\n"; echo 'wordwrap: ' . "\t" . $wordwrap . "\n"; echo 'test: ' . "\t" . $test . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WFbdc
function name:  (null)
number of ops:  40
compiled vars:  !0 = $str, !1 = $separator, !2 = $str_replace, !3 = $wordwrap, !4 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Ne%C4%8Dum+spaces+to+dash+and+LowerCase+with+PHP'
    4     1        ASSIGN                                                   !1, '-'
    6     2        INIT_FCALL                                               'str_replace'
          3        SEND_VAL                                                 '+'
          4        SEND_VAR                                                 !1
          5        INIT_FCALL                                               'strtolower'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $7      
          8        SEND_VAR                                                 $7
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
    7    11        INIT_FCALL                                               'wordwrap'
         12        INIT_FCALL                                               'strtolower'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $10     
         15        SEND_VAR                                                 $10
         16        SEND_VAL                                                 1
         17        SEND_VAR                                                 !1
         18        SEND_VAL                                                 0
         19        DO_ICALL                                         $11     
         20        ASSIGN                                                   !3, $11
    8    21        INIT_FCALL_BY_NAME                                       'iconv'
         22        SEND_VAL_EX                                              'UTF-8'
         23        SEND_VAL_EX                                              'ASCII%2F%2FTRANSLIT'
         24        SEND_VAR_EX                                              !3
         25        DO_FCALL                                      0  $13     
         26        ASSIGN                                                   !4, $13
   10    27        CONCAT                                           ~15     'Original%3A+%09', !0
         28        CONCAT                                           ~16     ~15, '%0A'
         29        ECHO                                                     ~16
   12    30        CONCAT                                           ~17     'str_replace%3A+%09', !2
         31        CONCAT                                           ~18     ~17, '%0A'
         32        ECHO                                                     ~18
   14    33        CONCAT                                           ~19     'wordwrap%3A+%09', !3
         34        CONCAT                                           ~20     ~19, '%0A'
         35        ECHO                                                     ~20
   16    36        CONCAT                                           ~21     'test%3A+%09', !4
         37        CONCAT                                           ~22     ~21, '%0A'
         38        ECHO                                                     ~22
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.17 ms | 1388 KiB | 22 Q