<?php class session { const SESSION_STARTED = TRUE; const SESSION_NOT_STARTED = FALSE; private $session_state = self::SESSION_NOT_STARTED; private static $instance; public static function get_instance(){ if(!isset(self::$instance)){ self::$instance = new self; } self::$instance->start_session(); return self::$instance; } public function start_session(){ if($this->session_state == self::SESSION_NOT_STARTED){ $this->session_state = session_start(); } return $this->session_state; } public function __set($name,$value){ $_SESSION[$name] = $value; } public function __get($name){ if(isset($_SESSION[$name])){ return $_SESSION[$name]; } } public function __isset($name){ return isset($_SESSION[$name]); } public function __unsset($name){ unset($_SESSION[$name]); } public function destroy(){ if($this->session_state == self::SESSION_STARTED){ $this->session_state = !session_destroy(); unset($_SESSION); return !$this->session_state; } return false; } }

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version
Visual web development tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.