3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url="http://kakaku.com/camera/camera-lens/itemlist.aspx?pdf_Spec103=13";//取得したいURL $html=file_get_contents($url);//htmlをゴソっと取得 mb_language("Japanese");//エンコードエラー対策 $html=mb_convert_encoding($html,"utf8","auto");//文字コードをUTF-8に変換 $html=preg_replace("/(\n|\r)/","",$html);//改行コードを全部消す preg_match_all('@\<div class=\"ranking\"\>(.*?)\<\/div\>@u',$html,$matches);//配列に入れる foreach($matches[0] as $match){ //商品名 preg_match('@\<a class=\"ckitanker\"\>(.*)\<\/a\> \<span class=\"price\"\>@u',$match,$product_moto); $product=$product_moto[1]; print '商品名:'.$product.'<br />'; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 39
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 39
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
filename:       /in/QNMUD
function name:  (null)
number of ops:  41
compiled vars:  !0 = $url, !1 = $html, !2 = $matches, !3 = $match, !4 = $product_moto, !5 = $product
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fkakaku.com%2Fcamera%2Fcamera-lens%2Fitemlist.aspx%3Fpdf_Spec103%3D13'
    4     1        INIT_FCALL                                               'file_get_contents'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
    5     5        INIT_FCALL                                               'mb_language'
          6        SEND_VAL                                                 'Japanese'
          7        DO_ICALL                                                 
    6     8        INIT_FCALL                                               'mb_convert_encoding'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 'utf8'
         11        SEND_VAL                                                 'auto'
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !1, $10
    7    14        INIT_FCALL                                               'preg_replace'
         15        SEND_VAL                                                 '%2F%28%0A%7C%0D%29%2F'
         16        SEND_VAL                                                 ''
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $12     
         19        ASSIGN                                                   !1, $12
    8    20        INIT_FCALL                                               'preg_match_all'
         21        SEND_VAL                                                 '%40%5C%3Cdiv+class%3D%5C%22ranking%5C%22%5C%3E%28.%2A%3F%29%5C%3C%5C%2Fdiv%5C%3E%40u'
         22        SEND_VAR                                                 !1
         23        SEND_REF                                                 !2
         24        DO_ICALL                                                 
   10    25        FETCH_DIM_R                                      ~15     !2, 0
         26      > FE_RESET_R                                       $16     ~15, ->39
         27    > > FE_FETCH_R                                               $16, !3, ->39
   12    28    >   INIT_FCALL                                               'preg_match'
         29        SEND_VAL                                                 '%40%5C%3Ca+class%3D%5C%22ckitanker%5C%22%5C%3E%28.%2A%29%5C%3C%5C%2Fa%5C%3E%E3%80%80%5C%3Cspan+class%3D%5C%22price%5C%22%5C%3E%40u'
         30        SEND_VAR                                                 !3
         31        SEND_REF                                                 !4
         32        DO_ICALL                                                 
   13    33        FETCH_DIM_R                                      ~18     !4, 1
         34        ASSIGN                                                   !5, ~18
   15    35        CONCAT                                           ~20     '%E5%95%86%E5%93%81%E5%90%8D%EF%BC%9A', !5
         36        CONCAT                                           ~21     ~20, '%3Cbr+%2F%3E'
         37        ECHO                                                     ~21
   10    38      > JMP                                                      ->27
         39    >   FE_FREE                                                  $16
   18    40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.67 ms | 1400 KiB | 25 Q