<?php
// Test 1 - PHP version
echo "PHP version: " . PHP_VERSION . "<br>";
echo "PHP major: " . PHP_MAJOR_VERSION . "<br><br>";

// Test 2 - str_starts_with existe?
echo "str_starts_with existe: " . (function_exists('str_starts_with') ? 'OUI (PHP8+)' : 'NON (PHP7)') . "<br><br>";

// Test 3 - Charger config
require_once 'config.php';
echo "config.php OK<br>";

// Test 4 - Charger functions
require_once 'functions.php';
echo "functions.php OK<br><br>";

// Test 5 - Session
session_start();
echo "Session user_id: " . ($_SESSION['user_id'] ?? 'VIDE') . "<br><br>";

// Test 6 - Charger header
echo "=== AVANT HEADER ===<br>";
include 'header.php';
echo "=== APRES HEADER ===<br>";
?>
