update page now
Laravel Live Japan

Voting

: max(nine, four)?
(Example: nine)

The Note You're Voting On

navarr at gtaero dot net
15 years ago
If you want to make it work more naturally for arrays $obj->variable[] etc you'll need to return __get by reference.
<?php
class Variables
{
 public function __construct()
 {
 if(session_id() === "")
 {
 session_start();
 }
 }
 public function __set($name,$value)
 {
 $_SESSION["Variables"][$name] = $value;
 }
 public function &__get($name)
 {
 return $_SESSION["Variables"][$name];
 }
 public function __isset($name)
 {
 return isset($_SESSION["Variables"][$name]);
 }
}
?>

<< Back to user notes page

AltStyle によって変換されたページ (->オリジナル) /