3v4l.org

run code in 500+ PHP versions simultaneously
<?php $tools = "<p>tools :<br> 1 Hex Key (or two Hex key)<br> 1 screww drivers<br> 1 hammer <br> 1 drill </p>"; $search = ['<p>','</p>','<br>', 'tools :']; //Add more words to be removed $filteredStr = str_replace($search, '',$tools); $res = explode(PHP_EOL,$filteredStr); array_shift($res); // Removing empty element at the beginning of array print_r($res);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v52EY
function name:  (null)
number of ops:  17
compiled vars:  !0 = $tools, !1 = $search, !2 = $filteredStr, !3 = $res
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '%3Cp%3Etools+%3A%3Cbr%3E%0A++1+Hex+Key+%28or+two+Hex+key%29%3Cbr%3E%0A++1+screww+drivers%3Cbr%3E%0A++1+hammer+%3Cbr%3E%0A++1+drill+%3C%2Fp%3E'
    7     1        ASSIGN                                                       !1, <array>
    8     2        FRAMELESS_ICALL_3                str_replace         ~6      !1, ''
          3        OP_DATA                                                      !0
          4        ASSIGN                                                       !2, ~6
    9     5        INIT_FCALL                                                   'explode'
          6        SEND_VAL                                                     '%0A'
          7        SEND_VAR                                                     !2
          8        DO_ICALL                                             $8      
          9        ASSIGN                                                       !3, $8
   10    10        INIT_FCALL                                                   'array_shift'
         11        SEND_REF                                                     !3
         12        DO_ICALL                                                     
   11    13        INIT_FCALL                                                   'print_r'
         14        SEND_VAR                                                     !3
         15        DO_ICALL                                                     
         16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.89 ms | 2019 KiB | 16 Q