3v4l.org

run code in 300+ PHP versions simultaneously
<?php $source = str_replace('\\', DIRECTORY_SEPARATOR, realpath($source)) . '<br>'; $docRoot = str_replace('/', '\\', $_SERVER['DOCUMENT_ROOT']). '<br>'; // normalize to http $diff = str_replace($docRoot, '', $source). '<br>'; echo $source; echo $docRoot; echo $diff; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IhM53
function name:  (null)
number of ops:  30
compiled vars:  !0 = $source, !1 = $docRoot, !2 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'str_replace'
          1        SEND_VAL                                                 '%5C'
          2        SEND_VAL                                                 '%2F'
          3        INIT_FCALL                                               'realpath'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
          7        DO_ICALL                                         $4      
          8        CONCAT                                           ~5      $4, '%3Cbr%3E'
          9        ASSIGN                                                   !0, ~5
    3    10        INIT_FCALL                                               'str_replace'
         11        SEND_VAL                                                 '%2F'
         12        SEND_VAL                                                 '%5C'
         13        FETCH_R                      global              ~7      '_SERVER'
         14        FETCH_DIM_R                                      ~8      ~7, 'DOCUMENT_ROOT'
         15        SEND_VAL                                                 ~8
         16        DO_ICALL                                         $9      
         17        CONCAT                                           ~10     $9, '%3Cbr%3E'
         18        ASSIGN                                                   !1, ~10
    4    19        INIT_FCALL                                               'str_replace'
         20        SEND_VAR                                                 !1
         21        SEND_VAL                                                 ''
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $12     
         24        CONCAT                                           ~13     $12, '%3Cbr%3E'
         25        ASSIGN                                                   !2, ~13
    6    26        ECHO                                                     !0
    7    27        ECHO                                                     !1
    8    28        ECHO                                                     !2
   10    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.94 ms | 1395 KiB | 17 Q