Skip to content

Commit 80f3c69

Browse files
royopapetk
authored andcommitted
Updated visual text elements using markdown
1 parent 47c5fa0 commit 80f3c69

File tree

4 files changed

+25
-34
lines changed

4 files changed

+25
-34
lines changed

docs/input-filter.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Input Filter Support in PHP 5
2-
-----------------------------
1+
# Input Filter Support in PHP 5
32

43
XSS (Cross Site Scripting) hacks are becoming more and more prevalent,
54
and can be quite difficult to prevent. Whenever you accept user data
@@ -21,6 +20,7 @@ $_POST, $_GET and $_COOKIE arrays are only populated with stripped
2120
data. In this simple example all I am doing is calling strip_tags() on
2221
the data.
2322

23+
```
2424
ZEND_BEGIN_MODULE_GLOBALS(my_input_filter)
2525
zval *post_array;
2626
zval *get_array;
@@ -180,3 +180,4 @@ PHP_FUNCTION(my_get_raw)
180180
RETVAL_FALSE;
181181
}
182182
}
183+
```

docs/mailinglist-rules.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
====================
2-
Mailinglist Rules
3-
====================
1+
# Mailinglist Rules
42

53
This is the first file you should be reading before doing any posts on PHP
64
mailinglists. Following these rules is considered imperative to the success of

docs/self-contained-extensions.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
HOW TO CREATE A SELF-CONTAINED PHP EXTENSION
1+
# HOW TO CREATE A SELF-CONTAINED PHP EXTENSION
22

33
A self-contained extension can be distributed independently of
44
the PHP source. To create such an extension, two things are
@@ -10,7 +10,7 @@ HOW TO CREATE A SELF-CONTAINED PHP EXTENSION
1010
We will describe now how to create these and how to put things
1111
together.
1212

13-
PREPARING YOUR SYSTEM
13+
## PREPARING YOUR SYSTEM
1414

1515
While the result will run on any system, a developer's setup needs these
1616
tools:
@@ -23,7 +23,7 @@ PREPARING YOUR SYSTEM
2323

2424
ftp://ftp.gnu.org/pub/gnu/
2525

26-
CONVERTING AN EXISTING EXTENSION
26+
## CONVERTING AN EXISTING EXTENSION
2727

2828
Just to show you how easy it is to create a self-contained
2929
extension, we will convert an embedded extension into a
@@ -56,7 +56,7 @@ CONVERTING AN EXISTING EXTENSION
5656
library or the MySQL installation in MYSQL-DIR.
5757

5858

59-
DEFINING THE NEW EXTENSION
59+
## DEFINING THE NEW EXTENSION
6060

6161
Our demo extension is called "foobar".
6262

@@ -72,13 +72,13 @@ DEFINING THE NEW EXTENSION
7272
LTLIBRARY_SOURCES specifies the names of the sources files. You can
7373
name an arbitrary number of source files here.
7474

75-
CREATING THE M4 CONFIGURATION FILE
75+
## CREATING THE M4 CONFIGURATION FILE
7676

7777
The m4 configuration can perform additional checks. For a
7878
self-contained extension, you do not need more than a few
7979
macro calls.
8080

81-
------------------------------------------------------------------------------
81+
```
8282
PHP_ARG_ENABLE([foobar],
8383
[whether to enable foobar],
8484
[AS_HELP_STRING([--enable-foobar],
@@ -87,7 +87,7 @@ PHP_ARG_ENABLE([foobar],
8787
if test "$PHP_FOOBAR" != "no"; then
8888
PHP_NEW_EXTENSION(foobar, foo.c bar.c, $ext_shared)
8989
fi
90-
------------------------------------------------------------------------------
90+
```
9191

9292
PHP_ARG_ENABLE will automatically set the correct variables, so
9393
that the extension will be enabled by PHP_NEW_EXTENSION in shared mode.
@@ -100,7 +100,7 @@ fi
100100
plan to distribute your module with PHP, these facilities allow you
101101
to integrate your module easily into the main PHP module framework.
102102

