3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo $mypath = realpath( dirname(__FILE__).'/..'); // gives: /path/to/file/ echo PHP_EOL; echo $mypath = dirname(__FILE__).'/..'; // gives: /path/to/file/directory/..
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JOU0E
function name:  (null)
number of ops:  17
compiled vars:  !0 = $mypath
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'realpath'
          1        INIT_FCALL                                               'dirname'
          2        SEND_VAL                                                 '%2Fin%2FJOU0E'
          3        DO_ICALL                                         $1      
          4        CONCAT                                           ~2      $1, '%2F..'
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                         $3      
          7        ASSIGN                                           ~4      !0, $3
          8        ECHO                                                     ~4
    4     9        ECHO                                                     '%0A'
    5    10        INIT_FCALL                                               'dirname'
         11        SEND_VAL                                                 '%2Fin%2FJOU0E'
         12        DO_ICALL                                         $5      
         13        CONCAT                                           ~6      $5, '%2F..'
         14        ASSIGN                                           ~7      !0, ~6
         15        ECHO                                                     ~7
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.92 ms | 1398 KiB | 17 Q