3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r = new RecursiveDirectoryIterator('.'); var_dump($r->getSubPath());
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.32, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(): open_basedir restriction in effect. File(.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/uXeSs:3 Stack trace: #0 /in/uXeSs(3): RecursiveDirectoryIterator->__construct('.') #1 {main} thrown in /in/uXeSs on line 3
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 7.3.32 - 7.3.33, 7.4.33, 8.0.13
string(0) ""
Output for 7.1.20, 7.2.6 - 7.2.8
Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(): open_basedir restriction in effect. File(.) is not within the allowed path(s): (/tmp:/in) in /in/uXeSs:3 Stack trace: #0 /in/uXeSs(3): RecursiveDirectoryIterator->__construct('.') #1 {main} thrown in /in/uXeSs on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0
Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(.): failed to open dir: Permission denied in /in/uXeSs:3 Stack trace: #0 /in/uXeSs(3): RecursiveDirectoryIterator->__construct('.') #1 {main} thrown in /in/uXeSs on line 3
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.7 - 5.6.28
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(.): failed to open dir: Permission denied' in /in/uXeSs:3 Stack trace: #0 /in/uXeSs(3): RecursiveDirectoryIterator->__construct('.') #1 {main} thrown in /in/uXeSs on line 3
Process exited with code 255.

preferences:
175.03 ms | 402 KiB | 230 Q