3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fdopen($id, $mode) { return fopen("/proc/self/fd/".(int)$id, $mode); } for ($i = 1; $i <= 10; $i++) { echo fdopen($i,'r'); echo $i; } echo fdopen(8,'r');
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/1) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/1): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 1 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/2) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/2): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 2Resource id #53 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/4) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/4): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 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/AmBiT on line 4 Warning: fopen(/proc/self/fd/5): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 5 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/6) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/6): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 6 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/7) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/7): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 7 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/8) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/8): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 8 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/9) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/9): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 9 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/10) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/10): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 10 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/8) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/8): Failed to open stream: Operation not permitted in /in/AmBiT on line 4
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/1) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/1): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 1 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/2) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/2): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 2Resource id #53 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/4) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/4): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 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/AmBiT on line 4 Warning: fopen(/proc/self/fd/5): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 5 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/6) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/6): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 6 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/7) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/7): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 7 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/8) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/8): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 8 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/9) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/9): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 9 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/10) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/10): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 10 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/8) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/8): Failed to open stream: Operation not permitted in /in/AmBiT on line 4
Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30
Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/1) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/1): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 1 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/2) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/2): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 2 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/3) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/3): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 3 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/4) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/4): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 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/AmBiT on line 4 Warning: fopen(/proc/self/fd/5): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 5 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/6) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/6): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 6 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/7) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/7): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 7 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/8) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/8): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 8 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/9) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/9): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 9 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/10) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/10): Failed to open stream: Operation not permitted in /in/AmBiT on line 4 10 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/8) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/8): Failed to open stream: Operation not permitted in /in/AmBiT on line 4
Output for 8.0.13
Warning: fopen(/proc/self/fd/1): Failed to open stream: No such file or directory in /in/AmBiT on line 4 1 Warning: fopen(/proc/self/fd/2): Failed to open stream: No such file or directory in /in/AmBiT on line 4 2 Warning: fopen(/proc/self/fd/3): Failed to open stream: No such file or directory in /in/AmBiT on line 4 3 Warning: fopen(/proc/self/fd/4): Failed to open stream: No such file or directory in /in/AmBiT on line 4 4 Warning: fopen(/proc/self/fd/5): Failed to open stream: No such file or directory in /in/AmBiT on line 4 5 Warning: fopen(/proc/self/fd/6): Failed to open stream: No such file or directory in /in/AmBiT on line 4 6 Warning: fopen(/proc/self/fd/7): Failed to open stream: No such file or directory in /in/AmBiT on line 4 7 Warning: fopen(/proc/self/fd/8): Failed to open stream: No such file or directory in /in/AmBiT on line 4 8 Warning: fopen(/proc/self/fd/9): Failed to open stream: No such file or directory in /in/AmBiT on line 4 9 Warning: fopen(/proc/self/fd/10): Failed to open stream: No such file or directory in /in/AmBiT on line 4 10 Warning: fopen(/proc/self/fd/8): Failed to open stream: No such file or directory in /in/AmBiT on line 4
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7, 7.3.32 - 7.3.33, 7.4.33
Warning: fopen(/proc/self/fd/1): failed to open stream: No such file or directory in /in/AmBiT on line 4 1 Warning: fopen(/proc/self/fd/2): failed to open stream: No such file or directory in /in/AmBiT on line 4 2 Warning: fopen(/proc/self/fd/3): failed to open stream: No such file or directory in /in/AmBiT on line 4 3 Warning: fopen(/proc/self/fd/4): failed to open stream: No such file or directory in /in/AmBiT on line 4 4 Warning: fopen(/proc/self/fd/5): failed to open stream: No such file or directory in /in/AmBiT on line 4 5 Warning: fopen(/proc/self/fd/6): failed to open stream: No such file or directory in /in/AmBiT on line 4 6 Warning: fopen(/proc/self/fd/7): failed to open stream: No such file or directory in /in/AmBiT on line 4 7 Warning: fopen(/proc/self/fd/8): failed to open stream: No such file or directory in /in/AmBiT on line 4 8 Warning: fopen(/proc/self/fd/9): failed to open stream: No such file or directory in /in/AmBiT on line 4 9 Warning: fopen(/proc/self/fd/10): failed to open stream: No such file or directory in /in/AmBiT on line 4 10 Warning: fopen(/proc/self/fd/8): failed to open stream: No such file or directory in /in/AmBiT on line 4
Output for 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/1) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/1): failed to open stream: Operation not permitted in /in/AmBiT on line 4 1 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/2) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/2): failed to open stream: Operation not permitted in /in/AmBiT on line 4 2 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/3) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/3): failed to open stream: Operation not permitted in /in/AmBiT on line 4 3 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/4) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/4): failed to open stream: Operation not permitted in /in/AmBiT on line 4 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/AmBiT on line 4 Warning: fopen(/proc/self/fd/5): failed to open stream: Operation not permitted in /in/AmBiT on line 4 5 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/6) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/6): failed to open stream: Operation not permitted in /in/AmBiT on line 4 6 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/7) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/7): failed to open stream: Operation not permitted in /in/AmBiT on line 4 7 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/8) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/8): failed to open stream: Operation not permitted in /in/AmBiT on line 4 8 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/9) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/9): failed to open stream: Operation not permitted in /in/AmBiT on line 4 9 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/10) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/10): failed to open stream: Operation not permitted in /in/AmBiT on line 4 10 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/8) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/8): failed to open stream: Operation not permitted in /in/AmBiT on line 4
Output for 7.1.20
Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/1) is not within the allowed path(s): (/tmp:/in) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/1): failed to open stream: Operation not permitted in /in/AmBiT on line 4 1 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/2) is not within the allowed path(s): (/tmp:/in) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/2): failed to open stream: Operation not permitted in /in/AmBiT on line 4 2 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/3) is not within the allowed path(s): (/tmp:/in) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/3): failed to open stream: Operation not permitted in /in/AmBiT on line 4 3 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/4) is not within the allowed path(s): (/tmp:/in) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/4): failed to open stream: Operation not permitted in /in/AmBiT on line 4 4 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/5) is not within the allowed path(s): (/tmp:/in) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/5): failed to open stream: Operation not permitted in /in/AmBiT on line 4 5 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/6) is not within the allowed path(s): (/tmp:/in) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/6): failed to open stream: Operation not permitted in /in/AmBiT on line 4 6 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/7) is not within the allowed path(s): (/tmp:/in) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/7): failed to open stream: Operation not permitted in /in/AmBiT on line 4 7 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/8) is not within the allowed path(s): (/tmp:/in) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/8): failed to open stream: Operation not permitted in /in/AmBiT on line 4 8 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/9) is not within the allowed path(s): (/tmp:/in) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/9): failed to open stream: Operation not permitted in /in/AmBiT on line 4 9 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/10) is not within the allowed path(s): (/tmp:/in) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/10): failed to open stream: Operation not permitted in /in/AmBiT on line 4 10 Warning: fopen(): open_basedir restriction in effect. File(/proc/self/fd/8) is not within the allowed path(s): (/tmp:/in) in /in/AmBiT on line 4 Warning: fopen(/proc/self/fd/8): failed to open stream: Operation not permitted in /in/AmBiT on line 4

preferences:
149.16 ms | 409 KiB | 187 Q