I'm coming from a J2EE development environment, and by there, I used a Servlet context to hold all the website meta data (title, description ...) for the whole application (some kind of a session for the application when running) as my meta data are retrieved from Database. In PHP, the context is different, we don't deploy or explode a jar or a war file, so for this, instead of asking the database in every page loading, what kind of holder can I use ? (To make it simpler, it will be like a file holding specific little data that will be changed RARELY, like the title of site, and the status of the file (filled or not))
In PHP there is two way to hold data.
Cookies. Depending about your application choose your mechanism. You can't use the theory of JAVA in PHP. These two are different language and different process to use. The way you can use JAVA is not same for PHP and vise versa.
I don't know from which programming language background you are, but if you learn more about Sessions and Cookies then see the details below links.
There has been some development with event loops in PHP, mainly ReactPHP, that kind of work like Node.js, by loading an environment, running an application (during the setup you may load data which you know will be the same throughout the entire application lifecycle) and then reacting accordingly on various programmer-defined inputs.
The problem with PHP is, it is meant to die. Do not be scared if you are a PHP developer, this has nothing to do with PHP as a technology, but rather the application lifecycle. PHP does not have the most advanced garbage collector - please be aware that this may change in the future or perhaps has already changed with the PHP7 version, which I haven't worked a lot with just yet - and ends up taking a lot of RAM because of it, if you do not terminate the app after each request (that's how most PHP applications work). That's why it is meant to die, to dump all the variables knowing none of them will be needed, because separate request has its separate variables.
As Avishake mentioned, you may cache some of the data to the superglobal
$_SESSION variable, which is usually available per server, meaning multiple requests have access to the same session. You may lazy load data from the database and then access it from the session. However the performance increase in this case will probably be miniscule.
If what you are after is sharing state among requests, then yes, the
$_SESSION variable is a great and very simple tool, but if you want to go through the hassle of caching title and description, you should probably profile your entire application instead and you are very likely to find out, the main bottleneck will be somewhere else and not the single
SELECT retrieving the title and description data.