3v4l.org

run code in 300+ PHP versions simultaneously
<?php //require_once __DIR__ . '/autoload.php'; set_exception_handler(function (\Throwable $e) { new Aaalaksjas(); }); function foo(string $key): ?string { throw new \Exception('asdas'); } $validKeys = array_keys( array_filter( [ 'a' => 'b', ], fn (string $signature, string $key) => true, ARRAY_FILTER_USE_BOTH, ), ); $result = array_filter( array_combine( $validKeys, array_map(foo(...), $validKeys), ), );
Output for 8.4.1 - 8.4.14, 8.5.0 - 8.5.1
Fatal error: Uncaught Error: Class "Aaalaksjas" not found in /in/ZoXRO:7 Stack trace: #0 [internal function]: {closure:/in/ZoXRO:6}(Object(Exception)) #1 {main} thrown in /in/ZoXRO on line 7
Process exited with code 255.
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.
Output for 8.2.22 - 8.2.29, 8.3.10 - 8.3.28
Fatal error: Uncaught Error: Class "Aaalaksjas" not found in /in/ZoXRO:7 Stack trace: #0 [internal function]: {closure}(Object(Exception)) #1 {main} thrown in /in/ZoXRO on line 7
Process exited with code 255.
Output for 8.1.0 - 8.1.33, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6

Process exited with code 139.
Output for 8.0.1
Parse error: syntax error, unexpected token ")" in /in/ZoXRO on line 28
Process exited with code 255.
Output for 7.4.16
Parse error: syntax error, unexpected ')' in /in/ZoXRO on line 28
Process exited with code 255.

preferences:
89.5 ms | 412 KiB | 5 Q