Skip to content

Commit c4a1eb9

Browse files
committed
Clarify hello world instructions
1 parent 8800750 commit c4a1eb9

File tree

3 files changed

+70
-47
lines changed

3 files changed

+70
-47
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"require" : {
1515
"php" : ">=5.6",
1616
"ext-pdo_sqlite": "*",
17-
"php-school/php-workshop": "^0.5",
17+
"php-school/php-workshop": "^1.1",
1818
"hoa/socket": "^1.0",
1919
"php-school/workshop-installer": "^0.1"
2020
},

composer.lock

Lines changed: 48 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exercises/hello-world/problem/problem.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,33 @@ To make a PHP program, create a new file with a `.php` extension and start writi
1010
$ php program.php
1111
```
1212

13-
You can write to the console like so:
13+
You can write to the console from a PHP program with the following code:
1414

1515
```php
1616
<?php
1717
echo "text";
1818
```
1919

20-
When you are done, you must run:
20+
The first line tells the PHP to interpret the code following it. It is required before any PHP code is written. Read more here: [http://php.net/manual/en/language.basic-syntax.phptags.php]()
21+
The second line is the instruction to print out some text.
22+
23+
Place the code in to a text file using your favourite text editor, some popular editors are listed below:
24+
25+
* Sublime Text: [https://www.sublimetext.com/]()
26+
* Atom: [https://atom.io/]()
27+
28+
Switch back to the terminal and run your code again with the same command as above:
29+
30+
```sh
31+
$ php program.php
32+
```
33+
34+
You should see the word "text" printed out on the console.
35+
36+
Now you must adapt the code to pass the challenge presented. Remember the challenge was: Write a program that prints the text "Hello World" to the console (stdout).
37+
38+
39+
When you have finished and saved the file you must run the following (substituting program.php to the name of the file you created which contains your code)
2140

2241
```sh
2342
$ {appname} verify program.php

0 commit comments

Comments
 (0)