3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // 並列通信用マルチハンドルを用意 $mh = curl_multi_init(); // 通信先ごとにCurl Handleを作り、それを $mh にaddしていく $ch_news = curl_init("http://dailynews.yahoo.co.jp/fc/entertainment/rss.xml"); curl_setopt($ch_news, CURLOPT_RETURNTRANSFER, TRUE); curl_multi_add_handle($mh, $ch_news); // 同様に $ch_music = curl_init("http://magazine.music.yahoo.co.jp/rss/ALL/rss.xml"); curl_setopt($ch_music, CURLOPT_RETURNTRANSFER, TRUE); curl_multi_add_handle($mh, $ch_music); // 同様に $ch_trend = curl_init("http://searchranking.yahoo.co.jp/rss/trend-rss.xml"); curl_setopt($ch_trend, CURLOPT_RETURNTRANSFER, TRUE); curl_multi_add_handle($mh, $ch_trend); // せーので複数の通信を同時実行。whileで全て返ってくるのを待ちます do { curl_multi_exec($mh, $running); } while ( $running ); // 個々のXMLは、それぞれのCurl Handleを指定することで取得できる $rss_news = curl_multi_getcontent($ch_news); $rss_music = curl_multi_getcontent($ch_music); $rss_trend = curl_multi_getcontent($ch_trend); // 後始末 curl_multi_remove_handle($mh, $ch_news); curl_close($ch_news); curl_multi_remove_handle($mh, $ch_music); curl_close($ch_music); curl_multi_remove_handle($mh, $ch_trend); curl_close($ch_trend); curl_multi_close($mh);
based on TiNW7
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 50, Position 2 = 45
Branch analysis from position: 50
Jump found. Position 1 = -2
Branch analysis from position: 45
filename:       /in/8edIq
function name:  (null)
number of ops:  87
compiled vars:  !0 = $mh, !1 = $ch_news, !2 = $ch_music, !3 = $ch_trend, !4 = $running, !5 = $rss_news, !6 = $rss_music, !7 = $rss_trend
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   INIT_FCALL_BY_NAME                                       'curl_multi_init'
         1        DO_FCALL                                      0  $8      
         2        ASSIGN                                                   !0, $8
   7     3        INIT_FCALL_BY_NAME                                       'curl_init'
         4        SEND_VAL_EX                                              'http%3A%2F%2Fdailynews.yahoo.co.jp%2Ffc%2Fentertainment%2Frss.xml'
         5        DO_FCALL                                      0  $10     
         6        ASSIGN                                                   !1, $10
   8     7        INIT_FCALL_BY_NAME                                       'curl_setopt'
         8        SEND_VAR_EX                                              !1
         9        FETCH_CONSTANT                                   ~12     'CURLOPT_RETURNTRANSFER'
        10        SEND_VAL_EX                                              ~12
        11        SEND_VAL_EX                                              <true>
        12        DO_FCALL                                      0          
   9    13        INIT_FCALL_BY_NAME                                       'curl_multi_add_handle'
        14        SEND_VAR_EX                                              !0
        15        SEND_VAR_EX                                              !1
        16        DO_FCALL                                      0          
  12    17        INIT_FCALL_BY_NAME                                       'curl_init'
        18        SEND_VAL_EX                                              'http%3A%2F%2Fmagazine.music.yahoo.co.jp%2Frss%2FALL%2Frss.xml'
        19        DO_FCALL                                      0  $15     
        20        ASSIGN                                                   !2, $15
  13    21        INIT_FCALL_BY_NAME                                       'curl_setopt'
        22        SEND_VAR_EX                                              !2
        23        FETCH_CONSTANT                                   ~17     'CURLOPT_RETURNTRANSFER'
        24        SEND_VAL_EX                                              ~17
        25        SEND_VAL_EX                                              <true>
        26        DO_FCALL                                      0          
  14    27        INIT_FCALL_BY_NAME                                       'curl_multi_add_handle'
        28        SEND_VAR_EX                                              !0
        29        SEND_VAR_EX                                              !2
        30        DO_FCALL                                      0          
  17    31        INIT_FCALL_BY_NAME                                       'curl_init'
        32        SEND_VAL_EX                                              'http%3A%2F%2Fsearchranking.yahoo.co.jp%2Frss%2Ftrend-rss.xml'
        33        DO_FCALL                                      0  $20     
        34        ASSIGN                                                   !3, $20
  18    35        INIT_FCALL_BY_NAME                                       'curl_setopt'
        36        SEND_VAR_EX                                              !3
        37        FETCH_CONSTANT                                   ~22     'CURLOPT_RETURNTRANSFER'
        38        SEND_VAL_EX                                              ~22
        39        SEND_VAL_EX                                              <true>
        40        DO_FCALL                                      0          
  19    41        INIT_FCALL_BY_NAME                                       'curl_multi_add_handle'
        42        SEND_VAR_EX                                              !0
        43        SEND_VAR_EX                                              !3
        44        DO_FCALL                                      0          
  22    45    >   INIT_FCALL_BY_NAME                                       'curl_multi_exec'
        46        SEND_VAR_EX                                              !0
        47        SEND_VAR_EX                                              !4
        48        DO_FCALL                                      0          
        49      > JMPNZ                                                    !4, ->45
  25    50    >   INIT_FCALL_BY_NAME                                       'curl_multi_getcontent'
        51        SEND_VAR_EX                                              !1
        52        DO_FCALL                                      0  $26     
        53        ASSIGN                                                   !5, $26
  26    54        INIT_FCALL_BY_NAME                                       'curl_multi_getcontent'
        55        SEND_VAR_EX                                              !2
        56        DO_FCALL                                      0  $28     
        57        ASSIGN                                                   !6, $28
  27    58        INIT_FCALL_BY_NAME                                       'curl_multi_getcontent'
        59        SEND_VAR_EX                                              !3
        60        DO_FCALL                                      0  $30     
        61        ASSIGN                                                   !7, $30
  30    62        INIT_FCALL_BY_NAME                                       'curl_multi_remove_handle'
        63        SEND_VAR_EX                                              !0
        64        SEND_VAR_EX                                              !1
        65        DO_FCALL                                      0          
  31    66        INIT_FCALL_BY_NAME                                       'curl_close'
        67        SEND_VAR_EX                                              !1
        68        DO_FCALL                                      0          
  33    69        INIT_FCALL_BY_NAME                                       'curl_multi_remove_handle'
        70        SEND_VAR_EX                                              !0
        71        SEND_VAR_EX                                              !2
        72        DO_FCALL                                      0          
  34    73        INIT_FCALL_BY_NAME                                       'curl_close'
        74        SEND_VAR_EX                                              !2
        75        DO_FCALL                                      0          
  36    76        INIT_FCALL_BY_NAME                                       'curl_multi_remove_handle'
        77        SEND_VAR_EX                                              !0
        78        SEND_VAR_EX                                              !3
        79        DO_FCALL                                      0          
  37    80        INIT_FCALL_BY_NAME                                       'curl_close'
        81        SEND_VAR_EX                                              !3
        82        DO_FCALL                                      0          
  39    83        INIT_FCALL_BY_NAME                                       'curl_multi_close'
        84        SEND_VAR_EX                                              !0
        85        DO_FCALL                                      0          
        86      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0