prob. with function parameter with "&"
| From: | Mirek Novak | Date: | Tue, 12 Aug 2003 17:06:03 +0000 |
| Subject: | prob. with function parameter with "&" | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-159299@lists.php.net to get a copy of this message | ||
Hi everybody,
I have defined function
function func ($var,$val,&$struct){
// do something
}
if I call this function following way
func('a','b',NULL);
(because sometimes I don't need to set $struct)
apache process (php) crashes without saying word into log...
So, is it bug or feature.
in fact 'func' is method of class and when it's called via :: it uses $struct otherwise not
php is compiled into httpd
apache is 1.3.27
info of my php follows
PHP Version 4.3.2
'./configure' '--with-config-file-path=/net/etc/conf' '--with-apache=../apache' '--enable-sockets' '--enable-ftp' '--with-freetype-dir=/usr' '--with-mysql=/usr' '--enable-gd-native-ttf' '--with-gd' '--enable-exif' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib' '--enable-inline-optimization' '--enable-sysvsem' '--enable-sysvshm' '--with-xpm-dir=/usr' '--enable-dbx'
PHP API 20020918
PHP Extension 20020429
EXT: ... ionCube PHP Accelerator v1.3.3r2, Copyright (c) 2001-2002, by Nick Lindridge
BTW: it would be perfect to have function overloading ...
--
Mirek Novak
jabberID: mirek@njs.netlab.cz
ICQ: 119499448