note 128620 added to yaf-session.set
| From: | phpdeveloper at mail dot com | Date: | Sat, 17 Jun 2023 06:46:17 +0000 |
| Subject: | note 128620 added to yaf-session.set | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220578@lists.php.net to get a copy of this message | ||
When adding a value to a session you can use the __set to get it done.
<?php
$session = new Session();
$session->userid = 'my user id';
class Session {
public function __set($key, $value) {
$_SESSION[$key] = $value;
}
}
?>
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.13.130 (proxied: 50.226.253.190)
----
Manual Page -- https://php.net/manual/en/yaf-session.set.php
Edit -- https://main.php.net/note/edit/128620
Del: integrated -- https://main.php.net/note/delete/128620/integrated
Del: useless -- https://main.php.net/note/delete/128620/useless
Del: bad code -- https://main.php.net/note/delete/128620/bad+code
Del: spam -- https://main.php.net/note/delete/128620/spam
Del: non-english -- https://main.php.net/note/delete/128620/non-english
Del: in docs -- https://main.php.net/note/delete/128620/in+docs
Del: other reasons-- https://main.php.net/note/delete/128620
Reject -- https://main.php.net/note/reject/128620
Search -- https://main.php.net/manage/user-notes.php