Re: php manual location of class definition syntax?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 30, 2015 at 2:09 AM, Jeffry Killen <jekillen@xxxxxxxxxxx> wrote:

> I am having trouble with the online manual, finding section on class
> definition syntax.
>
> specifically, I am looking for where to place key words like 'extends' and
> 'final'
>


No problem, this particular page was easier to find using Google than the
website's navigation (for me at least.)
http://php.net/manual/en/language.oop5.final.php



>
> I am working on a class that I don't want to allow extension. But when I
> place the key word final
> like so:
>
> class someClass final
>          {
>          }
>
> I get a syntax error.  I thought that was supposed to be the place to put
> those key words.
>
>
You can, but you have to place the final keyword at the beginning of the
class or method declaration.

Have a great day!

Adam

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux