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", "aaa"); //$a = '/tmp/hi'; $b = '/in/ryat'; $c = 'ryat'; link($a,$b); var_dump(readlink($c));
Output for 5.6.28, 7.0.14 - 7.1.0
Warning: link(): Invalid cross-device link in /in/E0V18 on line 13 Warning: readlink(): No such file or directory in /in/E0V18 on line 14 bool(false)
Output for 4.3.2 - 5.6.21, 7.0.0 - 7.0.6
Warning: link(): Read-only file system in /in/E0V18 on line 13 Warning: readlink(): No such file or directory in /in/E0V18 on line 14 bool(false)
Output for hhvm-3.10.0 - 3.12.0
Warning: link(): Read-only file system in /in/E0V18 on line 13 Warning: readlink(): No such file or directory ryat in /in/E0V18 on line 14 bool(false)
Output for 4.3.0 - 4.3.1
Warning: link() [http://www.php.net/function.link]: Read-only file system in /in/E0V18 on line 13 Warning: readlink() [http://www.php.net/function.readlink]: No such file or directory in /in/E0V18 on line 14 bool(false)