3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function fdopen($id, $mode) { return fopen("/proc/self/fd/".(int)$id, $mode); } for ($i = 1; $i <= 10; $i++) { echo fdopen($i,'r'); }
based on koWTB
Output for 7.3.0rc3
Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/1) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/1): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/2) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/2): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/3) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/3): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/4) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/4): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/5) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/5): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/6) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/6): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/7) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/7): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/8) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/8): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/9) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/9): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/10) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/10): failed to open stream: Operation not permitted in /in/kmvmu on line 4
Output for 7.1.10, 7.2.0, 7.3.0alpha1 - 7.3.0beta1
Warning: fopen(/proc/self/fd/1): failed to open stream: No such file or directory in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/2): failed to open stream: No such file or directory in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/3): failed to open stream: No such file or directory in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/4): failed to open stream: No such file or directory in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/5): failed to open stream: No such file or directory in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/6): failed to open stream: No such file or directory in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/7): failed to open stream: No such file or directory in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/8): failed to open stream: No such file or directory in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/9): failed to open stream: No such file or directory in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/10): failed to open stream: No such file or directory in /in/kmvmu on line 4
Output for 7.1.20, 7.2.6
Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/1) is not within the allowed path(s): (/tmp:/in) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/1): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/2) is not within the allowed path(s): (/tmp:/in) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/2): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/3) is not within the allowed path(s): (/tmp:/in) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/3): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/4) is not within the allowed path(s): (/tmp:/in) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/4): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/5) is not within the allowed path(s): (/tmp:/in) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/5): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/6) is not within the allowed path(s): (/tmp:/in) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/6): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/7) is not within the allowed path(s): (/tmp:/in) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/7): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/8) is not within the allowed path(s): (/tmp:/in) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/8): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/9) is not within the allowed path(s): (/tmp:/in) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/9): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/10) is not within the allowed path(s): (/tmp:/in) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/10): failed to open stream: Operation not permitted in /in/kmvmu on line 4
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.1, 7.1.7
Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/1) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/1): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/2) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/2): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/3) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/3): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/4) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/4): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/5) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/5): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/6) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/6): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/7) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/7): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/8) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/8): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/9) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/9): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/10) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/10): failed to open stream: Operation not permitted in /in/kmvmu on line 4
Output for 7.1.2 - 7.1.6
Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/1) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/1): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/2) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/2): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/3): failed to open stream: No such file or directory in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/4) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/4): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/5) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/5): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/6) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/6): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/7) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/7): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/8) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/8): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/9) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/9): failed to open stream: Operation not permitted in /in/kmvmu on line 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/10) is not within the allowed path(s): (/tmp/) in /in/kmvmu on line 4 Warning: fopen(/proc/self/fd/10): failed to open stream: Operation not permitted in /in/kmvmu on line 4
Output for hhvm-3.15.4
Warning: Permission denied in /in/kmvmu on line 4 Warning: Permission denied in /in/kmvmu on line 4 Resource id #4Resource id #4Resource id #4Resource id #4Resource id #4 Warning: No such file or directory in /in/kmvmu on line 4 Warning: No such file or directory in /in/kmvmu on line 4 Warning: No such file or directory in /in/kmvmu on line 4