3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = 'Aenean lacinia bibendum <a href="/life">life</a> sed consectetur. <a href="/work">Work</a> quis risus eget urna mollis ornare <a href="/about">about</a> leo. <h1> attribute="whatever">asiponfpweg ihnasegio</h1>asd <p>whatever</p> <img src=""></img> <h3> attribute="whatever">asiponfpweg ihnasegio</h3> <p>whatever</p> <p>whatever</p> <h1><span> attribute="whatever">asiponfpweg ihnasegio</span></h3> <p>whatever</p> <h3> attribute="whatever">asiponfpweg ihnasegio</h3>'; preg_match_all('/<h\d.+?(?=<h\d|$)/s', $html, $matches); print_r($matches[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oZXAF
function name:  (null)
number of ops:  11
compiled vars:  !0 = $html, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Aenean+lacinia+bibendum+%3Ca+href%3D%22%2Flife%22%3Elife%3C%2Fa%3E+sed+consectetur.+%3Ca+href%3D%22%2Fwork%22%3EWork%3C%2Fa%3E+quis+risus+eget+urna+mollis+ornare+%3Ca+href%3D%22%2Fabout%22%3Eabout%3C%2Fa%3E+leo.%0A%3Ch1%3E+attribute%3D%22whatever%22%3Easiponfpweg+ihnasegio%3C%2Fh1%3Easd%0A%3Cp%3Ewhatever%3C%2Fp%3E%0A%3Cimg+src%3D%22%22%3E%3C%2Fimg%3E%0A%3Ch3%3E+attribute%3D%22whatever%22%3Easiponfpweg+ihnasegio%3C%2Fh3%3E%0A%3Cp%3Ewhatever%3C%2Fp%3E%0A%3Cp%3Ewhatever%3C%2Fp%3E%0A%3Ch1%3E%3Cspan%3E+attribute%3D%22whatever%22%3Easiponfpweg+ihnasegio%3C%2Fspan%3E%3C%2Fh3%3E%0A%3Cp%3Ewhatever%3C%2Fp%3E%0A%3Ch3%3E+attribute%3D%22whatever%22%3Easiponfpweg+ihnasegio%3C%2Fh3%3E'
   14     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%3Ch%5Cd.%2B%3F%28%3F%3D%3Ch%5Cd%7C%24%29%2Fs'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
   15     6        INIT_FCALL                                               'print_r'
          7        FETCH_DIM_R                                      ~4      !1, 0
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.99 ms | 1002 KiB | 15 Q