3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<HTML <b>Atmosp'Hair, Caroline Michellod</b><i> in <a href="1" target="_top">Leytron</a></i>, Einzelunt., <a href="1" target="result">+++</a>, <a href="google.com" target="_blank">CHE-137.645.261</a><a href="pdf" target="_blank">Download pdf</a> <b>Bar La Gouttière, Y. Maret</b><i> in <a href="http://www.example.com">Dolor</a><a href="2" target="_top">Martigny</a></i>, Einzelunt., <a href="2" target="result">+++</a>, <a href="yahoo.com" target="_blank">CHE-112.712.556</a><a href="http:/wwww.coocc.com">Doloo</a> <b>Catherine Michellod</b><i> in <a href="3" target="_top">Bagnes</a></i>, Einzelunt., <a href="3" target="result">+</a>, <a href="bing.com" target="_blank">CHE-111.755.770</a><a href="pdf" target="_blank">Download pdf</a> HTML; preg_match_all("/<.*?href=\"([^\"]*)\"[^>]*>(CHE[^<]*)<[^>]*>/", $str, $m); $result = array_map(function($link, $name){ return ["link" => $link, "name" => $name]; }, $m[1], $m[2]); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IufD1
function name:  (null)
number of ops:  19
compiled vars:  !0 = $str, !1 = $m, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '++++%3Cb%3EAtmosp%27Hair%2C+Caroline+Michellod%3C%2Fb%3E%3Ci%3E+in+%3Ca+href%3D%221%22+target%3D%22_top%22%3ELeytron%3C%2Fa%3E%3C%2Fi%3E%2C+Einzelunt.%2C+%3Ca+href%3D%221%22+target%3D%22result%22%3E%2B%2B%2B%3C%2Fa%3E%2C+%3Ca+href%3D%22google.com%22+target%3D%22_blank%22%3ECHE-137.645.261%3C%2Fa%3E%3Ca+href%3D%22pdf%22+target%3D%22_blank%22%3EDownload+pdf%3C%2Fa%3E%0A%3Cb%3EBar+La+Goutti%C3%A8re%2C+Y.+Maret%3C%2Fb%3E%3Ci%3E+in+%3Ca+href%3D%22http%3A%2F%2Fwww.example.com%22%3EDolor%3C%2Fa%3E%3Ca+href%3D%222%22+target%3D%22_top%22%3EMartigny%3C%2Fa%3E%3C%2Fi%3E%2C+Einzelunt.%2C+%3Ca+href%3D%222%22+target%3D%22result%22%3E%2B%2B%2B%3C%2Fa%3E%2C+%3Ca+href%3D%22yahoo.com%22+target%3D%22_blank%22%3ECHE-112.712.556%3C%2Fa%3E%3Ca+href%3D%22http%3A%2Fwwww.coocc.com%22%3EDoloo%3C%2Fa%3E%0A%3Cb%3ECatherine+Michellod%3C%2Fb%3E%3Ci%3E+in+%3Ca+href%3D%223%22+target%3D%22_top%22%3EBagnes%3C%2Fa%3E%3C%2Fi%3E%2C+Einzelunt.%2C+%3Ca+href%3D%223%22+target%3D%22result%22%3E%2B%3C%2Fa%3E%2C+%3Ca+href%3D%22bing.com%22+target%3D%22_blank%22%3ECHE-111.755.770%3C%2Fa%3E%3Ca+href%3D%22pdf%22+target%3D%22_blank%22%3EDownload+pdf%3C%2Fa%3E'
    9     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%3C.%2A%3Fhref%3D%22%28%5B%5E%22%5D%2A%29%22%5B%5E%3E%5D%2A%3E%28CHE%5B%5E%3C%5D%2A%29%3C%5B%5E%3E%5D%2A%3E%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
   11     6        INIT_FCALL                                               'array_map'
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FIufD1%3A11%240'
   13     8        SEND_VAL                                                 ~5
          9        FETCH_DIM_R                                      ~6      !1, 1
         10        SEND_VAL                                                 ~6
         11        FETCH_DIM_R                                      ~7      !1, 2
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                         $8      
   11    14        ASSIGN                                                   !2, $8
   15    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FIufD1%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IufD1
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $link, !1 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        INIT_ARRAY                                       ~2      !0, 'link'
          3        ADD_ARRAY_ELEMENT                                ~2      !1, 'name'
          4      > RETURN                                                   ~2
   13     5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FIufD1%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.22 ms | 1404 KiB | 19 Q