3v4l.org

run code in 500+ PHP versions simultaneously
<?php $obj = (new ReflectionClass( "SplFileObject" ))->newInstanceWithoutConstructor(); (new ReflectionMethod( "SplFileObject", "fputcsv" ))->invoke( $obj, [] ); echo "Done\n";
Output for 8.5.9
Fatal error: Uncaught Error: Object not initialized in /in/uqjqf:4 Stack trace: #0 [internal function]: SplFileObject->fputcsv(Array) #1 /in/uqjqf(4): ReflectionMethod->invoke(Object(SplFileObject), Array) #2 {main} thrown in /in/uqjqf on line 4
Process exited with code 255.
Output for 8.1.0 - 8.1.34, 8.2.0 - 8.2.32, 8.3.0 - 8.3.32, 8.4.1 - 8.4.23, 8.5.0 - 8.5.8

Process exited with code 139.

preferences:
61.58 ms | 1024 KiB | 4 Q