3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _unicode_caseflip($matches) { return $matches[0][0] . chr(ord($matches[0][1]) ^ 32); } function drupal_strtolower($text, $multibyte_unicode) { if ($multibyte_unicode) { return mb_strtolower($text); } else { // Use C-locale for ASCII-only lowercase $text = strtolower($text); // Case flip Latin-1 accented letters $text = preg_replace_callback('/\xC3[\x80-\x96\x98-\x9E]/', '_unicode_caseflip', $text); return $text; } } $arr = []; $arr[] = drupal_strtolower(TRUE, TRUE); $arr[] = drupal_strtolower(TRUE, FALSE); $arr[] = drupal_strtolower(FALSE, TRUE); $arr[] = drupal_strtolower(FALSE, FALSE); $arr[] = (bool)drupal_strtolower(TRUE, TRUE); $arr[] = (bool)drupal_strtolower(TRUE, FALSE); $arr[] = (bool)drupal_strtolower(FALSE, TRUE); $arr[] = (bool)drupal_strtolower(FALSE, FALSE); var_export($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F9HsF
function name:  (null)
number of ops:  57
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ASSIGN                                                   !0, <array>
   21     1        INIT_FCALL                                               'drupal_strtolower'
          2        SEND_VAL                                                 <true>
          3        SEND_VAL                                                 <true>
          4        DO_FCALL                                      0  $3      
          5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  $3
   22     7        INIT_FCALL                                               'drupal_strtolower'
          8        SEND_VAL                                                 <true>
          9        SEND_VAL                                                 <false>
         10        DO_FCALL                                      0  $5      
         11        ASSIGN_DIM                                               !0
         12        OP_DATA                                                  $5
   23    13        INIT_FCALL                                               'drupal_strtolower'
         14        SEND_VAL                                                 <false>
         15        SEND_VAL                                                 <true>
         16        DO_FCALL                                      0  $7      
         17        ASSIGN_DIM                                               !0
         18        OP_DATA                                                  $7
   24    19        INIT_FCALL                                               'drupal_strtolower'
         20        SEND_VAL                                                 <false>
         21        SEND_VAL                                                 <false>
         22        DO_FCALL                                      0  $9      
         23        ASSIGN_DIM                                               !0
         24        OP_DATA                                                  $9
   25    25        INIT_FCALL                                               'drupal_strtolower'
         26        SEND_VAL                                                 <true>
         27        SEND_VAL                                                 <true>
         28        DO_FCALL                                      0  $11     
         29        BOOL                                             ~12     $11
         30        ASSIGN_DIM                                               !0
         31        OP_DATA                                                  ~12
   26    32        INIT_FCALL                                               'drupal_strtolower'
         33        SEND_VAL                                                 <true>
         34        SEND_VAL                                                 <false>
         35        DO_FCALL                                      0  $14     
         36        BOOL                                             ~15     $14
         37        ASSIGN_DIM                                               !0
         38        OP_DATA                                                  ~15
   27    39        INIT_FCALL                                               'drupal_strtolower'
         40        SEND_VAL                                                 <false>
         41        SEND_VAL                                                 <true>
         42        DO_FCALL                                      0  $17     
         43        BOOL                                             ~18     $17
         44        ASSIGN_DIM                                               !0
         45        OP_DATA                                                  ~18
   28    46        INIT_FCALL                                               'drupal_strtolower'
         47        SEND_VAL                                                 <false>
         48        SEND_VAL                                                 <false>
         49        DO_FCALL                                      0  $20     
         50        BOOL                                             ~21     $20
         51        ASSIGN_DIM                                               !0
         52        OP_DATA                                                  ~21
   29    53        INIT_FCALL                                               'var_export'
         54        SEND_VAR                                                 !0
         55        DO_ICALL                                                 
         56      > RETURN                                                   1

Function _unicode_caseflip:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F9HsF
function name:  _unicode_caseflip
number of ops:  15
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        FETCH_DIM_R                                      ~1      !0, 0
          2        FETCH_DIM_R                                      ~2      ~1, 0
          3        INIT_FCALL                                               'chr'
          4        INIT_FCALL                                               'ord'
          5        FETCH_DIM_R                                      ~3      !0, 0
          6        FETCH_DIM_R                                      ~4      ~3, 1
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                         $5      
          9        BW_XOR                                           ~6      $5, 32
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $7      
         12        CONCAT                                           ~8      ~2, $7
         13      > RETURN                                                   ~8
    5    14*     > RETURN                                                   null

End of function _unicode_caseflip

Function drupal_strtolower:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F9HsF
function name:  drupal_strtolower
number of ops:  20
compiled vars:  !0 = $text, !1 = $multibyte_unicode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2      > JMPZ                                                     !1, ->8
    9     3    >   INIT_FCALL                                               'mb_strtolower'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
          7*       JMP                                                      ->19
   13     8    >   INIT_FCALL                                               'strtolower'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $3      
         11        ASSIGN                                                   !0, $3
   15    12        INIT_FCALL                                               'preg_replace_callback'
         13        SEND_VAL                                                 '%2F%5CxC3%5B%5Cx80-%5Cx96%5Cx98-%5Cx9E%5D%2F'
         14        SEND_VAL                                                 '_unicode_caseflip'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $5      
         17        ASSIGN                                                   !0, $5
   16    18      > RETURN                                                   !0
   18    19*     > RETURN                                                   null

End of function drupal_strtolower

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.34 ms | 1411 KiB | 33 Q