3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //$str = "ryat\0".str_repeat('i',1024); //link('/in/01E2M','b'); //$str = "/vmlinuz"; //var_dump(readlink($str)); $a = tempnam("/tmp", ""); $b = '/tmp/ryat'; link($b,$a); var_dump(readlink($b));
Output for 5.3.29, 5.4.27 - 5.5.24, 5.6.28, 7.0.14 - 7.1.0
Warning: link(): No such file or directory in /in/mOSHf on line 11 Warning: readlink(): No such file or directory in /in/mOSHf on line 12 bool(false)
Output for 5.5.25 - 5.5.29, 5.5.35 - 5.6.13, 5.6.20 - 5.6.21, 7.0.4 - 7.0.6
Warning: link(): File exists in /in/mOSHf on line 11 string(4) "/tmp"
Output for 4.3.2 - 5.3.28, 5.4.0 - 5.4.26, 5.5.30 - 5.5.34, 5.6.14 - 5.6.19, 7.0.0 - 7.0.3
Warning: link(): File exists in /in/mOSHf on line 11 Warning: readlink(): Invalid argument in /in/mOSHf on line 12 bool(false)
Output for 4.3.1
Warning: link() [http://www.php.net/function.link]: File exists in /in/mOSHf on line 11 Warning: readlink() [http://www.php.net/function.readlink]: Invalid argument in /in/mOSHf on line 12 bool(false)
Output for 4.3.0
Warning: link() [http://www.php.net/function.link]: No such file or directory in /in/mOSHf on line 11 Warning: readlink() [http://www.php.net/function.readlink]: No such file or directory in /in/mOSHf on line 12 bool(false)