3v4l.org

run code in 300+ PHP versions simultaneously
<?php function curPageURL() { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $pageURL; } echo curPageURL();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qrN8o
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'curpageurl'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Function curpageurl:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 22
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/qrN8o
function name:  curPageURL
number of ops:  30
compiled vars:  !0 = $pageURL
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http'
    4     1        FETCH_R                      global              ~2      '_SERVER'
          2        FETCH_DIM_R                                      ~3      ~2, 'HTTPS'
          3        IS_EQUAL                                                 ~3, 'on'
          4      > JMPZ                                                     ~4, ->6
          5    >   ASSIGN_OP                                     8          !0, 's'
    5     6    >   ASSIGN_OP                                     8          !0, '%3A%2F%2F'
    6     7        FETCH_R                      global              ~7      '_SERVER'
          8        FETCH_DIM_R                                      ~8      ~7, 'SERVER_PORT'
          9        IS_NOT_EQUAL                                             ~8, '80'
         10      > JMPZ                                                     ~9, ->22
    7    11    >   FETCH_R                      global              ~10     '_SERVER'
         12        FETCH_DIM_R                                      ~11     ~10, 'SERVER_NAME'
         13        CONCAT                                           ~12     ~11, '%3A'
         14        FETCH_R                      global              ~13     '_SERVER'
         15        FETCH_DIM_R                                      ~14     ~13, 'SERVER_PORT'
         16        CONCAT                                           ~15     ~12, ~14
         17        FETCH_R                      global              ~16     '_SERVER'
         18        FETCH_DIM_R                                      ~17     ~16, 'REQUEST_URI'
         19        CONCAT                                           ~18     ~15, ~17
         20        ASSIGN_OP                                     8          !0, ~18
         21      > JMP                                                      ->28
    9    22    >   FETCH_R                      global              ~20     '_SERVER'
         23        FETCH_DIM_R                                      ~21     ~20, 'SERVER_NAME'
         24        FETCH_R                      global              ~22     '_SERVER'
         25        FETCH_DIM_R                                      ~23     ~22, 'REQUEST_URI'
         26        CONCAT                                           ~24     ~21, ~23
         27        ASSIGN_OP                                     8          !0, ~24
   11    28    > > RETURN                                                   !0
   12    29*     > RETURN                                                   null

End of function curpageurl

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.72 ms | 1403 KiB | 14 Q