3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Over-engineered solution to most capitalisation issues. * * Version 1.0 */ class str { /** * Words or abbreviations that should always be all uppercase */ const ALL_UPPERCASE = [ "UK", "VAT", ]; /** * Words or abbreviations that should always be all lowercase */ const ALL_LOWERCASE = [ "and", "as", "by", "in", "of", "or", "to", ]; /** * Honorifics that only contain vowels. * */ const CONSONANT_ONLY_HONORIFICS = [ # English "Mr", "Mrs", "Ms", "Dr", "Br", "Sr", "Fr", "Pr", "St", # Afrikaans "Mnr", ]; /** * Surname prefixes that should be lowercase, * unless not following another word (firstname). */ const SURNAME_PREFIXES = [ "de la", "de las", "van de", "van der", "vit de", "von", "van", "del", "der", ]; /** * Capitalises every (appropriate) word in a given string. * * @param string|null $string * * @return string|null */ public static function capitalise(?string $string): ?string { if(!$string){ return $string; } # Strip away multi-spaces $string = preg_replace("/\s{2,}/", " ", $string); # Ensure there is always a space after a comma $string = preg_replace("/,([^\s])/", ", $1", $string); # A word is anything separated by spaces or a dash $string = preg_replace_callback("/([^\s\-\.]+)/", function($matches){ # Make the word lowercase $word = mb_strtolower($matches[1]); # If the word needs to be all lowercase if(in_array($word, self::ALL_LOWERCASE)){ return strtolower($word); } # If the word needs to be all uppercase if(in_array(mb_strtoupper($word), self::ALL_UPPERCASE)){ return strtoupper($word); } # Create a version without diacritics $transliterator = \Transliterator::createFromRules(':: Any-Latin; :: Latin-ASCII; :: NFD; :: [:Nonspacing Mark:] Remove; :: Lower(); :: NFC;', \Transliterator::FORWARD); $ascii_word = $transliterator->transliterate($word); # If the word contains non-alpha characters (numbers, &, etc), with exceptions (comma, '), assume it's an abbreviation if(preg_match("/[^a-z,']/i", $ascii_word)){ return strtoupper($word); } # If the word doesn't contain any vowels, assume it's an abbreviation if(!preg_match("/[aeiouy]/i", $ascii_word)){ # Unless the word is an honorific if(!in_array(ucfirst($word), self::CONSONANT_ONLY_HONORIFICS)){ return strtoupper($word); } } # If the word contains two of the same vowel and is 3 characters or fewer, assume it's an abbreviation if(strlen($word) <= 3 && preg_match("/([aeiouy])\1/", $word)){ return strtoupper($word); } # Ensure O'Connor, L'Oreal, etc, are double capitalised, with exceptions (d') if(preg_match("/\b([a-z]')(\w+)\b/i", $word, $match)){ # Some prefixes (like d') are not capitalised if(in_array($match[1], ["d'"])){ return $match[1] . ucfirst($match[2]); } # Otherwise, everything is capitalised return strtoupper($match[1]) . ucfirst($match[2]); } # Otherwise, return the word with the first letter (only) capitalised return ucfirst($word); //The most common outcome }, $string); # Cater for the Mc prefix $pattern = "/(Mc)([b-df-hj-np-tv-z])/"; //Mc followed by a consonant $string = preg_replace_callback($pattern, function($matches){ return "Mc" . ucfirst($matches[2]); }, $string); # Cater for Roman numerals (need to be in all caps) $pattern = "/\b((?<![MDCLXVI])(?=[MDCLXVI])M{0,3}(?:C[MD]|D?C{0,3})(?:X[CL]|L?X{0,3})(?:I[XV]|V?I{0,3}))\b/i"; $string = preg_replace_callback($pattern, function($matches){ return strtoupper($matches[1]); }, $string); # Cater for surname prefixes (must be after the Roman numerals) $pattern = "/\b (".implode("|", self::SURNAME_PREFIXES).") \b/i"; //A surname prefix, bookended by words $string = preg_replace_callback($pattern, function($matches){ return strtolower(" {$matches[1]} "); }, $string); # Cater for ordinal numbers $pattern = "/\b(\d+(?:st|nd|rd|th))\b/i"; //A number suffixed with an ordinal $string = preg_replace_callback($pattern, function($matches){ return strtolower($matches[1]); }, $string); # And we're done return $string; } } $complicated_names = " DONALD MCDONALD SINEAD O'CONNOR JOHAN VAN ZYL OSCAR DE LA HOYA P.F. CHANG KFC ST. JOHN DR ZEUZ PROF. GREEN VAN DER BERG THE 3RD SÃO JOÃO DOS SANTOS KING HENRY VII KUJE'S HIGH,ROAD FLUG-HAFEN FLUGIG-O'DONNALD MARY O'CALLAHAN JOHN O'DONALD THE O'CALLAHAN-O'DONALD RESIDENCE 2ND NOVEMBER STREET The 15th king of scotland FCT MICHAEL VIVA GINA C.A. KOTOR DUTCH NAMES van der vaart van vollenhoven van 't zandt van het zand el hamdoie van der Rooi-van Velzen Zuidewijn - van rooien teggelen onder t boven guido op 't drooge friso van drooge Zuidewijn - van rooien teggelen onder t boven ZUID-HOLLAND 's hertogen-bosch De Rooi Van Zuidewijn van onder Van Der Wijk-Zeewuster de Vries-van der Leest Den Oudsten - van 't Veldt Hare Koninklijke Hoogheid Alexia Juliana Marcela Laurentien Prinses der Nederlanden, Prinses van Oranje-Nassau Hare Koninklijke Hoogheid Máxima, Prinses der Nederlanden, Prinses van Oranje-Nassau, Mevrouw van Amsberg van Lippe-Biesterfeld van Vollenhoven "; var_dump(str::capitalise($complicated_names));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SEdf7
function name:  (null)
number of ops:  8
compiled vars:  !0 = $complicated_names
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  171     0  E >   ASSIGN                                                   !0, '%0ADONALD+MCDONALD%0ASINEAD+O%27CONNOR%0AJOHAN+VAN+ZYL%0AOSCAR+DE+LA+HOYA%0AP.F.+CHANG%0AKFC%0AST.+JOHN%0ADR+ZEUZ%0APROF.+GREEN%0AVAN+DER+BERG+THE+3RD%0AS%C3%83O+JO%C3%83O+DOS+SANTOS%0AKING+HENRY+VII%0AKUJE%27S+HIGH%2CROAD%0AFLUG-HAFEN%0AFLUGIG-O%27DONNALD%0AMARY+O%27CALLAHAN%0AJOHN+O%27DONALD%0ATHE+O%27CALLAHAN-O%27DONALD+RESIDENCE%0A2ND+NOVEMBER+STREET%0AThe+15th+king+of+scotland%0AFCT%0AMICHAEL+VIVA%0AGINA+C.A.+KOTOR%0ADUTCH+NAMES%0Avan+der+vaart%0Avan+vollenhoven%0Avan+%27t+zandt%0Avan+het+zand%0Ael+hamdoie%0Avan+der+Rooi-van+Velzen%0AZuidewijn+-+van+rooien%0Ateggelen+onder+t+boven%0Aguido+op+%27t+drooge%0Afriso+van+drooge%0AZuidewijn+-+van+rooien%0Ateggelen+onder+t+boven%0AZUID-HOLLAND%0A%27s+hertogen-bosch%0ADe+Rooi+Van+Zuidewijn%0Avan+onder%0AVan+Der+Wijk-Zeewuster%0Ade+Vries-van+der+Leest%0ADen+Oudsten+-+van+%27t+Veldt%0AHare+Koninklijke+Hoogheid+Alexia+Juliana+Marcela+Laurentien+Prinses+der+Nederlanden%2C+Prinses+van+Oranje-Nassau%0AHare+Koninklijke+Hoogheid+M%C3%A1xima%2C+Prinses+der+Nederlanden%2C+Prinses+van+Oranje-Nassau%2C+Mevrouw+van+Amsberg%0Avan+Lippe-Biesterfeld+van+Vollenhoven%0A'
  220     1        INIT_FCALL                                               'var_dump'
          2        INIT_STATIC_METHOD_CALL                                  'str', 'capitalise'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FSEdf7%3A86%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 29
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 48
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 48
2 jumps found. (Code = 43) Position 1 = 54, Position 2 = 68
Branch analysis from position: 54
2 jumps found. (Code = 43) Position 1 = 64, Position 2 = 68
Branch analysis from position: 64
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 68
2 jumps found. (Code = 46) Position 1 = 71, Position 2 = 76
Branch analysis from position: 71
2 jumps found. (Code = 43) Position 1 = 77, Position 2 = 81
Branch analysis from position: 77
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 81
2 jumps found. (Code = 43) Position 1 = 87, Position 2 = 107
Branch analysis from position: 87
2 jumps found. (Code = 43) Position 1 = 90, Position 2 = 97
Branch analysis from position: 90
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 97
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 107
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 76
Branch analysis from position: 68
filename:       /in/SEdf7
function name:  {closure}
number of ops:  112
compiled vars:  !0 = $matches, !1 = $word, !2 = $transliterator, !3 = $ascii_word, !4 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   86     0  E >   RECV                                             !0      
   88     1        INIT_FCALL                                               'mb_strtolower'
          2        FETCH_DIM_R                                      ~5      !0, 1
          3        SEND_VAL                                                 ~5
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
   91     6        INIT_FCALL                                               'in_array'
          7        SEND_VAR                                                 !1
          8        FETCH_CLASS_CONSTANT                             ~8      'ALL_LOWERCASE'
          9        SEND_VAL                                                 ~8
         10        DO_ICALL                                         $9      
         11      > JMPZ                                                     $9, ->16
   92    12    >   INIT_FCALL                                               'strtolower'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $10     
         15      > RETURN                                                   $10
   96    16    >   INIT_FCALL                                               'in_array'
         17        INIT_FCALL                                               'mb_strtoupper'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $11     
         20        SEND_VAR                                                 $11
         21        FETCH_CLASS_CONSTANT                             ~12     'ALL_UPPERCASE'
         22        SEND_VAL                                                 ~12
         23        DO_ICALL                                         $13     
         24      > JMPZ                                                     $13, ->29
   97    25    >   INIT_FCALL                                               'strtoupper'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $14     
         28      > RETURN                                                   $14
  101    29    >   INIT_STATIC_METHOD_CALL                                  'Transliterator', 'createFromRules'
         30        SEND_VAL_EX                                              '%3A%3A+Any-Latin%3B+%3A%3A+Latin-ASCII%3B+%3A%3A+NFD%3B+%3A%3A+%5B%3ANonspacing+Mark%3A%5D+Remove%3B+%3A%3A+Lower%28%29%3B+%3A%3A+NFC%3B'
         31        FETCH_CLASS_CONSTANT                             ~15     'Transliterator', 'FORWARD'
         32        SEND_VAL_EX                                              ~15
         33        DO_FCALL                                      0  $16     
         34        ASSIGN                                                   !2, $16
  102    35        INIT_METHOD_CALL                                         !2, 'transliterate'
         36        SEND_VAR_EX                                              !1
         37        DO_FCALL                                      0  $18     
         38        ASSIGN                                                   !3, $18
  106    39        INIT_FCALL                                               'preg_match'
         40        SEND_VAL                                                 '%2F%5B%5Ea-z%2C%27%5D%2Fi'
         41        SEND_VAR                                                 !3
         42        DO_ICALL                                         $20     
         43      > JMPZ                                                     $20, ->48
  107    44    >   INIT_FCALL                                               'strtoupper'
         45        SEND_VAR                                                 !1
         46        DO_ICALL                                         $21     
         47      > RETURN                                                   $21
  111    48    >   INIT_FCALL                                               'preg_match'
         49        SEND_VAL                                                 '%2F%5Baeiouy%5D%2Fi'
         50        SEND_VAR                                                 !3
         51        DO_ICALL                                         $22     
         52        BOOL_NOT                                         ~23     $22
         53      > JMPZ                                                     ~23, ->68
  113    54    >   INIT_FCALL                                               'in_array'
         55        INIT_FCALL                                               'ucfirst'
         56        SEND_VAR                                                 !1
         57        DO_ICALL                                         $24     
         58        SEND_VAR                                                 $24
         59        FETCH_CLASS_CONSTANT                             ~25     'CONSONANT_ONLY_HONORIFICS'
         60        SEND_VAL                                                 ~25
         61        DO_ICALL                                         $26     
         62        BOOL_NOT                                         ~27     $26
         63      > JMPZ                                                     ~27, ->68
  114    64    >   INIT_FCALL                                               'strtoupper'
         65        SEND_VAR                                                 !1
         66        DO_ICALL                                         $28     
         67      > RETURN                                                   $28
  119    68    >   STRLEN                                           ~29     !1
         69        IS_SMALLER_OR_EQUAL                              ~30     ~29, 3
         70      > JMPZ_EX                                          ~30     ~30, ->76
         71    >   INIT_FCALL                                               'preg_match'
         72        SEND_VAL                                                 '%2F%28%5Baeiouy%5D%29%01%2F'
         73        SEND_VAR                                                 !1
         74        DO_ICALL                                         $31     
         75        BOOL                                             ~30     $31
         76    > > JMPZ                                                     ~30, ->81
  120    77    >   INIT_FCALL                                               'strtoupper'
         78        SEND_VAR                                                 !1
         79        DO_ICALL                                         $32     
         80      > RETURN                                                   $32
  124    81    >   INIT_FCALL                                               'preg_match'
         82        SEND_VAL                                                 '%2F%5Cb%28%5Ba-z%5D%27%29%28%5Cw%2B%29%5Cb%2Fi'
         83        SEND_VAR                                                 !1
         84        SEND_REF                                                 !4
         85        DO_ICALL                                         $33     
         86      > JMPZ                                                     $33, ->107
  126    87    >   FETCH_DIM_R                                      ~34     !4, 1
         88        IN_ARRAY                                                 ~34, <array>
         89      > JMPZ                                                     ~35, ->97
  127    90    >   FETCH_DIM_R                                      ~36     !4, 1
         91        INIT_FCALL                                               'ucfirst'
         92        FETCH_DIM_R                                      ~37     !4, 2
         93        SEND_VAL                                                 ~37
         94        DO_ICALL                                         $38     
         95        CONCAT                                           ~39     ~36, $38
         96      > RETURN                                                   ~39
  131    97    >   INIT_FCALL                                               'strtoupper'
         98        FETCH_DIM_R                                      ~40     !4, 1
         99        SEND_VAL                                                 ~40
        100        DO_ICALL                                         $41     
        101        INIT_FCALL                                               'ucfirst'
        102        FETCH_DIM_R                                      ~42     !4, 2
        103        SEND_VAL                                                 ~42
        104        DO_ICALL                                         $43     
        105        CONCAT                                           ~44     $41, $43
        106      > RETURN                                                   ~44
  135   107    >   INIT_FCALL                                               'ucfirst'
        108        SEND_VAR                                                 !1
        109        DO_ICALL                                         $45     
        110      > RETURN                                                   $45
  137   111*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSEdf7%3A86%240

Function %00%7Bclosure%7D%2Fin%2FSEdf7%3A142%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SEdf7
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  142     0  E >   RECV                                             !0      
  143     1        INIT_FCALL                                               'ucfirst'
          2        FETCH_DIM_R                                      ~1      !0, 2
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5        CONCAT                                           ~3      'Mc', $2
          6      > RETURN                                                   ~3
  144     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSEdf7%3A142%241

Function %00%7Bclosure%7D%2Fin%2FSEdf7%3A148%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SEdf7
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  148     0  E >   RECV                                             !0      
  149     1        INIT_FCALL                                               'strtoupper'
          2        FETCH_DIM_R                                      ~1      !0, 1
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5      > RETURN                                                   $2
  150     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSEdf7%3A148%242

Function %00%7Bclosure%7D%2Fin%2FSEdf7%3A155%243:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SEdf7
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  155     0  E >   RECV                                             !0      
  156     1        INIT_FCALL                                               'strtolower'
          2        ROPE_INIT                                     3  ~3      '+'
          3        FETCH_DIM_R                                      ~1      !0, 1
          4        ROPE_ADD                                      1  ~3      ~3, ~1
          5        ROPE_END                                      2  ~2      ~3, '+'
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                         $5      
          8      > RETURN                                                   $5
  157     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSEdf7%3A155%243

Function %00%7Bclosure%7D%2Fin%2FSEdf7%3A162%244:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SEdf7
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  162     0  E >   RECV                                             !0      
  163     1        INIT_FCALL                                               'strtolower'
          2        FETCH_DIM_R                                      ~1      !0, 1
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5      > RETURN                                                   $2
  164     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSEdf7%3A162%244

Class str:
Function capitalise:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SEdf7
function name:  capitalise
number of ops:  66
compiled vars:  !0 = $string, !1 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   73     0  E >   RECV                                             !0      
   75     1        BOOL_NOT                                         ~2      !0
          2      > JMPZ                                                     ~2, ->5
   76     3    >   VERIFY_RETURN_TYPE                                       !0
          4      > RETURN                                                   !0
   80     5    >   INIT_FCALL                                               'preg_replace'
          6        SEND_VAL                                                 '%2F%5Cs%7B2%2C%7D%2F'
          7        SEND_VAL                                                 '+'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $3      
         10        ASSIGN                                                   !0, $3
   83    11        INIT_FCALL                                               'preg_replace'
         12        SEND_VAL                                                 '%2F%2C%28%5B%5E%5Cs%5D%29%2F'
         13        SEND_VAL                                                 '%2C+%241'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $5      
         16        ASSIGN                                                   !0, $5
   86    17        INIT_FCALL                                               'preg_replace_callback'
         18        SEND_VAL                                                 '%2F%28%5B%5E%5Cs%5C-%5C.%5D%2B%29%2F'
         19        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSEdf7%3A86%240'
  137    20        SEND_VAL                                                 ~7
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $8      
   86    23        ASSIGN                                                   !0, $8
  140    24        ASSIGN                                                   !1, '%2F%28Mc%29%28%5Bb-df-hj-np-tv-z%5D%29%2F'
  142    25        INIT_FCALL                                               'preg_replace_callback'
         26        SEND_VAR                                                 !1
         27        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSEdf7%3A142%241'
  144    28        SEND_VAL                                                 ~11
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $12     
  142    31        ASSIGN                                                   !0, $12
  147    32        ASSIGN                                                   !1, '%2F%5Cb%28%28%3F%3C%21%5BMDCLXVI%5D%29%28%3F%3D%5BMDCLXVI%5D%29M%7B0%2C3%7D%28%3F%3AC%5BMD%5D%7CD%3FC%7B0%2C3%7D%29%28%3F%3AX%5BCL%5D%7CL%3FX%7B0%2C3%7D%29%28%3F%3AI%5BXV%5D%7CV%3FI%7B0%2C3%7D%29%29%5Cb%2Fi'
  148    33        INIT_FCALL                                               'preg_replace_callback'
         34        SEND_VAR                                                 !1
         35        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSEdf7%3A148%242'
  150    36        SEND_VAL                                                 ~15
         37        SEND_VAR                                                 !0
         38        DO_ICALL                                         $16     
  148    39        ASSIGN                                                   !0, $16
  153    40        INIT_FCALL                                               'implode'
         41        SEND_VAL                                                 '%7C'
         42        SEND_VAL                                                 <array>
         43        DO_ICALL                                         $18     
         44        CONCAT                                           ~19     '%2F%5Cb+%28', $18
         45        CONCAT                                           ~20     ~19, '%29+%5Cb%2Fi'
         46        ASSIGN                                                   !1, ~20
  155    47        INIT_FCALL                                               'preg_replace_callback'
         48        SEND_VAR                                                 !1
         49        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSEdf7%3A155%243'
  157    50        SEND_VAL                                                 ~22
         51        SEND_VAR                                                 !0
         52        DO_ICALL                                         $23     
  155    53        ASSIGN                                                   !0, $23
  160    54        ASSIGN                                                   !1, '%2F%5Cb%28%5Cd%2B%28%3F%3Ast%7Cnd%7Crd%7Cth%29%29%5Cb%2Fi'
  162    55        INIT_FCALL                                               'preg_replace_callback'
         56        SEND_VAR                                                 !1
         57        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSEdf7%3A162%244'
  164    58        SEND_VAL                                                 ~26
         59        SEND_VAR                                                 !0
         60        DO_ICALL                                         $27     
  162    61        ASSIGN                                                   !0, $27
  167    62        VERIFY_RETURN_TYPE                                       !0
         63      > RETURN                                                   !0
  168    64*       VERIFY_RETURN_TYPE                                       
         65*     > RETURN                                                   null

End of function capitalise

End of class str.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.21 ms | 1425 KiB | 35 Q