Re: Call-time pass-by-reference ??
| From: | M. Sokolewicz | Date: | Thu, 27 Jan 2005 09:38:38 +0000 |
| Subject: | Re: Call-time pass-by-reference ?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207456@lists.php.net to get a copy of this message | ||
Michael Gale wrote:
Hello,the phpI am trying to start a small php ncurses app but the documenatation is not helping.What does the following mean: PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of ncurses_getmaxyx(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/michael/gsmenu/gsmenu on line 10 Here is my code: #!/usr/local/bin/php <?php $y=0; $x=0; $ncurses_session = ncurses_init(); $main = ncurses_newwin(0,0,0,0); ncurses_getmaxyx (&$main,$y,$x ); ncurses_border(1,1,1,1, 1,1,1,1); ncurses_wrefresh($main); ncurses_end(); ?> If I remove the "&" from main nothing happens at all, the warning doesn't disappear?
documentation says that the variables should be passed from reference. yes, but that should be done implicitly, not explictly. Thus, the definition of the ncurses_getmaxyx function should contain that in its definition (which it does AFAIK).
Any help would be appreciated. Michael.