3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_set_save_handler(function() { echo 1; }, function() { echo 2; }, function() { echo 3; }, function() { echo 4; }, function() { echo 5; }, function() { echo 6; }); //"oeffne", "schliesse", "lese", "schreibe", "loesche", "gc"); session_start();
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
1 Fatal error: Uncaught TypeError: Session callback must have a return value of type bool, null returned in /in/JMtb1:5 Stack trace: #0 /in/JMtb1(5): session_start() #1 {main} thrown in /in/JMtb1 on line 5
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
1 Warning: session_start(): Session callback expects true/false return value in /in/JMtb1 on line 5 2 Warning: session_start(): Session callback expects true/false return value in /in/JMtb1 on line 5 Warning: session_start(): Failed to initialize storage module: user (path: ) in /in/JMtb1 on line 5
Output for 7.1.0 - 7.1.25
1 Warning: session_start(): Session callback expects true/false return value in /in/JMtb1 on line 5 2 Warning: session_start(): Session callback expects true/false return value in /in/JMtb1 on line 5 Fatal error: session_start(): Failed to initialize storage module: user (path: ) in /in/JMtb1 on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.20
1 Warning: session_start(): Session callback expects true/false return value in /in/JMtb1 on line 5 Fatal error: session_start(): Failed to initialize storage module: user (path: ) in /in/JMtb1 on line 5 2 Warning: Unknown: Session callback expects true/false return value in Unknown on line 0
Process exited with code 255.
Output for 5.5.24 - 5.5.33, 5.5.35, 5.6.8 - 5.6.28
1 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/JMtb1:3) in /in/JMtb1 on line 5 3 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/JMtb1:3) in /in/JMtb1 on line 5 42
Output for 5.5.34
1 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/JMtb1:3) in /in/JMtb1 on line 5 3 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/JMtb1:3) in /in/JMtb1 on line 5 642

preferences:
205.51 ms | 402 KiB | 197 Q