3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tmp = sys_get_temp_dir(); $root = $tmp.'/workspace'; mkdir($root); touch($root.'/file'); symlink($root.'/file', $root.'/link1'); var_dump(readlink($root.'/link2'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s9ZdN
function name:  (null)
number of ops:  26
compiled vars:  !0 = $tmp, !1 = $root
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'sys_get_temp_dir'
          1        DO_ICALL                                         $2      
          2        ASSIGN                                                   !0, $2
    4     3        CONCAT                                           ~4      !0, '%2Fworkspace'
          4        ASSIGN                                                   !1, ~4
    6     5        INIT_FCALL                                               'mkdir'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
    8     8        INIT_FCALL                                               'touch'
          9        CONCAT                                           ~7      !1, '%2Ffile'
         10        SEND_VAL                                                 ~7
         11        DO_ICALL                                                 
    9    12        INIT_FCALL                                               'symlink'
         13        CONCAT                                           ~9      !1, '%2Ffile'
         14        SEND_VAL                                                 ~9
         15        CONCAT                                           ~10     !1, '%2Flink1'
         16        SEND_VAL                                                 ~10
         17        DO_ICALL                                                 
   11    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'readlink'
         20        CONCAT                                           ~12     !1, '%2Flink2'
         21        SEND_VAL                                                 ~12
         22        DO_ICALL                                         $13     
         23        SEND_VAR                                                 $13
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.08 ms | 1395 KiB | 25 Q