3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = file_get_contents('http://gamesurf.tiscali.it/dynamic/articolo/CHIAVE/fina1294224760111/TIPO_PAGINA/recensione'); $dom = new DOMDocument(); @$dom->loadHTML($data); $span = $dom->getElementsByTagName('span'); $paragraph = $dom->getElementsByTagName('p'); $startList = '<ol type="1">'; $endList = '</ol>'; $tBox = array(); $pBox = array(); foreach ($span as $s) { if ($s->hasAttribute('class') && $s->getAttribute('class') == 'boxtitle2') { array_push($tBox,$dom->saveHTML($s)); } } foreach ($paragraph as $p) { if ($p->hasAttribute('class') && $p->getAttribute('class') == 'boxp') { array_push($pBox,html_entity_decode($dom->saveHTML($p))); } } if (!empty($tBox) && !empty($pBox)) { foreach ($tBox as $k => $v) { $commento = $commento.'<li>'.$v.' - '.htmlentities($pBox[$k]).'</li>'; } $commento = $startList.$commento.$endList; } echo $commento; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 44
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 44
Branch analysis from position: 26
2 jumps found. (Code = 46) Position 1 = 30, Position 2 = 35
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 43
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 43
Branch analysis from position: 35
Branch analysis from position: 44
2 jumps found. (Code = 77) Position 1 = 46, Position 2 = 68
Branch analysis from position: 46
2 jumps found. (Code = 78) Position 1 = 47, Position 2 = 68
Branch analysis from position: 47
2 jumps found. (Code = 46) Position 1 = 51, Position 2 = 56
Branch analysis from position: 51
2 jumps found. (Code = 43) Position 1 = 57, Position 2 = 67
Branch analysis from position: 57
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 67
Branch analysis from position: 56
Branch analysis from position: 68
2 jumps found. (Code = 46) Position 1 = 72, Position 2 = 75
Branch analysis from position: 72
2 jumps found. (Code = 43) Position 1 = 76, Position 2 = 94
Branch analysis from position: 76
2 jumps found. (Code = 77) Position 1 = 77, Position 2 = 90
Branch analysis from position: 77
2 jumps found. (Code = 78) Position 1 = 78, Position 2 = 90
Branch analysis from position: 78
1 jumps found. (Code = 42) Position 1 = 77
Branch analysis from position: 77
Branch analysis from position: 90
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 90
Branch analysis from position: 94
Branch analysis from position: 75
Branch analysis from position: 68
Branch analysis from position: 44
filename:       /in/GdsQE
function name:  (null)
number of ops:  96
compiled vars:  !0 = $data, !1 = $dom, !2 = $span, !3 = $paragraph, !4 = $startList, !5 = $endList, !6 = $tBox, !7 = $pBox, !8 = $s, !9 = $p, !10 = $v, !11 = $k, !12 = $commento
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'file_get_contents'
          1        SEND_VAL                                                 'http%3A%2F%2Fgamesurf.tiscali.it%2Fdynamic%2Farticolo%2FCHIAVE%2Ffina1294224760111%2FTIPO_PAGINA%2Frecensione'
          2        DO_ICALL                                         $13     
          3        ASSIGN                                                   !0, $13
    3     4        NEW                                              $15     'DOMDocument'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $15
    4     7        BEGIN_SILENCE                                    ~18     
          8        INIT_METHOD_CALL                                         !1, 'loadHTML'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
         11        END_SILENCE                                              ~18
    6    12        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
         13        SEND_VAL_EX                                              'span'
         14        DO_FCALL                                      0  $20     
         15        ASSIGN                                                   !2, $20
    7    16        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
         17        SEND_VAL_EX                                              'p'
         18        DO_FCALL                                      0  $22     
         19        ASSIGN                                                   !3, $22
    8    20        ASSIGN                                                   !4, '%3Col+type%3D%221%22%3E'
    9    21        ASSIGN                                                   !5, '%3C%2Fol%3E'
   10    22        ASSIGN                                                   !6, <array>
   11    23        ASSIGN                                                   !7, <array>
   12    24      > FE_RESET_R                                       $28     !2, ->44
         25    > > FE_FETCH_R                                               $28, !8, ->44
   13    26    >   INIT_METHOD_CALL                                         !8, 'hasAttribute'
         27        SEND_VAL_EX                                              'class'
         28        DO_FCALL                                      0  $29     
         29      > JMPZ_EX                                          ~30     $29, ->35
         30    >   INIT_METHOD_CALL                                         !8, 'getAttribute'
         31        SEND_VAL_EX                                              'class'
         32        DO_FCALL                                      0  $31     
         33        IS_EQUAL                                         ~32     $31, 'boxtitle2'
         34        BOOL                                             ~30     ~32
         35    > > JMPZ                                                     ~30, ->43
   14    36    >   INIT_FCALL                                               'array_push'
         37        SEND_REF                                                 !6
         38        INIT_METHOD_CALL                                         !1, 'saveHTML'
         39        SEND_VAR_EX                                              !8
         40        DO_FCALL                                      0  $33     
         41        SEND_VAR                                                 $33
         42        DO_ICALL                                                 
   12    43    > > JMP                                                      ->25
         44    >   FE_FREE                                                  $28
   17    45      > FE_RESET_R                                       $35     !3, ->68
         46    > > FE_FETCH_R                                               $35, !9, ->68
   18    47    >   INIT_METHOD_CALL                                         !9, 'hasAttribute'
         48        SEND_VAL_EX                                              'class'
         49        DO_FCALL                                      0  $36     
         50      > JMPZ_EX                                          ~37     $36, ->56
         51    >   INIT_METHOD_CALL                                         !9, 'getAttribute'
         52        SEND_VAL_EX                                              'class'
         53        DO_FCALL                                      0  $38     
         54        IS_EQUAL                                         ~39     $38, 'boxp'
         55        BOOL                                             ~37     ~39
         56    > > JMPZ                                                     ~37, ->67
   19    57    >   INIT_FCALL                                               'array_push'
         58        SEND_REF                                                 !7
         59        INIT_FCALL                                               'html_entity_decode'
         60        INIT_METHOD_CALL                                         !1, 'saveHTML'
         61        SEND_VAR_EX                                              !9
         62        DO_FCALL                                      0  $40     
         63        SEND_VAR                                                 $40
         64        DO_ICALL                                         $41     
         65        SEND_VAR                                                 $41
         66        DO_ICALL                                                 
   17    67    > > JMP                                                      ->46
         68    >   FE_FREE                                                  $35
   22    69        ISSET_ISEMPTY_CV                                 ~43     !6
         70        BOOL_NOT                                         ~44     ~43
         71      > JMPZ_EX                                          ~44     ~44, ->75
         72    >   ISSET_ISEMPTY_CV                                 ~45     !7
         73        BOOL_NOT                                         ~46     ~45
         74        BOOL                                             ~44     ~46
         75    > > JMPZ                                                     ~44, ->94
   23    76    > > FE_RESET_R                                       $47     !6, ->90
         77    > > FE_FETCH_R                                       ~48     $47, !10, ->90
         78    >   ASSIGN                                                   !11, ~48
   24    79        CONCAT                                           ~50     !12, '%3Cli%3E'
         80        CONCAT                                           ~51     ~50, !10
         81        CONCAT                                           ~52     ~51, '+-+'
         82        INIT_FCALL                                               'htmlentities'
         83        FETCH_DIM_R                                      ~53     !7, !11
         84        SEND_VAL                                                 ~53
         85        DO_ICALL                                         $54     
         86        CONCAT                                           ~55     ~52, $54
         87        CONCAT                                           ~56     ~55, '%3C%2Fli%3E'
         88        ASSIGN                                                   !12, ~56
   23    89      > JMP                                                      ->77
         90    >   FE_FREE                                                  $47
   26    91        CONCAT                                           ~58     !4, !12
         92        CONCAT                                           ~59     ~58, !5
         93        ASSIGN                                                   !12, ~59
   28    94    >   ECHO                                                     !12
   29    95      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.87 ms | 1408 KiB | 22 Q