hello_world
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| hello_world [2020/11/14 15:06] – sahl | hello_world [2023/11/18 08:46] (current) – sahl | ||
|---|---|---|---|
| Line 15: | Line 15: | ||
| Therefore if you need to say Hello World, just ask PHP to say Hello World. I won't get in your way with a complex framework. | Therefore if you need to say Hello World, just ask PHP to say Hello World. I won't get in your way with a complex framework. | ||
| + | |||
| + | Buuut if you want to utilize the framework, you could also do this: | ||
| + | |||
| + | <code php> | ||
| + | <?php | ||
| + | class HelloWorldComponent extends Component { | ||
| + | function renderContent() { | ||
| + | echo "Hello World"; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | $hello_world_component = new HelloWorldComponent(); | ||
| + | Page:: | ||
| + | $hello_world_component-> | ||
| + | Page:: | ||
| + | </ | ||
| + | |||
| + | A little more complex, but still easy to comprehend. | ||
hello_world.txt · Last modified: 2023/11/18 08:46 by sahl