|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13477 gethostbyname() result broken if used same variable as argument
Submitted: 2001-09-28 06:45 UTC Modified: 2001-09-28 08:01 UTC
From: khimich at ukr dot net Assigned:
Status: Closed Package: Network related
PHP Version: 4.0CVS-2001-09-28 OS: FreeBSD 4.3
Private report: No CVE-ID: None
 [2001-09-28 06:45 UTC] khimich at ukr dot net
This expression returns corrupted value:


This variant is good:


Even this:

Return two corrupted values for $temp and $host

Oleg Khimich.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-28 07:02 UTC]
I could not reproduce this with PHP 4.0.3/OpenBSD, PHP 4.0.6/Linux, PHP 4.0.7RC2/Linux or latest CVS/Linux...

Can you please post the whole script, and possible can you show us the failing script on a webserver?

 [2001-09-28 07:46 UTC]
Also tried it on php 4.0.8dev on FreeBSD 4.3. Works fine too.

 [2001-09-28 08:01 UTC] khimich at ukr dot net
Seems that I can't reproduce this on simple scripts too.
I've stable errors on my complex site. This script uses two nested functions with includes. In one include I'm used gethostname() and it broke my variable.

So, I'm closing this bug, because I can't reproduce all of my code.

Oleg Khimich.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 02 07:03:34 2021 UTC