Req #33068 [Opn->Bgs]: Function declarations outside class struct

From: Date: Wed, 22 Dec 2010 02:41:07 +0000
Subject: Req #33068 [Opn->Bgs]: Function declarations outside class struct
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-157203@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=33068&edit=1 ID: 33068 Updated by: johannes@php.net Reported by: john dot kraal at rse dot nl Summary: Function declarations outside class struct -Status: Open +Status: Bogus Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: Any PHP Version: 5.0.4 Block user comment: N Private report: N New Comment: In C++ you'd have to add the declaration to the class and the separation is needed for properly separating the implementation from the interface. In PHP a more java-like approach was chosen. Previous Comments: ------------------------------------------------------------------------ [2005-05-19 17:08:51] john dot kraal at rse dot nl changed my email. ------------------------------------------------------------------------ [2005-05-19 17:07:19] john dot kraal at rse dot nl Description: ------------ It would be nice to have a C++ Style function declaration for classes like this: class example { var $blah; function __construct() { $this->blah = 'test'; } } function example::returnBlah() { return $this->blah; } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=33068&edit=1

« previous php.bugs (#157203) next »