php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38460 Unable to declare 'list' method
Submitted: 2006-08-15 06:29 UTC Modified: 2006-08-15 06:52 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ddk at krasn dot ru Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.1.4 OS: Irrelevant
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: ddk at krasn dot ru
New email:
PHP Version: OS:

 

 [2006-08-15 06:29 UTC] ddk at krasn dot ru
Description:
------------
Declaring 'list' method in class leads to parse error.

Reproduce code:
---------------
<?php

class foo {

	function list() {
		echo "I'm list function!\n";
	}

}

$o = new foo;
$o->list();

?>

Expected result:
----------------
I'm list function!

Actual result:
--------------
Parse error: parse error, unexpected T_LIST, expecting T_STRING in list.php on line 5


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-15 06:52 UTC] tony2001@php.net
list() is a language construct.
http://php.net/list
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Dec 06 13:00:02 2025 UTC