search

Home  >  Q&A  >  body text

What is the scope of the properties of an object?

For example: The properties of the object are not declared with var in front. Is it global or local? Or is it scope-agnostic?

phpcn_u2566phpcn_u25662711 days ago1542

reply all(2)I'll reply

  • nearest

    nearest2017-07-25 11:41:58

    Var can be omitted in php, it has nothing to do with global and local matters

    reply
    0
  • 蝎子

    蝎子2017-07-24 10:52:31

    If you don’t add var, it will default to var. Generally, it will be declared, which is more standardized

    reply
    0
  • Cancelreply