3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(isset($_GET['stats'])) { $stats = json_decode(file_get_contents('stats.json')); echo '<h1>Hits: '.$stats->hits.'</h1>'; echo "STATS WAS SET"; } else { // STATS WAS NOT SET $stats = json_decode(file_get_contents('stats.json')); $stats->hits++; file_put_contents('stats.json', json_encode($stats)); echo "STATS WAS NOT SET"; header("Location: http://www.bjcstcharlescounty.org/"); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JdJ0E
function name:  (null)
number of ops:  36
compiled vars:  !0 = $stats
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_IS                                         ~1      '_GET'
          1        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, 'stats'
          2      > JMPZ                                                     ~2, ->16
    3     3    >   INIT_FCALL                                               'json_decode'
          4        INIT_FCALL                                               'file_get_contents'
          5        SEND_VAL                                                 'stats.json'
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !0, $4
    4    10        FETCH_OBJ_R                                      ~6      !0, 'hits'
         11        CONCAT                                           ~7      '%3Ch1%3EHits%3A+', ~6
         12        CONCAT                                           ~8      ~7, '%3C%2Fh1%3E'
         13        ECHO                                                     ~8
    5    14        ECHO                                                     'STATS+WAS+SET'
         15      > JMP                                                      ->35
    8    16    >   INIT_FCALL                                               'json_decode'
         17        INIT_FCALL                                               'file_get_contents'
         18        SEND_VAL                                                 'stats.json'
         19        DO_ICALL                                         $9      
         20        SEND_VAR                                                 $9
         21        DO_ICALL                                         $10     
         22        ASSIGN                                                   !0, $10
    9    23        PRE_INC_OBJ                                              !0, 'hits'
   10    24        INIT_FCALL                                               'file_put_contents'
         25        SEND_VAL                                                 'stats.json'
         26        INIT_FCALL                                               'json_encode'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $13     
         29        SEND_VAR                                                 $13
         30        DO_ICALL                                                 
   11    31        ECHO                                                     'STATS+WAS+NOT+SET'
   12    32        INIT_FCALL                                               'header'
         33        SEND_VAL                                                 'Location%3A+http%3A%2F%2Fwww.bjcstcharlescounty.org%2F'
         34        DO_ICALL                                                 
   14    35    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.88 ms | 1396 KiB | 23 Q