How to force to work curl and simple html dom together?

Wrote a script that sends a request to the site with cookies set, returning a page.
$ch = curl_init();
$opt = array(CURLOPT_URL => 'http://someurl.ru/somepath',
 CURLOPT_COOKIE => 'count=1000',
 CURLOPT_RETURNTRANSFER => true,
);
curl_setopt_array($ch, $options);
$out = curl_exec($ch);
echo $out;
curl_close($ch);

The code works and gives the page as needed.
As soon as I put a library Simple Html Dom.
<?php
include 'shd.php';
$ch = curl_init();
$opt = array(CURLOPT_URL =--> 'http://someurl.ru/somepath',
 CURLOPT_COOKIE => 'count=1000',
 CURLOPT_RETURNTRANSFER => true,
);
curl_setopt_array($ch, $opt);
$out = curl_exec($ch);
echo $out;
curl_close($ch);
?>

The code simply returns Null.
July 2nd 19 at 13:42
2 answers
July 2nd 19 at 13:44
Solution
When removed the argument in the function curl_close script output page. But only 1 time. Next time he writes an error that there is no argument in the same curl_close.
How it works for me nepostezhimo.
UPD:
Edited
if (!curl_close) curl_close($ch);
include 'shd.php';
$ch = curl_init();
$opt = array(CURLOPT_URL => 'http://xn--80ablbvkadq0m.xn--p1ai/katalog/mebel-dlya-barov-kafe-restoranov',
 CURLOPT_COOKIE => 'count=1000',
 CURLOPT_RETURNTRANSFER => true,
);
curl_setopt_array($ch, $opt);
$out = curl_exec($ch);
$html = new simple
curl_close($ch);

The beginning of work. If someone will explain what I did - I would be glad, thanks.
UPD2: it was in the interpreter. Had to upgrade php.(in my case to switch to the newer openserver)
July 2nd 19 at 13:46
Turn on at the beginning of the file error output
error_reporting(E_ALL); 
ini_set("display_errors", 1);

and show what you have there is not working.
No errors. Empty. Nothing is displayed, neither in the console nor on the page. - Juana.Reilly85 commented on July 2nd 19 at 13:49

Find more questions by tags PHPHTMLWeb Development