3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php symlink('/tmp', '/tmp/ryat'."\0"); var_dump(readlink('/tmp/ryat'."\0".'ryat'));
Output for 5.4.40 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.1.0
Warning: symlink() expects parameter 2 to be a valid path, string given in /in/gp1fF on line 2 Warning: readlink() expects parameter 1 to be a valid path, string given in /in/gp1fF on line 3 NULL
Output for 5.4.0 - 5.4.26, hhvm-3.12.0
Warning: symlink() expects parameter 2 to be a valid path, string given in /in/gp1fF on line 2 string(4) "/tmp"
Output for hhvm-3.10.0
Warning: symlink() expects parameter 2 to be a valid path, string given in /in/gp1fF on line 2 Warning: readlink(): No such file or directory /tmp/ryat in /in/gp1fF on line 3 bool(false)
Output for 5.4.27 - 5.4.39, 5.6.7
Warning: symlink() expects parameter 2 to be a valid path, string given in /in/gp1fF on line 2 Warning: readlink(): No such file or directory in /in/gp1fF on line 3 bool(false)
Output for 5.3.4 - 5.3.29
bool(false)
Output for 4.3.2 - 5.3.3
Warning: symlink(): File exists in /in/gp1fF on line 2 string(4) "/tmp"
Output for 4.3.1
Warning: symlink() [http://www.php.net/function.symlink]: File exists in /in/gp1fF on line 2 string(4) "/tmp"
Output for 4.3.0
string(4) "/tmp"