3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $passwd = file_get_contents('./etc/passwd'); //var_dump(__FILE__); die; $ll = scandir('/home/'); var_dump($ll);
based on t8GEM
Output for 7.1.20, 7.2.6 - 7.2.8
Warning: file_get_contents(): open_basedir restriction in effect. File(./etc/passwd) is not within the allowed path(s): (/tmp:/in) in /in/IR657 on line 3 Warning: file_get_contents(./etc/passwd): failed to open stream: Operation not permitted in /in/IR657 on line 3 Warning: scandir(): open_basedir restriction in effect. File(/home/) is not within the allowed path(s): (/tmp:/in) in /in/IR657 on line 7 Warning: scandir(/home/): failed to open dir: Operation not permitted in /in/IR657 on line 7 Warning: scandir(): (errno 1): Operation not permitted in /in/IR657 on line 7 bool(false)
Output for 5.5.33, 5.6.18 - 5.6.19, 7.0.4, 7.2.0
Warning: scandir(/home/): failed to open dir: Permission denied in /in/IR657 on line 7 Warning: scandir(): (errno 13): Permission denied in /in/IR657 on line 7 bool(false)
Output for 5.3.18 - 5.5.32, 5.5.34 - 5.6.17, 5.6.20 - 7.0.3, 7.0.5 - 7.1.10
array(2) { [0]=> string(1) "." [1]=> string(2) ".." }