skip to Main Content

PHP 8.1 DOMDocument serialization – PHP Versions

I'm trying to make the following class compatible with native PHP serialization, specifically when running on PHP 8.1. class SerializableDomDocument extends DOMDocument { private $xmlData; public function __sleep(): array { $this->xmlData = $this->saveXML(); return ['xmlData']; } public function __wakeup(): void…

VIEW QUESTION
Back To Top
Search