Skip to content

Commit 8170967

Browse files
committed
Condense the system commands into fewer slides, focusing on what they return and good use cases. Fixes #5
1 parent 16a76a1 commit 8170967

File tree

8 files changed

+32
-96
lines changed

8 files changed

+32
-96
lines changed

slides/exec.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

slides/list.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,8 @@
3535
"argc.md",
3636
"args.md",
3737
"system-commands.md",
38-
"exec.md",
39-
"shell_exec.md",
40-
"shell_exec2.md",
41-
"system.md",
42-
"passthru.md",
38+
"system-commands2.md",
39+
"system-commands3.md",
4340
"escaping-shell-commands.md",
4441
"escapeshellcmd.md",
4542
"escaping-arguments.md",

slides/passthru.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

slides/shell_exec.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

slides/shell_exec2.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

slides/system-commands2.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#### Executing System Commands
2+
3+
<dl>
4+
<dt class="fragment" data-fragment-index="0"><code>exec()</code></dt>
5+
<dd class="fragment" data-fragment-index="0">Returns the last line of output as a string.</dd>
6+
<dt class="fragment" data-fragment-index="1"><code>shell_exec()</code></dt>
7+
<dd class="fragment" data-fragment-index="1">returns <strong>full</strong> output as a string.</dd>
8+
<dd class="fragment" data-fragment-index="2">Can also be represented using the backtick operator:
9+
<pre><code class="lang-php">\`ls -al` === shell_exec('ls -al')</code></pre>
10+
</dd>
11+
</dl>
12+
13+
14+
Note:
15+
16+
If you require multiple lines of output, use shell_exec()

slides/system-commands3.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#### (Even More) System Commands
2+
3+
<dl>
4+
<dt class="fragment" data-fragment-index="0"><code>system()</code></dt>
5+
<dd class="fragment" data-fragment-index="0">Flush the output buffer after each line</dd>
6+
<dt class="fragment" data-fragment-index="1"><code>passthru()</code></dt>
7+
<dd class="fragment" data-fragment-index="1">Returns the raw output.</dd>
8+
<dd class="fragment" data-fragment-index="2">Great for working with binary files or interactive output</dd>
9+
</dl>
10+
11+
12+
Note:
13+
14+
If you require multiple lines of output, use shell_exec()

slides/system.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)