From:             
Operating system: Ubuntu 10.04
PHP version:      5.3.2
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:PHP doesn't allow to have function named "goto"

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 bug report at http://bugs.php.net/bug.php?id=51962&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51962&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51962&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=51962&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51962&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51962&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51962&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51962&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51962&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51962&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51962&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51962&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51962&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51962&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51962&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51962&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51962&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51962&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51962&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51962&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51962&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51962&r=mysqlcfg

Reply via email to