<?php
$f = new SplFileInfo("/dev/null");
$h = $f->openFile();
while($h->valid()){
$h->current(); // comment out this line to get an endless loop
$h->next();
}
die("done");
Fatal error: Uncaught RuntimeException: SplFileInfo::openFile(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (/tmp:/in:/etc) in /in/W0rL2:4
Stack trace:
#0 /in/W0rL2(4): SplFileInfo->openFile()
#1 {main}
thrown in /in/W0rL2 on line 4
Process exited with code 255.
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
Fatal error: Uncaught RuntimeException: SplFileInfo::openFile(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (/tmp:/in:/etc) in /in/W0rL2:4
Stack trace:
#0 /in/W0rL2(4): SplFileInfo->openFile()
#1 {main}
thrown in /in/W0rL2 on line 4
Process exited with code 255.
Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::openFile(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (/tmp:/in:/etc)' in /in/W0rL2:4
Stack trace:
#0 /in/W0rL2(4): SplFileInfo->openFile()
#1 {main}
thrown in /in/W0rL2 on line 4
Process exited with code 255.
Output for 5.1.2
Fatal error: Uncaught exception 'RuntimeException' with message 'Operation not supported' in /in/W0rL2:4
Stack trace:
#0 /in/W0rL2(4): SplFileInfo->openFile()
#1 {main}
thrown in /in/W0rL2 on line 4
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.1
Fatal error: Class 'SplFileInfo' not found in /in/W0rL2 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Fatal error: Cannot instantiate non-existent class: splfileinfo in /in/W0rL2 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: splfileinfo in /in/W0rL2 on line 3