3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/a/'; $limit = 10000; $string = 'a'; for ( $i = 0; $i <= $limit; $i++ ) { $string .= 'a'; //echo strlen($string) . "\n"; //echo mb_strlen($string); } echo $string."\n"; $str2=preg_replace('#\w*#', '', $string); echo $str2."\n"; echo 'done';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 5
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 5
Branch analysis from position: 9
Branch analysis from position: 5
filename:       /in/CWTGg
function name:  (null)
number of ops:  21
compiled vars:  !0 = $pattern, !1 = $limit, !2 = $string, !3 = $i, !4 = $str2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%2Fa%2F'
    5     1        ASSIGN                                                   !1, 10000
    6     2        ASSIGN                                                   !2, 'a'
    8     3        ASSIGN                                                   !3, 0
          4      > JMP                                                      ->7
   10     5    >   ASSIGN_OP                                     8          !2, 'a'
    8     6        PRE_INC                                                  !3
          7    >   IS_SMALLER_OR_EQUAL                                      !3, !1
          8      > JMPNZ                                                    ~11, ->5
   16     9    >   CONCAT                                           ~12     !2, '%0A'
         10        ECHO                                                     ~12
   17    11        INIT_FCALL                                               'preg_replace'
         12        SEND_VAL                                                 '%23%5Cw%2A%23'
         13        SEND_VAL                                                 ''
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $13     
         16        ASSIGN                                                   !4, $13
   18    17        CONCAT                                           ~15     !4, '%0A'
         18        ECHO                                                     ~15
   19    19        ECHO                                                     'done'
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.95 ms | 1395 KiB | 15 Q