Jump to content

Assigning the Visibility of Methods


marcbraulio

Recommended Posts

I just have a quick question, what happens if I don't assign a visibility element to methods?

 

In other words, if I just have:

 

class Article_model

{

public $data;

 

function index()

{

return $data;

}

[code=php:0]

...instead of declaring public, private, static, and so on before the function. Will php just consider it public?

Link to comment
https://forums.phpfreaks.com/topic/258772-assigning-the-visibility-of-methods/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.