session.php 259 B

123456789101112131415
  1. <?php
  2. require_once __DIR__.'/_executor.php';
  3. return function () {
  4. session_start();
  5. if (isset($_SESSION['count'])) {
  6. $_SESSION['count']++;
  7. } else {
  8. $_SESSION['count'] = 0;
  9. }
  10. echo 'Count: '.$_SESSION['count'].PHP_EOL;
  11. };