3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html lang=en> <!-- Eitan Zinberg: This file contains text for review of TMNT. It is linked to a css document that formats it. --> <head> <title>Rancid Tomatoes</title> <meta charset="utf-8" /> <link href="movie.css" type="text/css" rel="stylesheet" /> <link href="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/rotten.gif" type="image/gif" rel="shortcut icon" /> </head> <body> <?php $movie = $_GET ["film"]; $info = file($movie . "/info.txt"); $rating = get_rating($info[2]); function get_rating($number){ if ($number >= 60){ return "Fresh"; } else{ return "Rotten"; } } ?> <div id="banner"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/banner.png" alt="Rancid Tomatoes" /> </div> <h1><?= $info[0] ($info[1]) ?></h1> <div id="content"> <div id="overview"> <div> <img src="<?= $movie ?>/overview.png" alt="general overview" /> </div> <dl> <?php $overview = file($movie . "/overview.txt"); foreach($overview as $line){ list($heading, $details) = explode(":", $line) ?> <dt><?= $heading ?></dt> <dd><?= $details ?> </dd> <?php } ?> </dl> </div> <div id="reviews"> <div id="rating"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/<?= $rating ?>big.png" alt="<?= $rating ?>" /> <span><?= $info[2] ?>%</span> </div> <div class="column"> <?php $count = 0; $files = glob($movie . "/review*.txt"); $number = count($files); foreach($files as $reviews){ list($review, $freshness, $name, $publication) = $reviews; ?> <p> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/<?= $freshness ?>.gif" alt="<?= $freshness ?>" /> <q><?= $review ?></q> </p> <p> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/critic.gif" alt="Critic" /> $<?= $name ?><br /> <span class="publication"><?= $publication ?></span> </p> <?php $count++; if($count >= $number/2){ ?> </div> <div class="column"> <?php } ?> <?php } ?> </div> <footer><span>(1- <?= $number ?> ) of <?= $number ?></span></footer> </div> <div id="validator"> <a href="http://validator.w3.org/check/referer"><img src="http://ycfac197.mc.yu.edu/COM3780/icons/w3c-html.png" alt="Valid HTML5"></a> <br/> <a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3"><img src="http://ycfac197.mc.yu.edu/COM3780/icons/w3c-css.png" alt="Valid CSS"></a> </div> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 32, Position 2 = 48
Branch analysis from position: 32
2 jumps found. (Code = 78) Position 1 = 33, Position 2 = 48
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 48
2 jumps found. (Code = 77) Position 1 = 66, Position 2 = 95
Branch analysis from position: 66
2 jumps found. (Code = 78) Position 1 = 67, Position 2 = 95
Branch analysis from position: 67
2 jumps found. (Code = 43) Position 1 = 92, Position 2 = 93
Branch analysis from position: 92
1 jumps found. (Code = 42) Position 1 = 66
Branch analysis from position: 66
Branch analysis from position: 93
Branch analysis from position: 95
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 95
Branch analysis from position: 48
filename:       /in/cBbEv
function name:  (null)
number of ops:  102
compiled vars:  !0 = $movie, !1 = $info, !2 = $rating, !3 = $overview, !4 = $line, !5 = $heading, !6 = $details, !7 = $count, !8 = $files, !9 = $number, !10 = $reviews, !11 = $review, !12 = $freshness, !13 = $name, !14 = $publication
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3Chtml+lang%3Den%3E%0A%0A%3C%21--+Eitan+Zinberg%3A+This+file+contains+text+for+review+of+TMNT.+It+is%0Alinked+to+a+css+document+that+formats+it.+--%3E%0A%0A%09%3Chead%3E%0A%09%09%3Ctitle%3ERancid+Tomatoes%3C%2Ftitle%3E%0A%09%09%3Cmeta+charset%3D%22utf-8%22+%2F%3E%0A%09%09%3Clink+href%3D%22movie.css%22+type%3D%22text%2Fcss%22+rel%3D%22stylesheet%22+%2F%3E%0A++++++++%3Clink+href%3D%22http%3A%2F%2Fycfac197.mc.yu.edu%2FCOM3780%2F12fa%2Fhomework%2F2%2Frotten.gif%22+%0A++++++++type%3D%22image%2Fgif%22+rel%3D%22shortcut+icon%22+%2F%3E%0A%09%3C%2Fhead%3E%0A%0A%09%3Cbody%3E%0A%09%09'
   17     1        FETCH_R                      global              ~15     '_GET'
          2        FETCH_DIM_R                                      ~16     ~15, 'film'
          3        ASSIGN                                                   !0, ~16
   18     4        INIT_FCALL                                               'file'
          5        CONCAT                                           ~18     !0, '%2Finfo.txt'
          6        SEND_VAL                                                 ~18
          7        DO_ICALL                                         $19     
          8        ASSIGN                                                   !1, $19
   19     9        INIT_FCALL_BY_NAME                                       'get_rating'
         10        CHECK_FUNC_ARG                                           
         11        FETCH_DIM_FUNC_ARG                               $21     !1, 2
         12        SEND_FUNC_ARG                                            $21
         13        DO_FCALL                                      0  $22     
         14        ASSIGN                                                   !2, $22
   29    15        ECHO                                                     '%0A%09%09%3Cdiv+id%3D%22banner%22%3E%0A%09%09%09%3Cimg+src%3D%22http%3A%2F%2Fycfac197.mc.yu.edu%2FCOM3780%2F12fa%2Fhomework%2F2%2Fbanner.png%22+%0A%09%09%09alt%3D%22Rancid+Tomatoes%22+%2F%3E%0A%09%09%3C%2Fdiv%3E%0A%0A%09%09%3Ch1%3E'
   35    16        FETCH_DIM_R                                      ~24     !1, 0
         17        INIT_DYNAMIC_CALL                                        ~24
         18        CHECK_FUNC_ARG                                           
         19        FETCH_DIM_FUNC_ARG                               $25     !1, 1
         20        SEND_FUNC_ARG                                            $25
         21        DO_FCALL                                      0  $26     
         22        ECHO                                                     $26
         23        ECHO                                                     '%3C%2Fh1%3E%0A%09%09%0A%09%09%3Cdiv+id%3D%22content%22%3E%0A%09%09%09%3Cdiv+id%3D%22overview%22%3E%0A%09%09%09%09%3Cdiv%3E%0A%09%09%09%09%09%3Cimg+src%3D%22'
   40    24        ECHO                                                     !0
         25        ECHO                                                     '%2Foverview.png%22+alt%3D%22general+overview%22+%2F%3E%0A%09%09%09%09%3C%2Fdiv%3E%0A%09%09%09%09%0A%09%09%09%09%3Cdl%3E%0A%09%09%09%09%09'
   45    26        INIT_FCALL                                               'file'
         27        CONCAT                                           ~27     !0, '%2Foverview.txt'
         28        SEND_VAL                                                 ~27
         29        DO_ICALL                                         $28     
         30        ASSIGN                                                   !3, $28
   46    31      > FE_RESET_R                                       $30     !3, ->48
         32    > > FE_FETCH_R                                               $30, !4, ->48
   47    33    >   INIT_FCALL                                               'explode'
         34        SEND_VAL                                                 '%3A'
         35        SEND_VAR                                                 !4
         36        DO_ICALL                                         $31     
         37        FETCH_LIST_R                                     $32     $31, 0
         38        ASSIGN                                                   !5, $32
         39        FETCH_LIST_R                                     $34     $31, 1
         40        ASSIGN                                                   !6, $34
         41        FREE                                                     $31
   49    42        ECHO                                                     '%09%09%09%09%09%09%09%3Cdt%3E'
         43        ECHO                                                     !5
         44        ECHO                                                     '%3C%2Fdt%3E%0A+++++++++++++++%09%09%09%09%3Cdd%3E'
   50    45        ECHO                                                     !6
         46        ECHO                                                     '+%3C%2Fdd%3E%0A+++++++++++++++%09%09%09'
   46    47      > JMP                                                      ->32
         48    >   FE_FREE                                                  $30
   52    49        ECHO                                                     '%09%09%09%09%3C%2Fdl%3E%0A%0A%09%09%09%3C%2Fdiv%3E%0A%0A%09%09%09%3Cdiv+id%3D%22reviews%22%3E%0A%09%09%09%09%3Cdiv+id%3D%22rating%22%3E+%0A%09%09%09%09%09%3Cimg+src%3D%22http%3A%2F%2Fycfac197.mc.yu.edu%2FCOM3780%2F12fa%2Fhomework%2F2%2F'
   58    50        ECHO                                                     !2
         51        ECHO                                                     'big.png%22+%0A%09%09%09%09%09alt%3D%22'
   59    52        ECHO                                                     !2
         53        ECHO                                                     '%22+%2F%3E%0A%09%09%09%09%09%3Cspan%3E'
   60    54        FETCH_DIM_R                                      ~36     !1, 2
         55        ECHO                                                     ~36
         56        ECHO                                                     '%25%3C%2Fspan%3E%0A%09%09%09%09%3C%2Fdiv%3E%0A%09%09%09%09%0A%09%09%09%09%3Cdiv+class%3D%22column%22%3E%0A%09%09%09%09%09'
   65    57        ASSIGN                                                   !7, 0
   66    58        INIT_FCALL                                               'glob'
         59        CONCAT                                           ~38     !0, '%2Freview%2A.txt'
         60        SEND_VAL                                                 ~38
         61        DO_ICALL                                         $39     
         62        ASSIGN                                                   !8, $39
   67    63        COUNT                                            ~41     !8
         64        ASSIGN                                                   !9, ~41
   68    65      > FE_RESET_R                                       $43     !8, ->95
         66    > > FE_FETCH_R                                               $43, !10, ->95
   69    67    >   QM_ASSIGN                                        ~44     !10
         68        FETCH_LIST_R                                     $45     ~44, 0
         69        ASSIGN                                                   !11, $45
         70        FETCH_LIST_R                                     $47     ~44, 1
         71        ASSIGN                                                   !12, $47
         72        FETCH_LIST_R                                     $49     ~44, 2
         73        ASSIGN                                                   !13, $49
         74        FETCH_LIST_R                                     $51     ~44, 3
         75        ASSIGN                                                   !14, $51
         76        FREE                                                     ~44
   71    77        ECHO                                                     '%09%09%09%09%09%09%09%3Cp%3E%0A%09%09%09%09%09%09%09%09%3Cimg+src%3D%22http%3A%2F%2Fycfac197.mc.yu.edu%2FCOM3780%2F12fa%2Fhomework%2F2%2F'
   72    78        ECHO                                                     !12
         79        ECHO                                                     '.gif%22+%0A%09%09%09%09%09%09%09%09alt%3D%22'
   73    80        ECHO                                                     !12
         81        ECHO                                                     '%22+%2F%3E%0A%09%09%09%09%09%09%09%09%3Cq%3E'
   74    82        ECHO                                                     !11
         83        ECHO                                                     '%3C%2Fq%3E%0A%09%09%09%09%09%09%09%3C%2Fp%3E%0A%09%09%09%09%09%09%09%3Cp%3E%0A%09%09%09%09%09%09%09%09%3Cimg+src%3D%22http%3A%2F%2Fycfac197.mc.yu.edu%2FCOM3780%2F12fa%2Fhomework%2F2%2Fcritic.gif%22+%0A%09%09%09%09%09%09%09%09alt%3D%22Critic%22+%2F%3E%0A%09%09%09%09%09%09%09%09%24'
   79    84        ECHO                                                     !13
         85        ECHO                                                     '%3Cbr+%2F%3E%0A%09%09%09%09%09%09%09%09%3Cspan+class%3D%22publication%22%3E'
   80    86        ECHO                                                     !14
         87        ECHO                                                     '%3C%2Fspan%3E%0A%09%09%09%09%09%09%09%3C%2Fp%3E%0A%09%09%09%09%09%09%09'
   83    88        PRE_INC                                                  !7
   84    89        DIV                                              ~54     !9, 2
         90        IS_SMALLER_OR_EQUAL                                      ~54, !7
         91      > JMPZ                                                     ~55, ->93
   86    92    >   ECHO                                                     '%09%09%09%09%09%09%09%09%3C%2Fdiv%3E%0A%09%09%09%09%09%09%09%09%3Cdiv+class%3D%22column%22%3E%0A%09%09%09%09%09%09%09'
   91    93    >   ECHO                                                     '%0A%09%09%09%09%09%09'
   68    94      > JMP                                                      ->66
         95    >   FE_FREE                                                  $43
   93    96        ECHO                                                     '%09%09%09%09%3C%2Fdiv%3E%0A%0A%09%09%09%3Cfooter%3E%3Cspan%3E%281-+'
   95    97        ECHO                                                     !9
         98        ECHO                                                     '+%29+of+'
         99        ECHO                                                     !9
        100        ECHO                                                     '%3C%2Fspan%3E%3C%2Ffooter%3E%0A%09%09%3C%2Fdiv%3E%0A%09%09%09%0A%09%09%3Cdiv+id%3D%22validator%22%3E%0A%09%09%09%3Ca+href%3D%22http%3A%2F%2Fvalidator.w3.org%2Fcheck%2Freferer%22%3E%3Cimg+src%3D%22http%3A%2F%2Fycfac197.mc.yu.edu%2FCOM3780%2Ficons%2Fw3c-html.png%22+alt%3D%22Valid+HTML5%22%3E%3C%2Fa%3E%0A%09%09%09%3Cbr%2F%3E%0A+++++++%09%09+%3Ca+href%3D%22http%3A%2F%2Fjigsaw.w3.org%2Fcss-validator%2Fcheck%2Freferer%3Fprofile%3Dcss3%22%3E%3Cimg+src%3D%22http%3A%2F%2Fycfac197.mc.yu.edu%2FCOM3780%2Ficons%2Fw3c-css.png%22+alt%3D%22Valid+CSS%22%3E%3C%2Fa%3E%0A%09%09%3C%2Fdiv%3E%0A%0A%0A%09%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
  106   101      > RETURN                                                   1

Function get_rating:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cBbEv
function name:  get_rating
number of ops:  7
compiled vars:  !0 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     1        IS_SMALLER_OR_EQUAL                                      60, !0
          2      > JMPZ                                                     ~1, ->5
   22     3    > > RETURN                                                   'Fresh'
          4*       JMP                                                      ->6
   25     5    > > RETURN                                                   'Rotten'
   27     6*     > RETURN                                                   null

End of function get_rating

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.29 ms | 1408 KiB | 19 Q