3v4l.org

run code in 300+ PHP versions simultaneously
<?php $withAcronyms = 'newNASAModule'; var_export(preg_split('~[^A-Z]+\K|(?=[A-Z][^A-Z]+)~', $withAcronyms, 0, PREG_SPLIT_NO_EMPTY)); echo "\n---\n"; var_export(preg_match_all('~[A-Z]?[^A-Z]+|[A-Z]+(?=[A-Z][^A-Z]|$)~', $withAcronyms, $out) ? $out[0] : []);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LehUd
function name:  (null)
number of ops:  25
compiled vars:  !0 = $withAcronyms, !1 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'newNASAModule'
    3     1        INIT_FCALL                                               'var_export'
          2        INIT_FCALL                                               'preg_split'
          3        SEND_VAL                                                 '%7E%5B%5EA-Z%5D%2B%5CK%7C%28%3F%3D%5BA-Z%5D%5B%5EA-Z%5D%2B%29%7E'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 1
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
    4    10        ECHO                                                     '%0A---%0A'
    5    11        INIT_FCALL                                               'var_export'
         12        INIT_FCALL                                               'preg_match_all'
         13        SEND_VAL                                                 '%7E%5BA-Z%5D%3F%5B%5EA-Z%5D%2B%7C%5BA-Z%5D%2B%28%3F%3D%5BA-Z%5D%5B%5EA-Z%5D%7C%24%29%7E'
         14        SEND_VAR                                                 !0
         15        SEND_REF                                                 !1
         16        DO_ICALL                                         $5      
         17      > JMPZ                                                     $5, ->21
         18    >   FETCH_DIM_R                                      ~6      !1, 0
         19        QM_ASSIGN                                        ~7      ~6
         20      > JMP                                                      ->22
         21    >   QM_ASSIGN                                        ~7      <array>
         22    >   SEND_VAL                                                 ~7
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.77 ms | 1000 KiB | 16 Q