3v4l.org

run code in 300+ PHP versions simultaneously
<?php $firstName='kéké'; $lastName='kéké'; $firstName = mb_strtolower($firstName, 'UTF-8'); $firstName = str_replace( array( 'à', 'â', 'ä', 'á', 'ã', 'å', 'î', 'ï', 'ì', 'í', 'ô', 'ö', 'ò', 'ó', 'õ', 'ø', 'ù', 'û', 'ü', 'ú', 'é', 'è', 'ê', 'ë', 'ç', 'ÿ', 'ñ', ), array( 'a', 'a', 'a', 'a', 'a', 'a', 'i', 'i', 'i', 'i', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'e', 'e', 'e', 'e', 'c', 'y', 'n', ), $firstName ); $lastName = mb_strtolower($lastName, 'UTF-8'); $lastName = str_replace( array( 'à', 'â', 'ä', 'á', 'ã', 'å', 'î', 'ï', 'ì', 'í', 'ô', 'ö', 'ò', 'ó', 'õ', 'ø', 'ù', 'û', 'ü', 'ú', 'é', 'è', 'ê', 'ë', 'ç', 'ÿ', 'ñ', ), array( 'a', 'a', 'a', 'a', 'a', 'a', 'i', 'i', 'i', 'i', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'e', 'e', 'e', 'e', 'c', 'y', 'n', ), $lastName ); $username = strtolower( substr( preg_replace('/\s/', '', $firstName[0].$lastName), 0, 8 ) ); echo $username;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kp1XH
function name:  (null)
number of ops:  42
compiled vars:  !0 = $firstName, !1 = $lastName, !2 = $username
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'k%C3%A9k%C3%A9'
    4     1        ASSIGN                                                   !1, 'k%C3%A9k%C3%A9'
    6     2        INIT_FCALL                                               'mb_strtolower'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'UTF-8'
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !0, $5
    7     7        INIT_FCALL                                               'str_replace'
    9     8        SEND_VAL                                                 <array>
   17     9        SEND_VAL                                                 <array>
   24    10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $7      
    7    12        ASSIGN                                                   !0, $7
   27    13        INIT_FCALL                                               'mb_strtolower'
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 'UTF-8'
         16        DO_ICALL                                         $9      
         17        ASSIGN                                                   !1, $9
   28    18        INIT_FCALL                                               'str_replace'
   30    19        SEND_VAL                                                 <array>
   38    20        SEND_VAL                                                 <array>
   45    21        SEND_VAR                                                 !1
         22        DO_ICALL                                         $11     
   28    23        ASSIGN                                                   !1, $11
   50    24        INIT_FCALL                                               'strtolower'
   51    25        INIT_FCALL                                               'substr'
   52    26        INIT_FCALL                                               'preg_replace'
         27        SEND_VAL                                                 '%2F%5Cs%2F'
         28        SEND_VAL                                                 ''
         29        FETCH_DIM_R                                      ~13     !0, 0
         30        CONCAT                                           ~14     ~13, !1
         31        SEND_VAL                                                 ~14
         32        DO_ICALL                                         $15     
         33        SEND_VAR                                                 $15
   53    34        SEND_VAL                                                 0
         35        SEND_VAL                                                 8
         36        DO_ICALL                                         $16     
         37        SEND_VAR                                                 $16
         38        DO_ICALL                                         $17     
   50    39        ASSIGN                                                   !2, $17
   57    40        ECHO                                                     !2
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.53 ms | 1396 KiB | 23 Q