3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (version_compare(PHP_VERSION, '5.4.0') >= 0){ preg_match_all('/(?:\e\[(.*?)m|(\x08))/',"foob\e[31;41ma\e[0mr\x08\x08\x08 ", $matches, PREG_OFFSET_CAPTURE); } else { preg_match_all('/(?:\\\e\[(.*?)m|(\x08))/','foob\e[31;41ma\e[0mr\x08\x08\x08 ', $matches, PREG_OFFSET_CAPTURE); } var_dump($matches);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oqB5b
function name:  (null)
number of ops:  23
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'version_compare'
          1        SEND_VAL                                                 '8.3.0'
          2        SEND_VAL                                                 '5.4.0'
          3        DO_ICALL                                         $1      
          4        IS_SMALLER_OR_EQUAL                                      0, $1
          5      > JMPZ                                                     ~2, ->13
    3     6    >   INIT_FCALL                                               'preg_match_all'
          7        SEND_VAL                                                 '%2F%28%3F%3A%5Ce%5C%5B%28.%2A%3F%29m%7C%28%5Cx08%29%29%2F'
          8        SEND_VAL                                                 'foob%1B%5B31%3B41ma%1B%5B0mr%08%08%08+++'
          9        SEND_REF                                                 !0
         10        SEND_VAL                                                 256
         11        DO_ICALL                                                 
    2    12      > JMP                                                      ->19
    5    13    >   INIT_FCALL                                               'preg_match_all'
         14        SEND_VAL                                                 '%2F%28%3F%3A%5C%5Ce%5C%5B%28.%2A%3F%29m%7C%28%5Cx08%29%29%2F'
         15        SEND_VAL                                                 'foob%5Ce%5B31%3B41ma%5Ce%5B0mr%5Cx08%5Cx08%5Cx08+++'
         16        SEND_REF                                                 !0
         17        SEND_VAL                                                 256
         18        DO_ICALL                                                 
    7    19    >   INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.34 ms | 1072 KiB | 16 Q