3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "2007 Chevy Silverado Pickup new body style models 2008-2013 Chevy Silverado All Models 2014 Chevy Silverado 2500HD 3500HD 2007 GMC Sierra Pickup new body style models 2008 - 2013 GMC Sierra All Models 2014 GMC Sierra 2500HD 3500HD 2007-2013 Chevy Tahoe 2007-2013 Chevy Suburban 2007 - 2013 Chevy Avalanche 2007-2013 GMC Yukon Yukon XL Yukon Denali"; echo preg_replace_callback('~(\s*)(19[5-9]\d|20[0-4]\d)(?:\s*-\s*(19[5-9]\d|20[0-4]\d))?(?=\s)~', function($m) { //var_export($m); // un-comment if you want to see each $m array //echo "\n---\n"; return (strlen($m[1]) ? "\n" : "") . "<strong>*{$m[2]}" . (isset($m[3]) ? " - {$m[3]}" : "") . "</strong>"; }, $string);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6igNY
function name:  (null)
number of ops:  9
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2007+Chevy+Silverado+Pickup+new+body+style+models+2008-2013+Chevy+Silverado+All+Models+2014+Chevy+Silverado+2500HD+3500HD+2007+GMC+Sierra+Pickup+new+body+style+models+2008+-+2013+GMC+Sierra+All+Models+2014+GMC+Sierra+2500HD+3500HD+2007-2013+Chevy+Tahoe+2007-2013+Chevy+Suburban+2007+++-+++2013+Chevy+Avalanche+2007-2013+GMC+Yukon+Yukon+XL+Yukon+Denali'
    4     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%7E%28%5Cs%2A%29%2819%5B5-9%5D%5Cd%7C20%5B0-4%5D%5Cd%29%28%3F%3A%5Cs%2A-%5Cs%2A%2819%5B5-9%5D%5Cd%7C20%5B0-4%5D%5Cd%29%29%3F%28%3F%3D%5Cs%29%7E'
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   11     4        SEND_VAL                                                 ~2
   12     5        SEND_VAR                                                 !0
    4     6        DO_ICALL                                         $3      
   12     7        ECHO                                                     $3
          8      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
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: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
Branch analysis from position: 18
filename:       /in/6igNY
function name:  {closure}
number of ops:  23
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    7     1        FETCH_DIM_R                                      ~1      !0, 1
          2        STRLEN                                           ~2      ~1
          3      > JMPZ                                                     ~2, ->6
          4    >   QM_ASSIGN                                        ~3      '%0A'
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~3      ''
    8     7    >   NOP                                                      
          8        FETCH_DIM_R                                      ~4      !0, 2
          9        FAST_CONCAT                                      ~5      '%3Cstrong%3E%2A', ~4
         10        CONCAT                                           ~6      ~3, ~5
    9    11        ISSET_ISEMPTY_DIM_OBJ                         0          !0, 3
         12      > JMPZ                                                     ~7, ->18
         13    >   NOP                                                      
         14        FETCH_DIM_R                                      ~8      !0, 3
         15        FAST_CONCAT                                      ~9      '+-+', ~8
         16        QM_ASSIGN                                        ~10     ~9
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~10     ''
         19    >   CONCAT                                           ~11     ~6, ~10
   10    20        CONCAT                                           ~12     ~11, '%3C%2Fstrong%3E'
         21      > RETURN                                                   ~12
   11    22*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.54 ms | 1005 KiB | 14 Q