3v4l.org

run code in 500+ PHP versions simultaneously
<?php require 'fuzz_lib.php'; $tests = [ 'Iterator', 'IteratorAggregate', 'Traversable', 'ArrayAccess', 'Countable', 'Serializable', 'JsonSerializable', 'Stringable', 'Throwable', 'DateTimeInterface', 'Reflector', ]; foreach ($tests as $t) { $v = makeValueForType($t); $cls = is_object($v) ? get_class($v) : gettype($v); $ok = is_object($v) && (new ReflectionClass($v))->implementsInterface($t) ? 'OK' : 'NO'; echo "$t => $cls [$ok]\n"; }
Output for 8.6.0
Warning: require(): Failed to open stream: No such file or directory in /in/VGPaD on line 2 Fatal error: Uncaught Error: Failed opening required 'fuzz_lib.php' (include_path='.:') in /in/VGPaD:2 Stack trace: #0 {main} thrown in /in/VGPaD on line 2
Process exited with code 255.
Output for 8.5.0 - 8.5.12
Warning: require(fuzz_lib.php): Failed to open stream: No such file or directory in /in/VGPaD on line 2 Fatal error: Uncaught Error: Failed opening required 'fuzz_lib.php' (include_path='.:') in /in/VGPaD:2 Stack trace: #0 {main} thrown in /in/VGPaD on line 2
Process exited with code 255.
Output for 8.2.0 - 8.2.36, 8.3.0 - 8.3.37, 8.4.1 - 8.4.27
Warning: require(): open_basedir restriction in effect. File(fuzz_lib.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/VGPaD on line 2 Warning: require(fuzz_lib.php): Failed to open stream: Operation not permitted in /in/VGPaD on line 2 Fatal error: Uncaught Error: Failed opening required 'fuzz_lib.php' (include_path='.:') in /in/VGPaD:2 Stack trace: #0 {main} thrown in /in/VGPaD on line 2
Process exited with code 255.

preferences:
25.4 ms | 1171 KiB | 6 Q