3v4l.org

run code in 300+ 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>"; preg_match_all('#^(?!\s*<p>tools\s*:)\s*(.*?)(?=\s*(<br|</p|$))#m', $tools, $tools_array); print_r($tools_array[1]); $tools = '<p>tools : 1 Hex Key (or two Hex key) 1 screww drivers 1 hammer 1 drill </p>'; preg_match_all('#^(?!\s*<p>tools\s*:)\s*(.*?)(?=\s*(<br|</p|$))#m', $tools, $tools_array); print_r($tools_array[1]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jd0cD
function name:  (null)
number of ops:  21
compiled vars:  !0 = $tools, !1 = $tools_array
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'
    8     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%23%5E%28%3F%21%5Cs%2A%3Cp%3Etools%5Cs%2A%3A%29%5Cs%2A%28.%2A%3F%29%28%3F%3D%5Cs%2A%28%3Cbr%7C%3C%2Fp%7C%24%29%29%23m'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    9     6        INIT_FCALL                                               'print_r'
          7        FETCH_DIM_R                                      ~4      !1, 1
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                                 
   11    10        ASSIGN                                                   !0, '%3Cp%3Etools+%3A%0A+1+Hex+Key+%28or+two+Hex+key%29%0A+1+screww+drivers%0A+1+hammer+%0A+1+drill+%3C%2Fp%3E'
   17    11        INIT_FCALL                                               'preg_match_all'
         12        SEND_VAL                                                 '%23%5E%28%3F%21%5Cs%2A%3Cp%3Etools%5Cs%2A%3A%29%5Cs%2A%28.%2A%3F%29%28%3F%3D%5Cs%2A%28%3Cbr%7C%3C%2Fp%7C%24%29%29%23m'
         13        SEND_VAR                                                 !0
         14        SEND_REF                                                 !1
         15        DO_ICALL                                                 
   18    16        INIT_FCALL                                               'print_r'
         17        FETCH_DIM_R                                      ~8      !1, 1
         18        SEND_VAL                                                 ~8
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.86 ms | 1003 KiB | 15 Q