diff --git a/src/Smalot/PdfParser/PDFObject.php b/src/Smalot/PdfParser/PDFObject.php index 378ae15d..3b0e72cd 100644 --- a/src/Smalot/PdfParser/PDFObject.php +++ b/src/Smalot/PdfParser/PDFObject.php @@ -1210,6 +1210,6 @@ public static function factory( */ protected function getUniqueId(): string { - return spl_object_hash($this); + return \PHP_VERSION_ID < 70200 ? \spl_object_hash($this) : (string) \spl_object_id($this); } }