How are persistent database connections stored in PHP?

As stated in the sqlite_popen documentation, php is trying to use a persistent resource mechanism. Where is this mechanism described in detail? Can I view all the resources that are currently stored / used? Is it possible to access this mechanism and store / read other values?

+4
source share
1 answer

sqlite_popen uses the persistent_list global hash table (executor) to store the connection resource. This hash table is not part of the php "instance" that executes your script, but from the php "runtime", which means that it is not cleared / deleted after the script is executed, but stored in memory until php.so/.dll /fastcgi.exe.
You cannot access the EG (persistent_list) from a php script, but any php module / extension can.

+6
source

Source: https://habr.com/ru/post/1286264/


All Articles