Skip to content

Commit f62f6dc

Browse files
committed
Restructure examples to ease getting started
1 parent 9736f25 commit f62f6dc

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ install:
4646

4747
script:
4848
- vendor/bin/phpunit --coverage-text
49-
- time php examples/benchmark-throughput.php
49+
- time php examples/91-benchmark-throughput.php
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// This simple example only accepts an optional host parameter to send the
99
// request to.
1010
//
11-
// $ php examples/http.php
12-
// $ php examples/http.php reactphp.org
11+
// $ php examples/01-http.php
12+
// $ php examples/01-http.php reactphp.org
1313

1414
use React\EventLoop\Factory;
1515
use React\Stream\DuplexResourceStream;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// This simple example only accepts an optional host parameter to send the
99
// request to.
1010
//
11-
// $ php examples/https.php
12-
// $ php examples/https.php reactphp.org
11+
// $ php examples/02-https.php
12+
// $ php examples/02-https.php reactphp.org
1313

1414
use React\EventLoop\Factory;
1515
use React\Stream\DuplexResourceStream;

examples/cat.php renamed to examples/11-cat.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
// This allows you to output everything you type on your keyboard or to redirect
55
// the pipes to show contents of files and other streams.
66
//
7-
// $ php examples/cat.php
8-
// $ php examples/cat.php < README.md
9-
// $ echo hello | php examples/cat.php
7+
// $ php examples/11-cat.php
8+
// $ php examples/11-cat.php < README.md
9+
// $ echo hello | php examples/11-cat.php
1010

1111
use React\EventLoop\Factory;
1212
use React\Stream\ReadableResourceStream;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
// This example accepts a number of parameters to control the timeout (-t 1),
88
// the input file (-i /dev/zero) and the output file (-o /dev/null).
99
//
10-
// $ php examples/benchmark-throughput.php
11-
// $ php examples/benchmark-throughput.php -t 10 -o zero.bin
12-
// $ php examples/benchmark-throughput.php -t 60 -i zero.bin
10+
// $ php examples/91-benchmark-throughput.php
11+
// $ php examples/91-benchmark-throughput.php -t 10 -o zero.bin
12+
// $ php examples/91-benchmark-throughput.php -t 60 -i zero.bin
1313

1414
require __DIR__ . '/../vendor/autoload.php';
1515

0 commit comments

Comments
 (0)