3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iterator = new GlobIterator('*'); foreach($iterator as $file) { echo $file->getBasename() . ' > ' . $file->getSize(); }
Output for 8.2.14 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
etc > 408in > 60tmp > 40
Output for 8.3.5
etc > 408in > 80tmp > 40
Output for 8.2.0 - 8.2.13

Process exited with code 139.
Output for 7.1.26 - 7.1.33, 7.2.17 - 7.2.33, 7.3.0 - 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
Fatal error: Uncaught UnexpectedValueException: GlobIterator::__construct(): open_basedir restriction in effect. File(*) is not within the allowed path(s): (/tmp:/in:/etc) in /in/sro8I:3 Stack trace: #0 /in/sro8I(3): GlobIterator->__construct('*') #1 {main} thrown in /in/sro8I on line 3
Process exited with code 255.
Output for 8.0.13
bin > 10014boot > 0dev > 400etc > 364home > 40in > 60lib > 1294lib64 > 1294mnt > 0opt > 0proc > 0root > 40run > 160sbin > 10014srv > 14sys > 0tmp > 2083920usr > 70var > 96
Output for 7.4.33
bin > 10686boot > 0dev > 400etc > 408home > 40in > 60lib > 1294lib64 > 1294mnt > 0opt > 0proc > 0root > 40run > 80sbin > 10686srv > 14sys > 0tmp > 120920usr > 70var > 96
Output for 7.3.33
bin > 9994boot > 0dev > 400etc > 364home > 40in > 60lib > 1294lib64 > 1294mnt > 0opt > 0proc > 0root > 40run > 80sbin > 9994srv > 14sys > 0tmp > 108380usr > 70var > 96
Output for 7.3.32
bin > 9954boot > 0dev > 400etc > 364home > 40in > 20lib > 1294lib64 > 1294mnt > 0opt > 0proc > 0root > 40run > 80sbin > 9954srv > 14sys > 0tmp > 111680usr > 70var > 96
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Fatal error: Class 'GlobIterator' not found in /in/sro8I 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: globiterator in /in/sro8I on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: globiterator in /in/sro8I on line 3

preferences:
224.89 ms | 401 KiB | 340 Q