3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = '<span style="white-space:nowrap;"><a href="/tv/217/S01//">S01</a></span>'; $replace = '">'; $regEx = '@\/\"\>@'; if ($res = preg_replace($regEx, $replace, $content)){ echo 'Replacement: ' . $res; }else{ echo 'fail'; } echo 'Done';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9jmb7
function name:  (null)
number of ops:  16
compiled vars:  !0 = $content, !1 = $replace, !2 = $regEx, !3 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cspan+style%3D%22white-space%3Anowrap%3B%22%3E%3Ca+href%3D%22%2Ftv%2F217%2FS01%2F%2F%22%3ES01%3C%2Fa%3E%3C%2Fspan%3E'
    4     1        ASSIGN                                                   !1, '%22%3E'
    5     2        ASSIGN                                                   !2, '%40%5C%2F%5C%22%5C%3E%40'
    7     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !2
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $7      
          8        ASSIGN                                           ~8      !3, $7
          9      > JMPZ                                                     ~8, ->13
    8    10    >   CONCAT                                           ~9      'Replacement%3A+', !3
         11        ECHO                                                     ~9
         12      > JMP                                                      ->14
   10    13    >   ECHO                                                     'fail'
   13    14    >   ECHO                                                     'Done'
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.17 ms | 1386 KiB | 15 Q