3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $tmp = sys_get_temp_dir(); clearstatcache(); touch($tmp.'/file'); symlink($tmp.'/file', $tmp.'/link1'); symlink($tmp.'/link1', $tmp.'/link2'); var_dump(readlink($tmp.'/link2'));
based on tA5CE
Output for 5.3.18 - 5.3.29, 5.5.24, 5.6.7, 5.6.28, 7.0.20 - 7.2.0
string(10) "/tmp/link1"
Output for 5.4.2 - 5.4.45, 5.5.25 - 5.5.35, 5.6.8 - 5.6.21, 7.0.0 - 7.0.6
Warning: symlink(): File exists in /in/73UYE on line 8 Warning: symlink(): File exists in /in/73UYE on line 9 string(10) "/tmp/link1"