3v4l.org

run code in 300+ PHP versions simultaneously
<?php $needle = "nödkåpa"; $needle = str_replace(array("|"),"\|",$needle); echo preg_replace("/($needle)/i", "<span style='background-color:#ffff00;'>$1</span>", "Nödkåpa för öppningsbehör |...");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RX6eT
function name:  (null)
number of ops:  17
compiled vars:  !0 = $needle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'n%C3%B6dk%C3%A5pa'
    3     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 '%5C%7C'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    4     7        INIT_FCALL                                               'preg_replace'
          8        ROPE_INIT                                     3  ~5      '%2F%28'
          9        ROPE_ADD                                      1  ~5      ~5, !0
         10        ROPE_END                                      2  ~4      ~5, '%29%2Fi'
         11        SEND_VAL                                                 ~4
         12        SEND_VAL                                                 '%3Cspan+style%3D%27background-color%3A%23ffff00%3B%27%3E%241%3C%2Fspan%3E'
         13        SEND_VAL                                                 'N%C3%B6dk%C3%A5pa+f%C3%B6r+%C3%B6ppningsbeh%C3%B6r+%7C...'
         14        DO_ICALL                                         $7      
         15        ECHO                                                     $7
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.51 ms | 1386 KiB | 17 Q