php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #8406 example given raises php4 warning about use of &$errno and &$errstr
Submitted: 2000-12-24 12:19 UTC Modified: 2001-01-03 15:16 UTC
From: alan at frostick dot de Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.4 OS: win32
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alan at frostick dot de
New email:
PHP Version: OS:

 

 [2000-12-24 12:19 UTC] alan at frostick dot de
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-03 15:16 UTC] jmoore@php.net
Fixed in CVS (DOesnt behave like this any more in php4 & documents have been changed),

thanks

James
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Jun 16 12:00:02 2026 UTC