3v4l.org

run code in 300+ PHP versions simultaneously
<?php $charmap = [ 'NUL' => "\x00", // NULL (U+0000) 'SOH' => "\x01", // START OF HEADING (U+0001) 'STX' => "\x02", // START OF TEXT (U+0002) 'ETX' => "\x03", // END OF TEXT (U+0003) 'EOT' => "\x04", // END OF TRANSMISSION (U+0004) 'ENQ' => "\x05", // ENQUIRY (U+0005) 'HT' => "\x09", // HORIZONTAL TAB (U+0009) 'LF' => "\x0a", // LINE FEED (U+000A) 'VT' => "\x0b", // VERTICAL TAB (U+000B) 'CR' => "\x0d", // CARRIAGE RETURN (U+000D) 'ETB' => "\x17", // END OF TRANSMISSION BLOCK (U+0017) 'SP' => "\x20", // SPACE (U+0020) 'ZWS' => "\xe2\x80\x8b", // ZERO WIDTH SPACE (U+200B) 'MSBS' => "\xf0\x9d\x85\xb7", // MUSICAL SYMBOL BEGIN SLUR (U+1D177) 'MSBP' => "\xf0\x9d\x85\xb9", // MUSICAL SYMBOL BEGIN PHRASE (U+1D179) ]; foreach ($charmap as $k => $v) { define($k, $v); } $strings = [ 'user6003859' => LF . LF . LF . 'a' . SP . 'b'. SP . SP . 'c' . SP . SP . SP . LF . SP . 'd' . SP . SP . SP . SP . 'e' . LF . MSBS . 'f' . MSBS . 'g' . MSBS . MSBS . 'h' . MSBS . MSBS . ZWS . ZWS . MSBP . MSBP . 'i' . MSBP . SP . MSBP . SP . 'j' . LF . LF . LF . LF . LF . 'k' . SP . 'l' . SP . 'm' . SP . 'n' . SP . SP . SP . LF . MSBP . 'o' . MSBP . MSBP . 'p' . LF . LF . LF . LF, 'mickmackusa' => NUL . LF . LF . SOH . LF . CR . LF . VT . ETB . 'a' . SP . 'ab' . CR . LF . HT . HT . CR . CR . LF . 'cà' . SOH . 'ê߀' . NUL . NUL . 'abcbc'. SP . SP . SP . 'd' . LF . LF . HT . CR . LF . ENQ . SP . SP . SP . 'e' . STX . LF . ETX . LF . EOT . LF ]; function display($str, $charmap) { $converter = array_map(function ($i) { return '{'.$i.'}'; }, array_flip($charmap)); $handle = fopen("data:text/plain,$str", 'r'); while ( false !== $line = fgets($handle) ) { echo strtr($line, $converter), PHP_EOL; } fclose($handle); } class Replacements { const FUNC = 0; const REGEX = 1; protected $patterns; protected $replacements; protected $func; protected $typeRegex; public function __construct($arg) { if ( is_array($arg) ) { $this->type = self::REGEX; $this->patterns = []; $this->replacements = []; $this->addPatterns($arg); } elseif ( is_callable($arg) ) { $this->type = self::FUNC; $this->addFunction($arg); } else throw new Exception('invalid argument type'); } protected function addPatterns($replacements) { foreach($replacements as $pattern => $replacement) { $this->patterns[] = $pattern; $this->replacements[] = $replacement; } } protected function addFunction($func) { $this->func = $func; } public function execute($str) { if ( $this->type === self::REGEX ) return preg_replace($this->patterns, $this->replacements, $str); return call_user_func_array($this->func, [&$str]); } }; $original = new Replacements([ '~\R~u' => "\n", '/(?:^((\pZ)+|((?!\n)\pC)+)(?1)*)|((?1)$)|(?:((?2)+|(?3)+)(?=(?2)|(?3)))/um' => '', '/(\pZ+)|((?!\n)\pC)/u' => ' ', '/(^\n+)|(\n+$)|(\n(?=\n{2}))/u' => '' ]); $simple = new Replacements([ '~\A[\pZ\pC]+|[\pZ\pC]+\z~u' => '', # trim the string '~\R~u' => "\n", # normalize newlines '~\pZ+|[^\n\PC]+~u' => ' ', # replace Z and C with space '~^ +| +$| \K +~m' => '', # trim lines, delete consecutive spaces '~\n\n\K\n+~' => '' # removes more than 2 consecutives newlines ]); $optimized = new Replacements([ '~\r\n?|\x0b|\f|\xe2\x80[\xa8\xa9]~S' => "\n", '~ [^\pZ\pC]+ \K \pZ* (?:[^\PC\n]+\pZ*)* (?: (\n) \pZ*+ (?:[^\PC\n]+\pZ*)*+ (?: (\n) [\pZ\pC]* )?+ (?!\z) | [\pZ\pC]+ )? | [\pZ\pC]+ ~Aux' => '$1$2 ', '~ (?:$|(?<=^ ))~m' => '' ]); $func = new Replacements(function (&$str) { $parts = preg_split('~^[\pC\pZ]+|[\pC\pZ]+$|\R(?:[\pC\pZ]*?(\R)[\pC\pZ]*)?~u', $str, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); return implode("\n", array_map(function($i) { return trim(preg_replace('~[\pC\pZ]+~u', ' ', $i));}, $parts)); }); // tests $tests = ['original' => $original, 'simple' => $simple, 'function' => $func, 'optimized' => $optimized]; $str = $strings['user6003859'] . $strings['mickmackusa']; $str = str_repeat($str, 10); $res = []; foreach ($tests as $k=>&$test) { $res[$k] = $test->execute($str); } echo 'same result: ', var_dump(count(array_unique($res)) === 1); $names = array_keys($tests); $times = array_fill_keys($names, 0); define('REPETITIONS', 100); for ($i=0; $i < REPETITIONS; $i++) { shuffle($names); foreach ($names as $name) { $start = microtime(true); $tests[$name]->execute($str); $stop = microtime(true); $times[$name] += $stop - $start; } } foreach($times as $k=>$v) { printf("%-12s: %.2es\n", $k, $v/REPETITIONS); } // display($res['optimized'], $charmap);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
2 jumps found. (Code = 125) Position 1 = 241, Position 2 = 249
Branch analysis from position: 241
2 jumps found. (Code = 126) Position 1 = 242, Position 2 = 249
Branch analysis from position: 242
1 jumps found. (Code = 42) Position 1 = 241
Branch analysis from position: 241
Branch analysis from position: 249
1 jumps found. (Code = 42) Position 1 = 298
Branch analysis from position: 298
2 jumps found. (Code = 44) Position 1 = 301, Position 2 = 275
Branch analysis from position: 301
2 jumps found. (Code = 77) Position 1 = 302, Position 2 = 312
Branch analysis from position: 302
2 jumps found. (Code = 78) Position 1 = 303, Position 2 = 312
Branch analysis from position: 303
1 jumps found. (Code = 42) Position 1 = 302
Branch analysis from position: 302
Branch analysis from position: 312
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 312
Branch analysis from position: 275
2 jumps found. (Code = 77) Position 1 = 279, Position 2 = 296
Branch analysis from position: 279
2 jumps found. (Code = 78) Position 1 = 280, Position 2 = 296
Branch analysis from position: 280
1 jumps found. (Code = 42) Position 1 = 279
Branch analysis from position: 279
Branch analysis from position: 296
2 jumps found. (Code = 44) Position 1 = 301, Position 2 = 275
Branch analysis from position: 301
Branch analysis from position: 275
Branch analysis from position: 296
Branch analysis from position: 249
Branch analysis from position: 9
filename:       /in/iCeHp
function name:  (null)
number of ops:  314
compiled vars:  !0 = $charmap, !1 = $v, !2 = $k, !3 = $strings, !4 = $original, !5 = $simple, !6 = $optimized, !7 = $func, !8 = $tests, !9 = $str, !10 = $res, !11 = $test, !12 = $names, !13 = $times, !14 = $i, !15 = $name, !16 = $start, !17 = $stop
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   21     1      > FE_RESET_R                                       $19     !0, ->9
          2    > > FE_FETCH_R                                       ~20     $19, !1, ->9
          3    >   ASSIGN                                                   !2, ~20
   22     4        INIT_FCALL                                               'define'
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   21     8      > JMP                                                      ->2
          9    >   FE_FREE                                                  $19
   27    10        FETCH_CONSTANT                                   ~23     'LF'
   28    11        FETCH_CONSTANT                                   ~24     'LF'
         12        CONCAT                                           ~25     ~23, ~24
   29    13        FETCH_CONSTANT                                   ~26     'LF'
         14        CONCAT                                           ~27     ~25, ~26
   30    15        CONCAT                                           ~28     ~27, 'a'
         16        FETCH_CONSTANT                                   ~29     'SP'
         17        CONCAT                                           ~30     ~28, ~29
         18        CONCAT                                           ~31     ~30, 'b'
         19        FETCH_CONSTANT                                   ~32     'SP'
         20        CONCAT                                           ~33     ~31, ~32
         21        FETCH_CONSTANT                                   ~34     'SP'
         22        CONCAT                                           ~35     ~33, ~34
         23        CONCAT                                           ~36     ~35, 'c'
         24        FETCH_CONSTANT                                   ~37     'SP'
         25        CONCAT                                           ~38     ~36, ~37
         26        FETCH_CONSTANT                                   ~39     'SP'
         27        CONCAT                                           ~40     ~38, ~39
         28        FETCH_CONSTANT                                   ~41     'SP'
         29        CONCAT                                           ~42     ~40, ~41
         30        FETCH_CONSTANT                                   ~43     'LF'
         31        CONCAT                                           ~44     ~42, ~43
   31    32        FETCH_CONSTANT                                   ~45     'SP'
         33        CONCAT                                           ~46     ~44, ~45
         34        CONCAT                                           ~47     ~46, 'd'
         35        FETCH_CONSTANT                                   ~48     'SP'
         36        CONCAT                                           ~49     ~47, ~48
         37        FETCH_CONSTANT                                   ~50     'SP'
         38        CONCAT                                           ~51     ~49, ~50
         39        FETCH_CONSTANT                                   ~52     'SP'
         40        CONCAT                                           ~53     ~51, ~52
         41        FETCH_CONSTANT                                   ~54     'SP'
         42        CONCAT                                           ~55     ~53, ~54
         43        CONCAT                                           ~56     ~55, 'e'
         44        FETCH_CONSTANT                                   ~57     'LF'
         45        CONCAT                                           ~58     ~56, ~57
   32    46        FETCH_CONSTANT                                   ~59     'MSBS'
         47        CONCAT                                           ~60     ~58, ~59
         48        CONCAT                                           ~61     ~60, 'f'
         49        FETCH_CONSTANT                                   ~62     'MSBS'
         50        CONCAT                                           ~63     ~61, ~62
         51        CONCAT                                           ~64     ~63, 'g'
         52        FETCH_CONSTANT                                   ~65     'MSBS'
         53        CONCAT                                           ~66     ~64, ~65
         54        FETCH_CONSTANT                                   ~67     'MSBS'
         55        CONCAT                                           ~68     ~66, ~67
         56        CONCAT                                           ~69     ~68, 'h'
         57        FETCH_CONSTANT                                   ~70     'MSBS'
         58        CONCAT                                           ~71     ~69, ~70
         59        FETCH_CONSTANT                                   ~72     'MSBS'
         60        CONCAT                                           ~73     ~71, ~72
         61        FETCH_CONSTANT                                   ~74     'ZWS'
         62        CONCAT                                           ~75     ~73, ~74
         63        FETCH_CONSTANT                                   ~76     'ZWS'
         64        CONCAT                                           ~77     ~75, ~76
         65        FETCH_CONSTANT                                   ~78     'MSBP'
         66        CONCAT                                           ~79     ~77, ~78
         67        FETCH_CONSTANT                                   ~80     'MSBP'
         68        CONCAT                                           ~81     ~79, ~80
         69        CONCAT                                           ~82     ~81, 'i'
         70        FETCH_CONSTANT                                   ~83     'MSBP'
         71        CONCAT                                           ~84     ~82, ~83
         72        FETCH_CONSTANT                                   ~85     'SP'
         73        CONCAT                                           ~86     ~84, ~85
         74        FETCH_CONSTANT                                   ~87     'MSBP'
         75        CONCAT                                           ~88     ~86, ~87
         76        FETCH_CONSTANT                                   ~89     'SP'
         77        CONCAT                                           ~90     ~88, ~89
         78        CONCAT                                           ~91     ~90, 'j'
         79        FETCH_CONSTANT                                   ~92     'LF'
         80        CONCAT                                           ~93     ~91, ~92
   33    81        FETCH_CONSTANT                                   ~94     'LF'
         82        CONCAT                                           ~95     ~93, ~94
   34    83        FETCH_CONSTANT                                   ~96     'LF'
         84        CONCAT                                           ~97     ~95, ~96
   35    85        FETCH_CONSTANT                                   ~98     'LF'
         86        CONCAT                                           ~99     ~97, ~98
   36    87        FETCH_CONSTANT                                   ~100    'LF'
         88        CONCAT                                           ~101    ~99, ~100
   37    89        CONCAT                                           ~102    ~101, 'k'
         90        FETCH_CONSTANT                                   ~103    'SP'
         91        CONCAT                                           ~104    ~102, ~103
         92        CONCAT                                           ~105    ~104, 'l'
         93        FETCH_CONSTANT                                   ~106    'SP'
         94        CONCAT                                           ~107    ~105, ~106
         95        CONCAT                                           ~108    ~107, 'm'
         96        FETCH_CONSTANT                                   ~109    'SP'
         97        CONCAT                                           ~110    ~108, ~109
         98        CONCAT                                           ~111    ~110, 'n'
         99        FETCH_CONSTANT                                   ~112    'SP'
        100        CONCAT                                           ~113    ~111, ~112
        101        FETCH_CONSTANT                                   ~114    'SP'
        102        CONCAT                                           ~115    ~113, ~114
        103        FETCH_CONSTANT                                   ~116    'SP'
        104        CONCAT                                           ~117    ~115, ~116
        105        FETCH_CONSTANT                                   ~118    'LF'
        106        CONCAT                                           ~119    ~117, ~118
   38   107        FETCH_CONSTANT                                   ~120    'MSBP'
        108        CONCAT                                           ~121    ~119, ~120
        109        CONCAT                                           ~122    ~121, 'o'
        110        FETCH_CONSTANT                                   ~123    'MSBP'
        111        CONCAT                                           ~124    ~122, ~123
        112        FETCH_CONSTANT                                   ~125    'MSBP'
        113        CONCAT                                           ~126    ~124, ~125
        114        CONCAT                                           ~127    ~126, 'p'
        115        FETCH_CONSTANT                                   ~128    'LF'
        116        CONCAT                                           ~129    ~127, ~128
   39   117        FETCH_CONSTANT                                   ~130    'LF'
        118        CONCAT                                           ~131    ~129, ~130
   40   119        FETCH_CONSTANT                                   ~132    'LF'
        120        CONCAT                                           ~133    ~131, ~132
   41   121        FETCH_CONSTANT                                   ~134    'LF'
        122        CONCAT                                           ~135    ~133, ~134
        123        INIT_ARRAY                                       ~136    ~135, 'user6003859'
   44   124        FETCH_CONSTANT                                   ~137    'NUL'
        125        FETCH_CONSTANT                                   ~138    'LF'
        126        CONCAT                                           ~139    ~137, ~138
   45   127        FETCH_CONSTANT                                   ~140    'LF'
        128        CONCAT                                           ~141    ~139, ~140
   46   129        FETCH_CONSTANT                                   ~142    'SOH'
        130        CONCAT                                           ~143    ~141, ~142
        131        FETCH_CONSTANT                                   ~144    'LF'
        132        CONCAT                                           ~145    ~143, ~144
   47   133        FETCH_CONSTANT                                   ~146    'CR'
        134        CONCAT                                           ~147    ~145, ~146
        135        FETCH_CONSTANT                                   ~148    'LF'
        136        CONCAT                                           ~149    ~147, ~148
   48   137        FETCH_CONSTANT                                   ~150    'VT'
        138        CONCAT                                           ~151    ~149, ~150
   49   139        FETCH_CONSTANT                                   ~152    'ETB'
        140        CONCAT                                           ~153    ~151, ~152
        141        CONCAT                                           ~154    ~153, 'a'
        142        FETCH_CONSTANT                                   ~155    'SP'
        143        CONCAT                                           ~156    ~154, ~155
        144        CONCAT                                           ~157    ~156, 'ab'
        145        FETCH_CONSTANT                                   ~158    'CR'
        146        CONCAT                                           ~159    ~157, ~158
        147        FETCH_CONSTANT                                   ~160    'LF'
        148        CONCAT                                           ~161    ~159, ~160
   50   149        FETCH_CONSTANT                                   ~162    'HT'
        150        CONCAT                                           ~163    ~161, ~162
        151        FETCH_CONSTANT                                   ~164    'HT'
        152        CONCAT                                           ~165    ~163, ~164
        153        FETCH_CONSTANT                                   ~166    'CR'
        154        CONCAT                                           ~167    ~165, ~166
   51   155        FETCH_CONSTANT                                   ~168    'CR'
        156        CONCAT                                           ~169    ~167, ~168
        157        FETCH_CONSTANT                                   ~170    'LF'
        158        CONCAT                                           ~171    ~169, ~170
   52   159        CONCAT                                           ~172    ~171, 'c%C3%A0'
        160        FETCH_CONSTANT                                   ~173    'SOH'
        161        CONCAT                                           ~174    ~172, ~173
        162        CONCAT                                           ~175    ~174, '%C3%AA%C3%9F%E2%82%AC'
        163        FETCH_CONSTANT                                   ~176    'NUL'
        164        CONCAT                                           ~177    ~175, ~176
        165        FETCH_CONSTANT                                   ~178    'NUL'
        166        CONCAT                                           ~179    ~177, ~178
        167        CONCAT                                           ~180    ~179, 'abcbc'
        168        FETCH_CONSTANT                                   ~181    'SP'
        169        CONCAT                                           ~182    ~180, ~181
        170        FETCH_CONSTANT                                   ~183    'SP'
        171        CONCAT                                           ~184    ~182, ~183
        172        FETCH_CONSTANT                                   ~185    'SP'
        173        CONCAT                                           ~186    ~184, ~185
        174        CONCAT                                           ~187    ~186, 'd'
        175        FETCH_CONSTANT                                   ~188    'LF'
        176        CONCAT                                           ~189    ~187, ~188
   53   177        FETCH_CONSTANT                                   ~190    'LF'
        178        CONCAT                                           ~191    ~189, ~190
   54   179        FETCH_CONSTANT                                   ~192    'HT'
        180        CONCAT                                           ~193    ~191, ~192
        181        FETCH_CONSTANT                                   ~194    'CR'
        182        CONCAT                                           ~195    ~193, ~194
        183        FETCH_CONSTANT                                   ~196    'LF'
        184        CONCAT                                           ~197    ~195, ~196
   55   185        FETCH_CONSTANT                                   ~198    'ENQ'
        186        CONCAT                                           ~199    ~197, ~198
        187        FETCH_CONSTANT                                   ~200    'SP'
        188        CONCAT                                           ~201    ~199, ~200
        189        FETCH_CONSTANT                                   ~202    'SP'
        190        CONCAT                                           ~203    ~201, ~202
        191        FETCH_CONSTANT                                   ~204    'SP'
        192        CONCAT                                           ~205    ~203, ~204
        193        CONCAT                                           ~206    ~205, 'e'
        194        FETCH_CONSTANT                                   ~207    'STX'
        195        CONCAT                                           ~208    ~206, ~207
        196        FETCH_CONSTANT                                   ~209    'LF'
        197        CONCAT                                           ~210    ~208, ~209
   56   198        FETCH_CONSTANT                                   ~211    'ETX'
        199        CONCAT                                           ~212    ~210, ~211
        200        FETCH_CONSTANT                                   ~213    'LF'
        201        CONCAT                                           ~214    ~212, ~213
   57   202        FETCH_CONSTANT                                   ~215    'EOT'
        203        CONCAT                                           ~216    ~214, ~215
        204        FETCH_CONSTANT                                   ~217    'LF'
        205        CONCAT                                           ~218    ~216, ~217
        206        ADD_ARRAY_ELEMENT                                ~136    ~218, 'mickmackusa'
   25   207        ASSIGN                                                   !3, ~136
  111   208        NEW                                              $220    'Replacements'
  112   209        SEND_VAL_EX                                              <array>
  111   210        DO_FCALL                                      0          
        211        ASSIGN                                                   !4, $220
  118   212        NEW                                              $223    'Replacements'
  119   213        SEND_VAL_EX                                              <array>
  118   214        DO_FCALL                                      0          
        215        ASSIGN                                                   !5, $223
  126   216        NEW                                              $226    'Replacements'
  127   217        SEND_VAL_EX                                              <array>
  126   218        DO_FCALL                                      0          
        219        ASSIGN                                                   !6, $226
  138   220        NEW                                              $229    'Replacements'
        221        DECLARE_LAMBDA_FUNCTION                          ~230    [0]
  141   222        SEND_VAL_EX                                              ~230
  138   223        DO_FCALL                                      0          
        224        ASSIGN                                                   !7, $229
  145   225        INIT_ARRAY                                       ~233    !4, 'original'
        226        ADD_ARRAY_ELEMENT                                ~233    !5, 'simple'
        227        ADD_ARRAY_ELEMENT                                ~233    !7, 'function'
        228        ADD_ARRAY_ELEMENT                                ~233    !6, 'optimized'
        229        ASSIGN                                                   !8, ~233
  147   230        FETCH_DIM_R                                      ~235    !3, 'user6003859'
        231        FETCH_DIM_R                                      ~236    !3, 'mickmackusa'
        232        CONCAT                                           ~237    ~235, ~236
        233        ASSIGN                                                   !9, ~237
  148   234        INIT_FCALL                                               'str_repeat'
        235        SEND_VAR                                                 !9
        236        SEND_VAL                                                 10
        237        DO_ICALL                                         $239    
        238        ASSIGN                                                   !9, $239
  150   239        ASSIGN                                                   !10, <array>
  151   240      > FE_RESET_RW                                      $242    !8, ->249
        241    > > FE_FETCH_RW                                      ~243    $242, !11, ->249
        242    >   ASSIGN                                                   !2, ~243
  152   243        INIT_METHOD_CALL                                         !11, 'execute'
        244        SEND_VAR_EX                                              !9
        245        DO_FCALL                                      0  $246    
        246        ASSIGN_DIM                                               !10, !2
        247        OP_DATA                                                  $246
  151   248      > JMP                                                      ->241
        249    >   FE_FREE                                                  $242
  155   250        ECHO                                                     'same+result%3A+'
        251        INIT_FCALL                                               'var_dump'
        252        INIT_FCALL                                               'array_unique'
        253        SEND_VAR                                                 !10
        254        DO_ICALL                                         $247    
        255        COUNT                                            ~248    $247
        256        IS_IDENTICAL                                     ~249    ~248, 1
        257        SEND_VAL                                                 ~249
        258        DO_ICALL                                         $250    
        259        ECHO                                                     $250
  157   260        INIT_FCALL                                               'array_keys'
        261        SEND_VAR                                                 !8
        262        DO_ICALL                                         $251    
        263        ASSIGN                                                   !12, $251
  158   264        INIT_FCALL                                               'array_fill_keys'
        265        SEND_VAR                                                 !12
        266        SEND_VAL                                                 0
        267        DO_ICALL                                         $253    
        268        ASSIGN                                                   !13, $253
  159   269        INIT_FCALL                                               'define'
        270        SEND_VAL                                                 'REPETITIONS'
        271        SEND_VAL                                                 100
        272        DO_ICALL                                                 
  160   273        ASSIGN                                                   !14, 0
        274      > JMP                                                      ->298
  161   275    >   INIT_FCALL                                               'shuffle'
        276        SEND_REF                                                 !12
        277        DO_ICALL                                                 
  162   278      > FE_RESET_R                                       $258    !12, ->296
        279    > > FE_FETCH_R                                               $258, !15, ->296
  163   280    >   INIT_FCALL                                               'microtime'
        281        SEND_VAL                                                 <true>
        282        DO_ICALL                                         $259    
        283        ASSIGN                                                   !16, $259
  164   284        FETCH_DIM_R                                      ~261    !8, !15
        285        INIT_METHOD_CALL                                         ~261, 'execute'
        286        SEND_VAR_EX                                              !9
        287        DO_FCALL                                      0          
  165   288        INIT_FCALL                                               'microtime'
        289        SEND_VAL                                                 <true>
        290        DO_ICALL                                         $263    
        291        ASSIGN                                                   !17, $263
  166   292        SUB                                              ~266    !17, !16
        293        ASSIGN_DIM_OP                +=               1          !13, !15
        294        OP_DATA                                                  ~266
  162   295      > JMP                                                      ->279
        296    >   FE_FREE                                                  $258
  160   297        PRE_INC                                                  !14
        298    >   FETCH_CONSTANT                                   ~268    'REPETITIONS'
        299        IS_SMALLER                                               !14, ~268
        300      > JMPNZ                                                    ~269, ->275
  170   301    > > FE_RESET_R                                       $270    !13, ->312
        302    > > FE_FETCH_R                                       ~271    $270, !1, ->312
        303    >   ASSIGN                                                   !2, ~271
  171   304        INIT_FCALL                                               'printf'
        305        SEND_VAL                                                 '%25-12s%3A+%25.2es%0A'
        306        SEND_VAR                                                 !2
        307        FETCH_CONSTANT                                   ~273    'REPETITIONS'
        308        DIV                                              ~274    !1, ~273
        309        SEND_VAL                                                 ~274
        310        DO_ICALL                                                 
  170   311      > JMP                                                      ->302
        312    >   FE_FREE                                                  $270
  174   313      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iCeHp
function name:  {closure}
number of ops:  19
compiled vars:  !0 = $str, !1 = $parts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  138     0  E >   RECV                                             !0      
  139     1        INIT_FCALL                                               'preg_split'
          2        SEND_VAL                                                 '%7E%5E%5B%5CpC%5CpZ%5D%2B%7C%5B%5CpC%5CpZ%5D%2B%24%7C%5CR%28%3F%3A%5B%5CpC%5CpZ%5D%2A%3F%28%5CR%29%5B%5CpC%5CpZ%5D%2A%29%3F%7Eu'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 -1
          5        SEND_VAL                                                 3
          6        DO_ICALL                                         $2      
          7        ASSIGN                                                   !1, $2
  140     8        INIT_FCALL                                               'implode'
          9        SEND_VAL                                                 '%0A'
         10        INIT_FCALL                                               'array_map'
         11        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
         12        SEND_VAL                                                 ~4
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $5      
         15        SEND_VAR                                                 $5
         16        DO_ICALL                                         $6      
         17      > RETURN                                                   $6
  141    18*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iCeHp
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  140     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'trim'
          2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%7E%5B%5CpC%5CpZ%5D%2B%7Eu'
          4        SEND_VAL                                                 '+'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $1      
          7        SEND_VAR                                                 $1
          8        DO_ICALL                                         $2      
          9      > RETURN                                                   $2
         10*     > RETURN                                                   null

End of Dynamic Function 0

End of Dynamic Function 0

Function display:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 19
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 19
Branch analysis from position: 31
Branch analysis from position: 19
filename:       /in/iCeHp
function name:  display
number of ops:  35
compiled vars:  !0 = $str, !1 = $charmap, !2 = $converter, !3 = $handle, !4 = $line
line      #* E I O

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.76 ms | 1047 KiB | 27 Q