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 strlen($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/6hpCc
function name:  (null)
number of ops:  22
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    >   STRLEN                                           ~12     !2
         10        CONCAT                                           ~13     ~12, '%0A'
         11        ECHO                                                     ~13
   17    12        INIT_FCALL                                               'preg_replace'
         13        SEND_VAL                                                 '%23%28%5Cw%29%2A%23'
         14        SEND_VAL                                                 ''
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $14     
         17        ASSIGN                                                   !4, $14
   18    18        CONCAT                                           ~16     !4, '%0A'
         19        ECHO                                                     ~16
   19    20        ECHO                                                     'done'
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.24 ms | 1395 KiB | 15 Q