3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/(\w)*/'; $limit = 10000; $string = 'a'; for ( $i = 0; $i <= $limit; $i++ ) { $string .= 'a'; //echo strlen($string) . "\n"; //echo mb_strlen($string); } echo strlen($string)."\n"; preg_replace($pattern, '', $string); echo strlen($string)."\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/8mLBF
function name:  (null)
number of ops:  22
compiled vars:  !0 = $pattern, !1 = $limit, !2 = $string, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%2F%28%5Cw%29%2A%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                                                    ~10, ->5
   16     9    >   STRLEN                                           ~11     !2
         10        CONCAT                                           ~12     ~11, '%0A'
         11        ECHO                                                     ~12
   17    12        INIT_FCALL                                               'preg_replace'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 ''
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
   18    17        STRLEN                                           ~14     !2
         18        CONCAT                                           ~15     ~14, '%0A'
         19        ECHO                                                     ~15
   19    20        ECHO                                                     'done'
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.95 ms | 1387 KiB | 15 Q