3v4l.org

run code in 300+ PHP versions simultaneously
<?php $headers = ''; foreach ($_SERVER as $key => $value) { if (strpos($key, 'HTTP_') === 0 && $key != 'HTTP_HOST' && $key != 'HTTP_CONNECTION') { $key = strtolower(strtr(substr($key, 5), '_', '-')); $headers .= $key . ': ' . $value . "\r\n"; } } $opts = array( 'http'=>array( 'method'=>"GET", 'header'=> $headers, ) ); echo file_get_contents('http://phd.yandex.net/detect', false, stream_context_create($opts));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 35
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 35
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 34
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 34
Branch analysis from position: 16
Branch analysis from position: 13
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
filename:       /in/islVq
function name:  (null)
number of ops:  50
compiled vars:  !0 = $headers, !1 = $value, !2 = $key, !3 = $opts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, ''
    4     1        FETCH_R                      global              ~5      '_SERVER'
          2      > FE_RESET_R                                       $6      ~5, ->35
          3    > > FE_FETCH_R                                       ~7      $6, !1, ->35
          4    >   ASSIGN                                                   !2, ~7
    5     5        INIT_FCALL                                               'strpos'
          6        SEND_VAR                                                 !2
          7        SEND_VAL                                                 'HTTP_'
          8        DO_ICALL                                         $9      
          9        IS_IDENTICAL                                     ~10     $9, 0
         10      > JMPZ_EX                                          ~10     ~10, ->13
         11    >   IS_NOT_EQUAL                                     ~11     !2, 'HTTP_HOST'
         12        BOOL                                             ~10     ~11
         13    > > JMPZ_EX                                          ~10     ~10, ->16
         14    >   IS_NOT_EQUAL                                     ~12     !2, 'HTTP_CONNECTION'
         15        BOOL                                             ~10     ~12
         16    > > JMPZ                                                     ~10, ->34
    6    17    >   INIT_FCALL                                               'strtolower'
         18        INIT_FCALL                                               'strtr'
         19        INIT_FCALL                                               'substr'
         20        SEND_VAR                                                 !2
         21        SEND_VAL                                                 5
         22        DO_ICALL                                         $13     
         23        SEND_VAR                                                 $13
         24        SEND_VAL                                                 '_'
         25        SEND_VAL                                                 '-'
         26        DO_ICALL                                         $14     
         27        SEND_VAR                                                 $14
         28        DO_ICALL                                         $15     
         29        ASSIGN                                                   !2, $15
    7    30        CONCAT                                           ~17     !2, '%3A+'
         31        CONCAT                                           ~18     ~17, !1
         32        CONCAT                                           ~19     ~18, '%0D%0A'
         33        ASSIGN_OP                                     8          !0, ~19
    4    34    > > JMP                                                      ->3
         35    >   FE_FREE                                                  $6
   13    36        INIT_ARRAY                                       ~21     'GET', 'method'
   14    37        ADD_ARRAY_ELEMENT                                ~21     !0, 'header'
         38        INIT_ARRAY                                       ~22     ~21, 'http'
   11    39        ASSIGN                                                   !3, ~22
   18    40        INIT_FCALL                                               'file_get_contents'
         41        SEND_VAL                                                 'http%3A%2F%2Fphd.yandex.net%2Fdetect'
         42        SEND_VAL                                                 <false>
         43        INIT_FCALL                                               'stream_context_create'
         44        SEND_VAR                                                 !3
         45        DO_ICALL                                         $24     
         46        SEND_VAR                                                 $24
         47        DO_ICALL                                         $25     
         48        ECHO                                                     $25
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.43 ms | 1405 KiB | 25 Q