3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url1 = "http://bazalekow.mp.pl/leki/item.html?id=22134"; $url2 = "http://bazalekow.mp.pl/leki/item.html?id=8364"; $url = file_get_contents($url2); preg_match_all("/<td class=\'postac\'>([A-Z]+[^<]*)<\/td>/s",$url, $nazwy); preg_match_all("/<td class=\'postac\'>([a-z]+[^<]*)<\/td>/s",$url, $postacie); preg_match_all("/<td>([^<]*)<\/td>\s*<td class=\'cena\'>/is",$url, $producenci); preg_match_all("/<td class=\'cena\'>(.*?)<\/td>/is",$url, $ceny); echo count($ceny); for($i=0; $i<count($nazwy); $i++){ $nazwa = $nazwy[1][$i]; $postac = $postacie[1][$i]; $producent = $producenci[1][$i]; $cena = $ceny[1][$i]; $sql[] = "('$nazwa', '$postac', '$producent', '$cena')"; } print_r($sql); //print_r($postacie); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
2 jumps found. (Code = 44) Position 1 = 57, Position 2 = 30
Branch analysis from position: 57
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 57, Position 2 = 30
Branch analysis from position: 57
Branch analysis from position: 30
filename:       /in/Ybl2e
function name:  (null)
number of ops:  61
compiled vars:  !0 = $url1, !1 = $url2, !2 = $url, !3 = $nazwy, !4 = $postacie, !5 = $producenci, !6 = $ceny, !7 = $i, !8 = $nazwa, !9 = $postac, !10 = $producent, !11 = $cena, !12 = $sql
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fbazalekow.mp.pl%2Fleki%2Fitem.html%3Fid%3D22134'
    3     1        ASSIGN                                                   !1, 'http%3A%2F%2Fbazalekow.mp.pl%2Fleki%2Fitem.html%3Fid%3D8364'
    4     2        INIT_FCALL                                               'file_get_contents'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $15     
          5        ASSIGN                                                   !2, $15
    6     6        INIT_FCALL                                               'preg_match_all'
          7        SEND_VAL                                                 '%2F%3Ctd+class%3D%5C%27postac%5C%27%3E%28%5BA-Z%5D%2B%5B%5E%3C%5D%2A%29%3C%5C%2Ftd%3E%2Fs'
          8        SEND_VAR                                                 !2
          9        SEND_REF                                                 !3
         10        DO_ICALL                                                 
    7    11        INIT_FCALL                                               'preg_match_all'
         12        SEND_VAL                                                 '%2F%3Ctd+class%3D%5C%27postac%5C%27%3E%28%5Ba-z%5D%2B%5B%5E%3C%5D%2A%29%3C%5C%2Ftd%3E%2Fs'
         13        SEND_VAR                                                 !2
         14        SEND_REF                                                 !4
         15        DO_ICALL                                                 
    9    16        INIT_FCALL                                               'preg_match_all'
         17        SEND_VAL                                                 '%2F%3Ctd%3E%28%5B%5E%3C%5D%2A%29%3C%5C%2Ftd%3E%5Cs%2A%3Ctd+class%3D%5C%27cena%5C%27%3E%2Fis'
         18        SEND_VAR                                                 !2
         19        SEND_REF                                                 !5
         20        DO_ICALL                                                 
   10    21        INIT_FCALL                                               'preg_match_all'
         22        SEND_VAL                                                 '%2F%3Ctd+class%3D%5C%27cena%5C%27%3E%28.%2A%3F%29%3C%5C%2Ftd%3E%2Fis'
         23        SEND_VAR                                                 !2
         24        SEND_REF                                                 !6
         25        DO_ICALL                                                 
   12    26        COUNT                                            ~21     !6
         27        ECHO                                                     ~21
   13    28        ASSIGN                                                   !7, 0
         29      > JMP                                                      ->54
   14    30    >   FETCH_DIM_R                                      ~23     !3, 1
         31        FETCH_DIM_R                                      ~24     ~23, !7
         32        ASSIGN                                                   !8, ~24
   15    33        FETCH_DIM_R                                      ~26     !4, 1
         34        FETCH_DIM_R                                      ~27     ~26, !7
         35        ASSIGN                                                   !9, ~27
   16    36        FETCH_DIM_R                                      ~29     !5, 1
         37        FETCH_DIM_R                                      ~30     ~29, !7
         38        ASSIGN                                                   !10, ~30
   17    39        FETCH_DIM_R                                      ~32     !6, 1
         40        FETCH_DIM_R                                      ~33     ~32, !7
         41        ASSIGN                                                   !11, ~33
   19    42        ROPE_INIT                                     9  ~37     '%28%27'
         43        ROPE_ADD                                      1  ~37     ~37, !8
         44        ROPE_ADD                                      2  ~37     ~37, '%27%2C+%27'
         45        ROPE_ADD                                      3  ~37     ~37, !9
         46        ROPE_ADD                                      4  ~37     ~37, '%27%2C+%27'
         47        ROPE_ADD                                      5  ~37     ~37, !10
         48        ROPE_ADD                                      6  ~37     ~37, '%27%2C+%27'
         49        ROPE_ADD                                      7  ~37     ~37, !11
         50        ROPE_END                                      8  ~36     ~37, '%27%29'
         51        ASSIGN_DIM                                               !12
         52        OP_DATA                                                  ~36
   13    53        PRE_INC                                                  !7
         54    >   COUNT                                            ~43     !3
         55        IS_SMALLER                                               !7, ~43
         56      > JMPNZ                                                    ~44, ->30
   22    57    >   INIT_FCALL                                               'print_r'
         58        SEND_VAR                                                 !12
         59        DO_ICALL                                                 
   26    60      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.23 ms | 1400 KiB | 19 Q