3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<TEXT BUILD THE ULTIMATE BRAWLER Not a full line of UPPERCASE TEXT BATTLE THROUGH EPIC LEGO THEMES text text TEXT; echo preg_replace_callback('/([A-Z-]+(?: [A-Z]+)+)(\r\n|\r|\n)/', function($matches) { return "[b]{$matches[0]}[/b]"; }, $string);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YNdHC
function name:  (null)
number of ops:  9
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'BUILD+THE+ULTIMATE+BRAWLER%0A%0ANot+a+full+line+of+UPPERCASE+TEXT%0A%0ABATTLE+THROUGH+EPIC+LEGO+THEMES%0A%0Atext+text'
   13     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%2F%28%5BA-Z-%5D%2B%28%3F%3A+%5BA-Z%5D%2B%29%2B%29%28%5Cr%5Cn%7C%5Cr%7C%5Cn%29%2F'
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   15     4        SEND_VAL                                                 ~2
          5        SEND_VAR                                                 !0
   13     6        DO_ICALL                                         $3      
   15     7        ECHO                                                     $3
          8      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YNdHC
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        ROPE_INIT                                     3  ~3      '%5Bb%5D'
          2        FETCH_DIM_R                                      ~1      !0, 0
          3        ROPE_ADD                                      1  ~3      ~3, ~1
          4        ROPE_END                                      2  ~2      ~3, '%5B%2Fb%5D'
          5      > RETURN                                                   ~2
   15     6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.94 ms | 1004 KiB | 14 Q