3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'Sonance Visual Performance Series features an award-winning <a href="">Visual Performance Series</a> low-profile grille that is paintable to blend into the wall or ceiling. With three shapes and sizes, several performance levels, and a range of Sonance Landscape Series specialty /ThinLine application speakers, a consistent look can be achieved for any application in every space.'; $text = '<li class="dropdown-submenu active active-child"><a href="http://local.sonance.com/in-wall-in-ceiling/visual-performance">Visual Performance</a><ul class="level-3 dropdown-menu children-3"><li><a href="http://local.sonance.com/in-wall-in-ceiling/visual-performance#t1">Performance</a></li><li><a href="http://local.sonance.com/in-wall-in-ceiling/visual-performance#t2">Aesthetics</a></li><li><a href="http://local.sonance.com/in-wall-in-ceiling/visual-performance#t3">Installation</a></li></ul></li>'; $skipDictionary = array( 'all' => array( 'Visual Performance', 'ThinLine', 'Extreme', 'Architectural Series', 'Invisible Series', 'Cinema', 'Soundbar', 'Subwoofers', 'Sonance Landscape Series', 'Satellites', 'Subwoofers', 'Systems', 'Sonarray', 'Mariners', 'Medium' ) ); $replaceArray = array_map(function($val){ return '<span class="notranslate">'.$val.'</span>'; }, $skipDictionary['all']); foreach($skipDictionary['all'] AS $idx => $search) { $text = preg_replace('@(\s|!\>|^)'.$search.'(\s|$)@', '\1' . $replaceArray[$idx], $text); } echo '<div>'.$text.'</div>';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 25
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 25
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/EYlZF
function name:  (null)
number of ops:  30
compiled vars:  !0 = $text, !1 = $skipDictionary, !2 = $replaceArray, !3 = $search, !4 = $idx
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Sonance+Visual+Performance+Series+features+an+award-winning+%3Ca+href%3D%22%22%3EVisual+Performance+Series%3C%2Fa%3E+low-profile+grille+that+is+paintable+to+blend+into+the+wall+or+ceiling.+With+three+shapes+and+sizes%2C+several+performance+levels%2C+and+a+range+of+Sonance+Landscape+Series+specialty+%2FThinLine+application+speakers%2C+a+consistent+look+can+be+achieved+for+any+application+in+every+space.'
    3     1        ASSIGN                                                   !0, '%3Cli+class%3D%22dropdown-submenu+active+active-child%22%3E%3Ca+href%3D%22http%3A%2F%2Flocal.sonance.com%2Fin-wall-in-ceiling%2Fvisual-performance%22%3EVisual+Performance%3C%2Fa%3E%3Cul+class%3D%22level-3+dropdown-menu+children-3%22%3E%3Cli%3E%3Ca+href%3D%22http%3A%2F%2Flocal.sonance.com%2Fin-wall-in-ceiling%2Fvisual-performance%23t1%22%3EPerformance%3C%2Fa%3E%3C%2Fli%3E%3Cli%3E%3Ca+href%3D%22http%3A%2F%2Flocal.sonance.com%2Fin-wall-in-ceiling%2Fvisual-performance%23t2%22%3EAesthetics%3C%2Fa%3E%3C%2Fli%3E%3Cli%3E%3Ca+href%3D%22http%3A%2F%2Flocal.sonance.com%2Fin-wall-in-ceiling%2Fvisual-performance%23t3%22%3EInstallation%3C%2Fa%3E%3C%2Fli%3E%3C%2Ful%3E%3C%2Fli%3E'
    4     2        ASSIGN                                                   !1, <array>
   24     3        INIT_FCALL                                               'array_map'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FEYlZF%3A24%240'
   26     5        SEND_VAL                                                 ~8
          6        FETCH_DIM_R                                      ~9      !1, 'all'
          7        SEND_VAL                                                 ~9
          8        DO_ICALL                                         $10     
   24     9        ASSIGN                                                   !2, $10
   28    10        FETCH_DIM_R                                      ~12     !1, 'all'
         11      > FE_RESET_R                                       $13     ~12, ->25
         12    > > FE_FETCH_R                                       ~14     $13, !3, ->25
         13    >   ASSIGN                                                   !4, ~14
   29    14        INIT_FCALL                                               'preg_replace'
         15        CONCAT                                           ~16     '%40%28%5Cs%7C%21%5C%3E%7C%5E%29', !3
         16        CONCAT                                           ~17     ~16, '%28%5Cs%7C%24%29%40'
         17        SEND_VAL                                                 ~17
         18        FETCH_DIM_R                                      ~18     !2, !4
         19        CONCAT                                           ~19     '%5C1', ~18
         20        SEND_VAL                                                 ~19
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $20     
         23        ASSIGN                                                   !0, $20
   28    24      > JMP                                                      ->12
         25    >   FE_FREE                                                  $13
   32    26        CONCAT                                           ~22     '%3Cdiv%3E', !0
         27        CONCAT                                           ~23     ~22, '%3C%2Fdiv%3E'
         28        ECHO                                                     ~23
         29      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FEYlZF%3A24%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EYlZF
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
   25     1        CONCAT                                           ~1      '%3Cspan+class%3D%22notranslate%22%3E', !0
          2        CONCAT                                           ~2      ~1, '%3C%2Fspan%3E'
          3      > RETURN                                                   ~2
   26     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FEYlZF%3A24%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.86 ms | 1392 KiB | 17 Q