Skip to content

Commit

Permalink
Create & instantiate a class in PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
markshust committed Jul 15, 2022
1 parent 007e894 commit ffea7a1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions classes/Author.php
@@ -0,0 +1,6 @@
<?php declare(strict_types=1);

class Author
{

}
4 changes: 4 additions & 0 deletions functions.php
@@ -1,7 +1,11 @@
<?php declare(strict_types=1);

require('classes/Author.php');

function getPosts(): array
{
$author = new Author();

return [
[
'title' => 'How to learn PHP',
Expand Down

0 comments on commit ffea7a1

Please sign in to comment.