[PHP-DEV] PHP 4.0 Bug #8408: example given raises php4 warning about use of &$errno and &$errstr From: alan <email protected>
Date: 12/24/00

From: alan <email protected>
Operating system: win32
PHP version: 4.0.4
PHP Bug Type: Documentation problem
Bug description: example given raises php4 warning about use of &$errno and &$errstr

1
  2 $fp = fsockopen("www.php.net", 80, &$errno, &$errstr, 30);
  3 if(!$fp) {
  4 echo "$errstr ($errno)<br>\n";
  5 } else {
  6 fputs($fp,"GET / HTTP/1.0\n\n");
  7 while(!feof($fp)) {
  8 echo fgets($fp,128);
  9 }
 10 fclose($fp);
 11 }
 12

Message resulted:
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in c:\data\internet\kernel\import\socket.php3 on line 2

-- 
Edit Bug report at: http://bugs.php.net/?id=8408&edit=1

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>