103-
CREATING SOURCE FILES
103+
## CREATING SOURCE FILES
104104

105105
ext_skel can be of great help when creating the common code for all modules
106106
in PHP for you and also writing basic function definitions and C code for
@@ -111,7 +111,7 @@ CREATING SOURCE FILES
111111
modules, use a simple module as a starting point and add your own code.
112112

113113

114-
CREATING THE SELF-CONTAINED EXTENSION
114+
## CREATING THE SELF-CONTAINED EXTENSION
115115

116116
Put config.m4 and the source files into one directory. Then, run phpize
117117
(this is installed during make install by PHP 4.0).
@@ -125,15 +125,15 @@ CREATING THE SELF-CONTAINED EXTENSION
125125

126126
And that's it. You now have a self-contained extension.
127127

128-
INSTALLING A SELF-CONTAINED EXTENSION
128+
## INSTALLING A SELF-CONTAINED EXTENSION
129129

130130
An extension can be installed by running:
131131

132132
$ ./configure \
133133
[--with-php-config=/path/to/php-config]
134134
$ make install
135135

136-
ADDING SHARED MODULE SUPPORT TO A MODULE
136+
## ADDING SHARED MODULE SUPPORT TO A MODULE
137137

138138
In order to be useful, a self-contained extension must be loadable
139139
as a shared module. I will explain now how you can add shared module
@@ -148,11 +148,13 @@ ADDING SHARED MODULE SUPPORT TO A MODULE
148148

149149
3. Add the following lines to your C source file:
150150

151+
```
151152
#ifdef COMPILE_DL_FOO
152153
ZEND_GET_MODULE(foo)
153154
#endif
155+
```
154156

155-
PECL SITE CONFORMITY
157+
## PECL SITE CONFORMITY
156158

157159
If you plan to release an extension to the PECL website, there are several
158160
points to be regarded.

docs/unix-build-system.md

+7-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PHP Build System V5 Overview
1+
# PHP Build System V5 Overview
22

33
- supports Makefile.ins during transition phase
44
- not-really-portable Makefile includes have been eliminated
@@ -21,28 +21,21 @@ PHP Build System V5 Overview
2121
- upgraded shtool to 1.5.4
2222
- removed $(moduledir) (use EXTENSION_DIR)
2323

24-
The Reason For a New System
24+
## The Reason For a New System
2525

2626
It became more and more apparent that there is a severe need
2727
for addressing the portability concerns and improving the chance
2828
that your build is correct (how often have you been told to
2929
"make clean"? When this is done, you won't need to anymore).
3030

31-
32-
If You Build PHP on a Unix System
33-
31+
## If You Build PHP on a Unix System
3432

3533
You, as a user of PHP, will notice no changes. Of course, the build
3634
system will be faster, look better and work smarter.
3735

36+
## If You Are Developing PHP
3837

39-
40-
If You Are Developing PHP
41-
42-
43-
44-
45-
Extension developers:
38+
### Extension developers:
4639

4740
Makefile.ins are abandoned. The files which are to be compiled
4841
are specified in the config.m4 now using the following macro:
@@ -95,8 +88,7 @@ change the working directory anymore, we must use either
9588
absolute paths or relative ones to the top build-directory.
9689
Correct prefixing ensures that.
9790

98-
99-
SAPI developers:
91+
### SAPI developers:
10092

10193
Instead of using PHP_SAPI=foo/PHP_BUILD_XYZ, you will need to type
10294

@@ -110,9 +102,7 @@ For example for APXS:
110102

111103
PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php7.c php_apache.c)
112104

113-
114-
115-
General info
105+
## General info
116106

117107
The foundation for the new system is the flexible handling of
118108
sources and their contexts. With the help of macros you

0 commit comments

Comments
 (0)