i have tried to use Endroid/QrCode library but when i insert the code to my custom template page gives me an internal server error 500 and displays a blank white page.
include WP_CONTENT_DIR .'/qrcode/src/QrCode.php';
use Endroid\QrCode\QrCode;
$qr = new QrCode();
$qr -> setText("Llalala")
-> setSize(200)
-> render();
If i comment out this line $qr = new QrCode();
than my page will load. Thank you in advance.