3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php print_r( 'El status '.session_status() ); //if ( session_status() !== PHP_SESSION_ACTIVE ) session_start(); if ( session_id() === "" ) session_start(); print_r( 'Luego el status '.session_status() );
based on OTkgA
Output for 7.2.0
El status 1 Warning: session_start(): Cannot start session when headers already sent in /in/Wtpb0 on line 5 Luego el status 1
Output for 7.1.0 - 7.1.10
El status 1 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/Wtpb0:3) in /in/Wtpb0 on line 5 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/Wtpb0:3) in /in/Wtpb0 on line 5 Luego el status 1
Output for 5.4.12 - 7.0.20
El status 1 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/Wtpb0:3) in /in/Wtpb0 on line 5 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/Wtpb0:3) in /in/Wtpb0 on line 5 Luego el status 2
Output for 5.3.22 - 5.3.29
Fatal error: Call to undefined function session_status() in /in/Wtpb0 on line 3
Process exited with code 255.