3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tmp = sys_get_temp_dir(); unlink($tmp.'/file'); unlink($tmp.'/link1'); unlink($tmp.'/link2'); touch($tmp.'/file'); symlink($tmp.'/file', $tmp.'/link1'); symlink($tmp.'/link1', $tmp.'/link2'); var_dump(readlink($tmp.'/link2')); var_dump(realpath($tmp.'/link2'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v3uns
function name:  (null)
number of ops:  46
compiled vars:  !0 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'sys_get_temp_dir'
          1        DO_ICALL                                         $1      
          2        ASSIGN                                                   !0, $1
    5     3        INIT_FCALL                                               'unlink'
          4        CONCAT                                           ~3      !0, '%2Ffile'
          5        SEND_VAL                                                 ~3
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'unlink'
          8        CONCAT                                           ~5      !0, '%2Flink1'
          9        SEND_VAL                                                 ~5
         10        DO_ICALL                                                 
    7    11        INIT_FCALL                                               'unlink'
         12        CONCAT                                           ~7      !0, '%2Flink2'
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                                 
    9    15        INIT_FCALL                                               'touch'
         16        CONCAT                                           ~9      !0, '%2Ffile'
         17        SEND_VAL                                                 ~9
         18        DO_ICALL                                                 
   10    19        INIT_FCALL                                               'symlink'
         20        CONCAT                                           ~11     !0, '%2Ffile'
         21        SEND_VAL                                                 ~11
         22        CONCAT                                           ~12     !0, '%2Flink1'
         23        SEND_VAL                                                 ~12
         24        DO_ICALL                                                 
   11    25        INIT_FCALL                                               'symlink'
         26        CONCAT                                           ~14     !0, '%2Flink1'
         27        SEND_VAL                                                 ~14
         28        CONCAT                                           ~15     !0, '%2Flink2'
         29        SEND_VAL                                                 ~15
         30        DO_ICALL                                                 
   13    31        INIT_FCALL                                               'var_dump'
         32        INIT_FCALL                                               'readlink'
         33        CONCAT                                           ~17     !0, '%2Flink2'
         34        SEND_VAL                                                 ~17
         35        DO_ICALL                                         $18     
         36        SEND_VAR                                                 $18
         37        DO_ICALL                                                 
   14    38        INIT_FCALL                                               'var_dump'
         39        INIT_FCALL                                               'realpath'
         40        CONCAT                                           ~20     !0, '%2Flink2'
         41        SEND_VAL                                                 ~20
         42        DO_ICALL                                         $21     
         43        SEND_VAR                                                 $21
         44        DO_ICALL                                                 
         45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.56 ms | 1400 KiB | 27 Q