Difference of using static between java and PHP? -


in java i read, static function can only be accessed Static Function or Fixed Variables . I was trying to figure out the difference between using PHP in Java and static.

  1. Is this also in PHP ?
  2. Can we call non-static work inside static work , PHP

    Can we call nonstandard work in PHP within phased work?

    Yes, but no advice was given. As $ this keyword will not be available under static context, however, you can use the static / manually but The result is strict standard notice

    strict standards: non-static method A :: foo () should not be called statically

    Not so good!

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -