PHP: Deprecated session_is_registered and session_unregister

Today i found in a older website i administrate some messages in the Apache error logfiles.

They looked like this:

PHP Deprecated: Function session_is_registered() is deprecated
PHP Deprecated: Function session_unregister() is deprecated

I searched the web and found this replacement code:

array_key_exists($variable, $_SESSION);



I hope this might help someone.

Do not use isset() here, because it might be wrong!
PHP - Benchmark isset() or array_key_exists() ?

No related posts.


Die Kommentarfunktion zu diesem Beitrag wurde deaktiviert.