• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

PHP 8 - libxml_disable_entity_loader() has been deprecated. How do I replace the functionality it provides?

phpdeprecation-warning


PHP Snippet 1:

...
$current = @libxml_disable_entity_loader(false);
$domdocument->load($filename,$options);
@libxml_disable_entity_loader($current);
...

PHP Snippet 2:

...
$domdocument->loadXML(file_get_contents($filename),$options);
...

Related Snippets

Converting alphabet letter to alphabet position in PHP [duplicate]

How to edit Records using CodeIgniter

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

curl returning 301 error after migrating to https

printing all running session variable in laravel 5.1

Laravel Delete and Update

PHP if in_array() how to get the key as well?

How to extract price from given url using Xpath?

Inserting data into SQL Server Db An Invalid direction was specified

Symfony - EasyAdmin - Add and remove functions are ignored from AssociationField

How to get the ID of the link in another page in php

Laravel Excel::store file empty after stored

How do I enable error reporting in Laravel?

Star rating with half star support

Wordpress 'post_type_link' hides permalink

About Contact Privacy policy Terms and conditions