1<?php
2
3function simple_function() {
4 echo "Hello";
5}
6
7function function_with_args($a, $b) {
8 return $a + $b;
9}
10
11class MyClass {
12 public function myMethod() {
13 echo "Method";
14 }
15
16 protected static function protectedStaticMethod() {
17 // ...
18 }
19}
20
21const GLOBAL_CONST = 1;
22
23class AnotherClass {
24 const CLASS_CONST = 2;
25}
26
27interface MyInterface {
28 public function interfaceMethod();
29}