When a string literal is passed as the value of CURLOPT_CUSTOMREQUEST, the language server reports PHP0417 (Call to unknown function), as if the string were a callable name. CURLOPT_CUSTOMREQUEST takes an HTTP method string, so this is a false positive. Setting a custom request method is the standard way to send a PUT without a body.
It looks like the analyzer treats the third argument of curl_setopt() as a possible callback, probably because other options such as CURLOPT_WRITEFUNCTION take callables, and does not check which option constant is being set.
Minimal reproduction
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // PHP0417: Call to unknown function: 'PUT'
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); // no diagnostic
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); // PHP0417: Call to unknown function: 'POST'
Actual result
t.php:3 PHP0417 Call to unknown function: 'PUT'
t.php:5 PHP0417 Call to unknown function: 'POST'
The diagnostic points at the line of the curl_setopt() call.
Expected result
No diagnostic. The value of CURLOPT_CUSTOMREQUEST is a plain string and is never called as a function.