3v4l.org

run code in 500+ PHP versions simultaneously
<?php function initiales($string) { return preg_replace('#\B\p{L}\p{M}*+|\s+#u', '', $string); } echo initiales("I've got 21 cats and 1 dog!") . PHP_EOL; echo initiales("Je suis arrivée le 17 septembre.");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CqRff
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                                   'initiales'
          1        SEND_VAL                                                     'I%27ve+got+21+cats+and+1+dog%21'
          2        DO_FCALL                                          0  $0      
          3        CONCAT                                               ~1      $0, '%0A'
          4        ECHO                                                         ~1
    8     5        INIT_FCALL                                                   'initiales'
          6        SEND_VAL                                                     'Je+suis+arriv%C3%A9e+le+17+septembre.'
          7        DO_FCALL                                          0  $2      
          8        ECHO                                                         $2
          9      > RETURN                                                       1

Function initiales:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CqRff
function name:  initiales
number of ops:  5
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        FRAMELESS_ICALL_3                preg_replace        ~1      '%23%5CB%5Cp%7BL%7D%5Cp%7BM%7D%2A%2B%7C%5Cs%2B%23u', ''
          2        OP_DATA                                                      !0
          3      > RETURN                                                       ~1
    5     4*     > RETURN                                                       null

End of function initiales

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
215.17 ms | 2074 KiB | 15 Q