3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('pcre.backtrack_limit', 100); for ($len = 1000; $len <= 1001; $len++) { $x = str_repeat("x", $len); $ret = preg_match("/x+x+y/", $x); echo "len = " . $len . "\n"; echo "preg_match = " . $ret . "\n"; echo "PREG_BACKTRACK_LIMIT_ERROR = " . PREG_BACKTRACK_LIMIT_ERROR . "\n"; echo "preg_last_error = " . preg_last_error() . "\n"; echo "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 6
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 6
Branch analysis from position: 32
Branch analysis from position: 6
filename:       /in/EpaNC
function name:  (null)
number of ops:  33
compiled vars:  !0 = $len, !1 = $x, !2 = $ret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'pcre.backtrack_limit'
          2        SEND_VAL                                                 100
          3        DO_ICALL                                                 
    5     4        ASSIGN                                                   !0, 1000
          5      > JMP                                                      ->30
    7     6    >   INIT_FCALL                                               'str_repeat'
          7        SEND_VAL                                                 'x'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
    8    11        INIT_FCALL                                               'preg_match'
         12        SEND_VAL                                                 '%2Fx%2Bx%2By%2F'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $7      
         15        ASSIGN                                                   !2, $7
   10    16        CONCAT                                           ~9      'len+%3D+', !0
         17        CONCAT                                           ~10     ~9, '%0A'
         18        ECHO                                                     ~10
   11    19        CONCAT                                           ~11     'preg_match+%3D+', !2
         20        CONCAT                                           ~12     ~11, '%0A'
         21        ECHO                                                     ~12
   12    22        ECHO                                                     'PREG_BACKTRACK_LIMIT_ERROR+%3D+2%0A'
   13    23        INIT_FCALL                                               'preg_last_error'
         24        DO_ICALL                                         $13     
         25        CONCAT                                           ~14     'preg_last_error+%3D+', $13
         26        CONCAT                                           ~15     ~14, '%0A'
         27        ECHO                                                     ~15
   14    28        ECHO                                                     '%0A'
    5    29        PRE_INC                                                  !0
         30    >   IS_SMALLER_OR_EQUAL                                      !0, 1001
         31      > JMPNZ                                                    ~17, ->6
   15    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.15 ms | 1009 KiB | 17 Q