RE: [PHP-DOC] Proposal to remove void from protos

From: Date: Tue, 21 Nov 2006 11:31:23 +0000
Subject: RE: [PHP-DOC] Proposal to remove void from protos
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969374437@lists.php.net to get a copy of this message
> -----Original Message----- > From: Jakub Vrana [mailto:vrana@php.net] > Sent: Tuesday, November 21, 2006 9:54 AM > To: phpdoc@lists.php.net > Subject: [PHP-DOC] Proposal to remove void from protos > > Hello! > > Would you agree with removal of the word "void" in > methodsynpsis both from return type and parameters list? > > I propose to change the return type to "null" which it really > is and remove it completely from parameters list as it is the > way to declare that function doesn't accept any parameters in > user-defined functions. > > New synopsis would be: null debug_print_backtrace() instead > of: void debug_print_backtrace(void) > > Jakub Vrana > I think that makes sense, as there is no VOID type in PHP. If I <?php var_dump(debug_print_backtrace()); ?> I get NULL not VOID. So, even though there are several -1's for this, for PHP userland, void is wrong. There is no void. Either there should be a void type (which has the meaning of nothing, nada, zilch) as compared to NULL (which is data that is, as yet, undefined). Richard Quadling.

« previous php.doc (#969374437) next »