php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54115 Wrong example results for chown function
Submitted: 2011-02-28 10:07 UTC Modified: 2011-02-28 11:19 UTC
From: shein@php.net Assigned: shein (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Ubuntu Linux 10.10 i386
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: shein@php.net
New email:
PHP Version: OS:

 

 [2011-02-28 10:07 UTC] shein@php.net
Description:
------------
---
From manual page: http://www.php.net/function.chown#Examples
---
If chown worked correctly there should be info about root user and not about 
php.net user. Also output is more like var_dump() one than print_r().

Expected result:
----------------
Array
(
    [name] => root
    [passwd] => x
    [uid] => 0
    [gid] => 0
    [gecos] => root
    [dir] => /root
    [shell] => /bin/bash
)


Actual result:
--------------
array(7) {
  ["name"]=>
  string(13) "php.net"
  ["passwd"]=>
  string(1) "x"
  ["uid"]=>
  int(148864)
  ["gid"]=>
  int(148910)
  ["gecos"]=>
  string(13) "php.net"
  ["dir"]=>
  string(25) "/home/sites/php.net"
  ["shell"]=>
  string(13) "/sbin/nologin"
}

Patches

chown-example (last revision 2011-02-28 09:08 UTC by shein@php.net)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-28 10:08 UTC] shein@php.net
The following patch has been added/updated:

Patch Name: chown-example
Revision:   1298884098
URL:        http://bugs.php.net/patch-display.php?bug=54115&patch=chown-example&revision=1298884098
 [2011-02-28 11:16 UTC] shein@php.net
Automatic comment from SVN on behalf of shein
Revision: http://svn.php.net/viewvc/?view=revision&revision=308757
Log: Updated example results in chown function (closes #54115).
 [2011-02-28 11:19 UTC] shein@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: shein
 [2011-02-28 11:19 UTC] shein@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 02:00:01 2026 UTC