ID: 47966 Comment by: dba at csis dot dk Reported By: dba at csis dot dk Status: Open Bug Type: cURL related Operating System: Windows XP SP3 PHP Version: 6CVS-2009-04-14 (snap) New Comment:
correction on commented line 14: // Notice: Undefined index: url in D:\home\main\tools\test\index.php on line 14 Previous Comments: ------------------------------------------------------------------------ [2009-04-14 11:23:20] dba at csis dot dk Description: ------------ can't call array from $curl_getinfo['xxx'] but will output on var_dump() and var_export() --- phpinfo() System Windows NT DBA-XP-UK 5.1 build 2600 (Windows XP Professional Service Pack 3) i586 Build Date Apr 14 2009 00:27:29 Compiler MSVC6 (Visual C++ 6.0) Server API Apache 2.0 Handler Apache Version Apache/2.2.11 (Win32) PHP/6.0.0-dev Reproduce code: --------------- <?php error_reporting (E_ALL); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.php.net/"); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $curl_data = curl_exec($ch); $curl_getinfo = curl_getinfo($ch); print "<pre>".var_export($curl_getinfo, true)."</pre>"; print "curl_getinfo['url']: ".$curl_getinfo['url']."<br>"; // Notice: Undefined index: url in D:\home\main\tools\test\index.php on line 19 curl_close($ch); ?> Expected result: ---------------- output from var_export($curl_getinfo) AND output from print $curl_getinfo['url'] Actual result: -------------- only gets output from var_export($curl_getinfo)... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47966&edit=1