Bug #51962 [Opn->Bgs]: PHP doesn't allow to have function named "goto"
| From: | rasmus@php.net | Date: | Tue, 01 Jun 2010 07:13:00 +0000 |
| Subject: | Bug #51962 [Opn->Bgs]: PHP doesn't allow to have function named "goto" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150981@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51962&edit=1
ID: 51962
Updated by: rasmus@php.net
Reported by: jankkhvej at gmail dot com
Summary: PHP doesn't allow to have function named "goto"
-Status: Open
+Status: Bogus
Type: Bug
Package: Scripting Engine problem
Operating System: Ubuntu 10.04
PHP Version: 5.3.2
New Comment:
This should come as no surprise to you if you had read the migration
guide:
http://us.php.net/manual/en/migration53.incompatible.php
Previous Comments:
------------------------------------------------------------------------
[2010-06-01 08:55:46] jankkhvej at gmail dot com
Description:
------------
[...]
public function goto($page_num)
{
$this->page_num = $page_num;
}
[...]
gives that:
[Tue Jun 01 09:34:01 2010] [error] [client 127.0.1.1] PHP Parse error:
syntax error, unexpected T_GOTO, expecting T_STRING in
/workspace/project/web/lib/DataSourcePager.class.php on line 63
Test script:
---------------
<?php
class My_goto_test {
public function goto($str = null) {
echo $str;
}
}
$tezt = new My_goto_test;
$tezt->goto('hello!');
Expected result:
----------------
hello!
Actual result:
--------------
PHP Parse error: syntax error, unexpected T_GOTO, expecting T_STRING in
/home/solik/jjj/goto_test.php on line 3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51962&edit=1