| 1 | <?php |
||
| 16 | class FunctionDemo |
||
| 17 | { |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Some array transformer |
||
| 21 | * |
||
| 22 | * @param array $data Incoming array |
||
| 23 | * |
||
| 24 | * @return array|mixed Outcoming array |
||
| 25 | */ |
||
| 26 | public function testArrayFunctions(array $data = []) |
||
| 27 | { |
||
| 28 | return array_flip(array_unique(array_values($data))); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Outputs a file content |
||
| 33 | */ |
||
| 34 | public function testFileContent() |
||
| 35 | { |
||
| 36 | echo '<pre>', htmlspecialchars(file_get_contents(__FILE__)), '</pre>'; |
||
| 37 | } |
||
| 38 | } |
||
| 39 |