Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: Explain the 'static' keyword in PHP.
Answer: The 'static' keyword is used to declare static methods and properties. Static methods can be called without creating an instance of the class.

Example:

class MathUtility {
 public static function add($a, $b) {
 return $a + $b;
 } 
}
Is it helpful? Yes No

Most helpful rated by users:

©2026 WithoutBook