3v4l.org

run code in 500+ PHP versions simultaneously
<?php $start = http_response_code(); header('HTTP/1.1 404 Not Found'); $afterStatusLine = http_response_code(); header('Location: /elsewhere'); $afterLocation = http_response_code(); header('X-B: 1', true, 418); $afterThirdArgument = http_response_code(); $previous = http_response_code(500); $afterSet = http_response_code(); setcookie('seen', '1'); var_dump($start, $afterStatusLine, $afterLocation, $afterThirdArgument, $previous, $afterSet, headers_list());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GDjlt
function name:  (null)
number of ops:  46
compiled vars:  !0 = $start, !1 = $afterStatusLine, !2 = $afterLocation, !3 = $afterThirdArgument, !4 = $previous, !5 = $afterSet
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'http_response_code'
          1        DO_ICALL                                             $6      
          2        ASSIGN                                                       !0, $6
    4     3        INIT_FCALL                                                   'header'
          4        SEND_VAL                                                     'HTTP%2F1.1+404+Not+Found'
          5        DO_ICALL                                                     
    5     6        INIT_FCALL                                                   'http_response_code'
          7        DO_ICALL                                             $9      
          8        ASSIGN                                                       !1, $9
    6     9        INIT_FCALL                                                   'header'
         10        SEND_VAL                                                     'Location%3A+%2Felsewhere'
         11        DO_ICALL                                                     
    7    12        INIT_FCALL                                                   'http_response_code'
         13        DO_ICALL                                             $12     
         14        ASSIGN                                                       !2, $12
    8    15        INIT_FCALL                                                   'header'
         16        SEND_VAL                                                     'X-B%3A+1'
         17        SEND_VAL                                                     <true>
         18        SEND_VAL                                                     418
         19        DO_ICALL                                                     
    9    20        INIT_FCALL                                                   'http_response_code'
         21        DO_ICALL                                             $15     
         22        ASSIGN                                                       !3, $15
   10    23        INIT_FCALL                                                   'http_response_code'
         24        SEND_VAL                                                     500
         25        DO_ICALL                                             $17     
         26        ASSIGN                                                       !4, $17
   11    27        INIT_FCALL                                                   'http_response_code'
         28        DO_ICALL                                             $19     
         29        ASSIGN                                                       !5, $19
   12    30        INIT_FCALL                                                   'setcookie'
         31        SEND_VAL                                                     'seen'
         32        SEND_VAL                                                     '1'
         33        DO_ICALL                                                     
   14    34        INIT_FCALL                                                   'var_dump'
         35        SEND_VAR                                                     !0
         36        SEND_VAR                                                     !1
         37        SEND_VAR                                                     !2
         38        SEND_VAR                                                     !3
         39        SEND_VAR                                                     !4
         40        SEND_VAR                                                     !5
         41        INIT_FCALL                                                   'headers_list'
         42        DO_ICALL                                             $22     
         43        SEND_VAR                                                     $22
         44        DO_ICALL                                                     
         45      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
114.06 ms | 495 KiB | 14 Q