Skip to content

Commit bc61056

Browse files
committed
Merge pull request #10 from salathe/patch-1
Small grammar changes
2 parents f55acc4 + 3bac20c commit bc61056

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

tutorials/intro.md

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
Getting Started with phpdbg
1+
Getting started with phpdbg
22
===========================
33
*An introduction to debugging PHP code with phpdbg*
44

55
phpdbg provides an interactive environment to debug PHP; it is implemented and distributed as a SAPI module - just as the CLI interface.
66

77
![Welcome to phpdbg](https://raw.github.com/krakjoe/phpdbg/master/tutorials/welcome.png)
88

9-
phpdbg integrates with, and initializes the Zend environment; from the moment the console is open you can start to manipulate the environment in order to prepare your debugging session. phpdbg may feel familiar to other debuggers, but now is a good time to ask for help:
9+
phpdbg integrates with, and initializes, the Zend environment; from the moment the console is open you can start to manipulate the environment in order to prepare your debugging session. If you have used other debuggers, phpdbg should hopefully feel familiar, but you can always ask for `help`:
1010

1111
![phpdbg help menu](https://raw.github.com/krakjoe/phpdbg/master/tutorials/help.png)
1212

13-
phpdbg provides detailed help for all of the supported commands (that are not really obvious).
13+
phpdbg provides help for all of the supported commands.
1414

15-
Breaking Execution
15+
Breaking execution
1616
==================
1717
*Telling phpdbg when to stop ...*
1818

19-
In order to debug your code, execution must be interrupted at a very specific points during execution, and allow access to, and inspection of, the execution environment. For extreme circumstances, and geeks (me included), phpdbg can step through the execution of your script, showing you information about every opcode the vm executes, including the address (in case you need to break at that specific point on the next execution).
19+
In order to debug your code, execution must be interrupted at very specific points during execution, and allow access to, and inspection of, the execution environment. phpdbg can step through the execution of your script, showing you information about every opcode the VM executes, including the address (in case you need to break at that specific point on the next execution).
2020

21-
phpdbg provides many options for specifying breakpoints, as illustrated by a screenshot of the help menu for the break command:
21+
phpdbg provides many options for specifying breakpoints:
2222

2323
![phpdbg help menu](https://raw.github.com/krakjoe/phpdbg/master/tutorials/help-break.png)
2424

25-
In those cases where you wish to program your breakpoints in userland, phpdbg includes a userland API, in the shape of two simple functions:
25+
phpdbg also includes a userland API to enable working with breakpoints from within your PHP code:
2626

2727
```php
2828
/**
@@ -41,17 +41,17 @@ proto void phpdbg_break(void);
4141
proto void phpdbg_clear(void);
4242
```
4343

44-
Inspecting the Environment
44+
Inspecting the environment
4545
==========================
4646
*Finding out what went wrong*
4747

48-
When a breakpoint is reached, control is passed back to the phpdbg console (you!), execution will not continue until the *next* command is issued, a breakpoint being reached looks something like:
48+
When a breakpoint is reached, control is passed back to the phpdbg console, execution will not continue until the *next* command is issued, a breakpoint being reached looks something like:
4949

5050
![phpdbg broken](https://raw.github.com/krakjoe/phpdbg/master/tutorials/show-broken.png)
5151

52-
Now is the time to get down to some serious evil(), er, I mean eval()
52+
Now is the time to get down to some serious `evil()`, er, I mean `eval()`.
5353

54-
Direct access to eval allows you to change _anything_ at _any_ time during execution. Helpful printing and listing commands help you to make sense of addresses and remind you of the names of the variables you want to var_dump !!
54+
Direct access to `eval()` allows you to change _anything_ at _any_ time during execution. Helpful printing and listing commands help you to make sense of addresses and remind you of the names of the variables you want to `var_dump()`!
5555

5656
Library code for this section:
5757

@@ -67,37 +67,38 @@ class phpdbg {
6767

6868
$dbg = new phpdbg();
6969

70-
var_dump(
71-
$dbg->isGreat("PHP Rocks !!"));
70+
var_dump($dbg->isGreat("PHP Rocks !!"));
7271
?>
7372
```
7473

75-
Being Precise
74+
Being precise
7675
=============
7776
*Don't be sloppy, ever ... true story*
7877

79-
Actually the ability to break at function entry, or even on a single statement, is not always exact enough. A single statement may be many opcodes, and it could be any of those instructions that are ruining your day. So, phpdbg allows you to specify an exact opcode address, and provides the ability to view the instructions of any method or function before execution occurs.
78+
The ability to break at function entry, or even on a single statement, is not always exact enough. A single statement may have many opcodes and it could be any of those instructions that are ruining your day. phpdbg allows you to specify an exact opcode address and provides the ability to view the instructions of any method or function before execution occurs.
8079

81-
Looking up addresses is made easy by the *print* command
80+
Looking up addresses is made easy by the `print` command
8281

8382
![phpdbg verbose](https://raw.github.com/krakjoe/phpdbg/master/tutorials/show-printing.png)
8483

85-
For simple scripts, like the library code in the last section, and times when you want as much verboseness as possible, the following might be an option:
84+
For simple scripts, like the library code in the last section, and times when you want as much detail as possible, the `quiet` flag can be changed to `0` (default is `1`):
8685

8786
![phpdbg verbose](https://raw.github.com/krakjoe/phpdbg/master/tutorials/show-verbose.png)
8887

89-
Mocking a Server
88+
Mocking a server
9089
================
91-
*One sentence, seriously!*
90+
*Mocking is easy!*
9291

93-
Mocking a specific environment is childs play, simply include a bootstrap file before you run, or have your code include it, an example of such a file can be found in the repository:
92+
Mocking a specific environment is child's play; simply include a bootstrap file before you run, or have your code include it.
93+
94+
An example of such a file can be found in the repository:
9495

9596
https://github.com/krakjoe/phpdbg/blob/master/web-bootstrap.php
9697

97-
Advice You Can Keep !!
98-
======================
99-
*The reason for all the images ...*
98+
Advice you can keep
99+
===================
100+
*The reason for all the images...*
100101

101-
The best thing about this tutorial is you take all the help with you when you install phpdbg ... don't be afraid to ask for help :)
102+
The best thing about this tutorial is you take all of the help with you when you install phpdbg. Don't be afraid to ask for `help`! :)
102103

103-
Happy phping :)
104+
Happy PHPing. :)

0 commit comments

Comments
 (0)