3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_set_save_handler ('sess', 'sess', 'sess_read', 'sess', 'sess', 'sess'); session_start (); Function sess ($foo = 'foo') { return true; } Function sess_read ($id) { session_regenerate_id (false); }
Output for 8.5.0
Deprecated: session_set_save_handler(): Providing individual callbacks instead of an object implementing SessionHandlerInterface is deprecated in /in/Lc1cX on line 3 Warning: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent (sent from /in/Lc1cX on line 3) in /in/Lc1cX on line 3 Warning: session_start(): Session cannot be started after headers have already been sent (sent from /in/Lc1cX on line 3) in /in/Lc1cX on line 5
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.4.1 - 8.4.14
Deprecated: session_set_save_handler(): Providing individual callbacks instead of an object implementing SessionHandlerInterface is deprecated in /in/Lc1cX on line 3 Warning: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent in /in/Lc1cX on line 3 Warning: session_start(): Session cannot be started after headers have already been sent in /in/Lc1cX on line 5
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28
Warning: session_regenerate_id(): Cannot call session save handler in a recursive manner in /in/Lc1cX on line 11 Warning: session_regenerate_id(): Session write failed. ID: user (path: ) in /in/Lc1cX on line 11 Warning: session_start(): Failed to read session data: user (path: ) in /in/Lc1cX on line 5
Output for 7.0.0 - 7.0.33

Process exited with code 139.
Output for 5.6.0 - 5.6.40

preferences:
194.82 ms | 412 KiB | 5 Q