Skip to content

Commit 66b4c58

Browse files
committed
Update docs
1 parent 6f104da commit 66b4c58

File tree

3 files changed

+137
-97
lines changed

3 files changed

+137
-97
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 93 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -143,99 +143,99 @@ you end up with a large monolithic repository consisting of C source code files,
143143
PHP tests and other associated files:
144144

145145
```sh
146-
<php-src>/
147-
β”œβ”€ .git/ # Git configuration and source directory
148-
β”œβ”€ benchmark/ # Benchmark some common applications in CI
149-
β”œβ”€ build/ # *nix build system files
150-
β”œβ”€ docs/ # PHP internals documentation
151-
└─ ext/ # PHP core extensions
152-
└─ bcmath/ # The bcmath PHP extension
153-
β”œβ”€ libbcmath/ # The bcmath library forked and maintained in php-src
154-
β”œβ”€ tests/ # *.phpt test files for extension
155-
β”œβ”€ bcmath.stub.php # A stub file for the bcmath extension functions
156-
└─ ...
157-
└─ curl/ # The curl PHP extension
158-
β”œβ”€ sync-constants.php # The curl symbols checker
159-
└─ ...
160-
└─ date/ # The date/time PHP extension
161-
└─ lib/ # Bundled datetime library https://github.com/derickr/timelib
162-
└─ ...
163-
└─ ...
164-
β”œβ”€ dl_test/ # Extension for testing dl()
165-
└─ dom/
166-
β”œβ”€ lexbor/ # https://github.com/lexbor/lexbor
167-
└─ ...
168-
└─ ffi/ # The FFI PHP extension
169-
β”œβ”€ ffi_parser.c # Generated by https://github.com/dstogov/llk
170-
└─ ...
171-
└─ fileinfo/ # The fileinfo PHP extension
172-
β”œβ”€ libmagic/ # Modified libmagic https://github.com/file/file
173-
β”œβ”€ data_file.c # Generated by `ext/fileinfo/create_data_file.php`
174-
β”œβ”€ libmagic.patch # Modifications patch from upstream libmagic
175-
β”œβ”€ magicdata.patch # Modifications patch from upstream libmagic
176-
└─ ...
177-
└─ gd/ # The GD PHP extension
178-
β”œβ”€ libgd/ # Bundled and modified GD library https://github.com/libgd/libgd
179-
└─ ...
180-
└─ mbstring/ # The Multibyte string PHP extension
181-
β”œβ”€ libmbfl/ # Forked and maintained in php-src
182-
β”œβ”€ unicode_data.h # Generated by `ext/mbstring/ucgendat/ucgendat.php`
183-
└─ ...
184-
└─ opcache/ # The OPcache PHP extension
185-
└─ jit/ # OPcache Jit
186-
└─ ir/ # Bundled part of IR framework https://github.com/dstogov/ir
187-
└─ dynasm/ # DynASM encoding engine
188-
β”œβ”€ minilua.c # Customized Lua scripting language to build LuaJIT
189-
└─ ...
190-
β”œβ”€ gen_ir_fold_hash # IR folding engine generator created at build
191-
β”œβ”€ ir_emit_<arch>.h # IR folding engine rules generated by minilua
192-
β”œβ”€ minilua # Executable tool created at build
193-
└─ ...
194-
└─ pcre/ # The PCRE PHP extension
195-
β”œβ”€ pcre2lib/ # https://www.pcre.org/
196-
└─ ...
197-
β”œβ”€ skeleton/ # Skeleton for new extensions using `ext/ext_skel.php`
198-
└─ standard/ # Always enabled core extension
199-
└─ html_tables/
200-
β”œβ”€ mappings/ # https://www.unicode.org/Public/MAPPINGS/
201-
└─ ...
202-
β”œβ”€ credits_ext.h # Generated by `scripts/dev/credits`
203-
β”œβ”€ credits_sapi.h # Generated by `scripts/dev/credits`
204-
β”œβ”€ html_tables.h # Generated by `ext/standard/html_tables/html_table_gen.php`
205-
└─ ...
206-
└─ tokenizer/ # The tokenizer PHP extension
207-
β”œβ”€ tokenizer_data.c # Generated by `ext/tokenizer/tokenizer_data_gen.php`
208-
β”œβ”€ tokenizer_data_stub.php # Generated by `ext/tokenizer/tokenizer_data_gen.php`
209-
└─ ...
210-
└─ zend_test # For testing internal APIs. Not needed for regular builds
211-
└─ ...
212-
└─ zip/ # Bundled https://github.com/pierrejoye/php_zip
213-
└─ ...
214-
β”œβ”€ ...
215-
└─ ext_skel.php # Helper script that creates a new PHP extension
216-
└─ main/ # Binding that ties extensions, SAPIs, Zend engine and TSRM together
217-
β”œβ”€ streams/ # Streams layer subsystem
218-
└─ ...
219-
β”œβ”€ modules/ # Shared libraries, created when building PHP
220-
β”œβ”€ pear/ # PEAR installation
221-
└─ sapi/ # PHP SAPI (Server API) modules
222-
└─ cli/ # Command-line PHP SAPI module
223-
β”œβ”€ mime_type_map.h # Generated by `sapi/cli/generate_mime_type_map.php`
224-
└─ ...
225-
└─ ...
226-
β”œβ”€ scripts/ # php-config, phpize and internal development scripts
227-
β”œβ”€ tests/ # Core features tests
228-
β”œβ”€ TSRM/ # Thread safe resource manager
229-
└─ Zend/ # Zend engine
230-
β”œβ”€ asm/ # Bundled from src/asm in https://github.com/boostorg/context
231-
β”œβ”€ Optimizer/ # For faster PHP execution through opcode caching and optimization
232-
β”œβ”€ tests/ # PHP tests *.phpt files for Zend engine
233-
β”œβ”€ zend_vm_execute.h # Generated by `Zend/zend_vm_gen.php`
234-
β”œβ”€ zend_vm_opcodes.c # Generated by `Zend/zend_vm_gen.php`
235-
β”œβ”€ zend_vm_opcodes.h # Generated by `Zend/zend_vm_gen.php`
236-
└─ ...
237-
β”œβ”€ win32/ # Windows build files
238-
└─ ...
146+
πŸ— <php-src>
147+
β”œβ”€πŸ— .git # Git configuration and source directory
148+
β”œβ”€πŸ— benchmark # Benchmark some common applications in CI
149+
β”œβ”€πŸ— build # *nix build system files
150+
β”œβ”€πŸ— docs # PHP internals documentation
151+
β””β”€πŸ— ext # PHP core extensions
152+
β””β”€πŸ— bcmath # The bcmath PHP extension
153+
β”œβ”€πŸ— libbcmath # The bcmath library forked and maintained in php-src
154+
β”œβ”€πŸ— tests # *.phpt test files for extension
155+
β”œβ”€πŸ“„ bcmath.stub.php # A stub file for the bcmath extension functions
156+
β””β”€πŸ“„ ...
157+
β””β”€πŸ— curl # The curl PHP extension
158+
β”œβ”€πŸ“„ sync-constants.php # The curl symbols checker
159+
β””β”€πŸ“„ ...
160+
β””β”€πŸ— date # The date/time PHP extension
161+
β””β”€πŸ— lib # Bundled datetime library https://github.com/derickr/timelib
162+
β””β”€πŸ“„ ...
163+
β””β”€πŸ“„ ...
164+
β”œβ”€πŸ— dl_test # Extension for testing dl()
165+
β””β”€πŸ— dom
166+
β”œβ”€πŸ— lexbor # https://github.com/lexbor/lexbor
167+
β””β”€πŸ“„ ...
168+
β””β”€πŸ— ffi # The FFI PHP extension
169+
β”œβ”€πŸ“„ ffi_parser.c # Generated by https://github.com/dstogov/llk
170+
β””β”€πŸ“„ ...
171+
β””β”€πŸ— fileinfo # The fileinfo PHP extension
172+
β”œβ”€πŸ— libmagic # Modified libmagic https://github.com/file/file
173+
β”œβ”€πŸ“„ data_file.c # Generated by `ext/fileinfo/create_data_file.php`
174+
β”œβ”€πŸ“„ libmagic.patch # Modifications patch from upstream libmagic
175+
β”œβ”€πŸ“„ magicdata.patch # Modifications patch from upstream libmagic
176+
β””β”€πŸ“„ ...
177+
β””β”€πŸ— gd # The GD PHP extension
178+
β”œβ”€πŸ— libgd # Bundled and modified GD library https://github.com/libgd/libgd
179+
β””β”€πŸ“„ ...
180+
β””β”€πŸ— mbstring # The Multibyte string PHP extension
181+
β”œβ”€πŸ— libmbfl # Forked and maintained in php-src
182+
β”œβ”€πŸ“„ unicode_data.h # Generated by `ext/mbstring/ucgendat/ucgendat.php`
183+
β””β”€πŸ“„ ...
184+
β””β”€πŸ— opcache # The OPcache PHP extension
185+
β””β”€πŸ— jit # OPcache Jit
186+
β””β”€πŸ— ir # Bundled part of IR framework https://github.com/dstogov/ir
187+
β””β”€πŸ— dynasm # DynASM encoding engine
188+
β”œβ”€πŸ“„ minilua.c # Customized Lua scripting language to build LuaJIT
189+
β””β”€πŸ“„ ...
190+
β”œβ”€πŸ“„ gen_ir_fold_hash # IR folding engine generator created at build
191+
β”œβ”€πŸ“„ ir_emit_<arch>.h # IR folding engine rules generated by minilua
192+
β”œβ”€πŸ“„ minilua # Executable tool created at build
193+
β””β”€πŸ“„ ...
194+
β””β”€πŸ— pcre # The PCRE PHP extension
195+
β”œβ”€πŸ— pcre2lib # https://www.pcre.org/
196+
β””β”€πŸ“„ ...
197+
β”œβ”€πŸ— skeleton # Skeleton for new extensions using `ext/ext_skel.php`
198+
β””β”€πŸ— standard # Always enabled core extension
199+
β””β”€πŸ— html_tables
200+
β”œβ”€πŸ— mappings # https://www.unicode.org/Public/MAPPINGS/
201+
β””β”€πŸ“„ ...
202+
β”œβ”€πŸ“„ credits_ext.h # Generated by `scripts/dev/credits`
203+
β”œβ”€πŸ“„ credits_sapi.h # Generated by `scripts/dev/credits`
204+
β”œβ”€πŸ“„ html_tables.h # Generated by `ext/standard/html_tables/html_table_gen.php`
205+
β””β”€πŸ“„ ...
206+
β””β”€πŸ— tokenizer # The tokenizer PHP extension
207+
β”œβ”€πŸ“„ tokenizer_data.c # Generated by `ext/tokenizer/tokenizer_data_gen.php`
208+
β”œβ”€πŸ“„ tokenizer_data_stub.php # Generated by `ext/tokenizer/tokenizer_data_gen.php`
209+
β””β”€πŸ“„ ...
210+
β””β”€πŸ— zend_test # For testing internal APIs. Not needed for regular builds
211+
β””β”€πŸ“„ ...
212+
β””β”€πŸ— zip/ # Bundled https://github.com/pierrejoye/php_zip
213+
β””β”€πŸ“„ ...
214+
β”œβ”€πŸ— ...
215+
β””β”€πŸ“„ ext_skel.php # Helper script that creates a new PHP extension
216+
β””β”€πŸ— main # Binding that ties extensions, SAPIs, Zend engine and TSRM together
217+
β”œβ”€πŸ— streams # Streams layer subsystem
218+
β””β”€πŸ“„ ...
219+
β”œβ”€πŸ— modules # Shared libraries, created when building PHP
220+
β”œβ”€πŸ— pear # PEAR installation
221+
β””β”€πŸ— sapi # PHP SAPI (Server API) modules
222+
β””β”€πŸ— cli # Command-line PHP SAPI module
223+
β”œβ”€πŸ“„ mime_type_map.h # Generated by `sapi/cli/generate_mime_type_map.php`
224+
β””β”€πŸ“„ ...
225+
β””β”€πŸ“„ ...
226+
β”œβ”€πŸ— scripts # php-config, phpize and internal development scripts
227+
β”œβ”€πŸ— tests # Core features tests
228+
β”œβ”€πŸ— TSRM # Thread safe resource manager
229+
β””β”€πŸ— Zend # Zend engine
230+
β”œβ”€πŸ— asm # Bundled from src/asm in https://github.com/boostorg/context
231+
β”œβ”€πŸ— Optimizer # For faster PHP execution through opcode caching and optimization
232+
β”œβ”€πŸ— tests # PHP tests *.phpt files for Zend engine
233+
β”œβ”€πŸ“„ zend_vm_execute.h # Generated by `Zend/zend_vm_gen.php`
234+
β”œβ”€πŸ“„ zend_vm_opcodes.c # Generated by `Zend/zend_vm_gen.php`
235+
β”œβ”€πŸ“„ zend_vm_opcodes.h # Generated by `Zend/zend_vm_gen.php`
236+
β””β”€πŸ“„ ...
237+
β”œβ”€πŸ— win32 # Windows build files
238+
β””β”€πŸ“„ ...
239239
```
240240

241241
## Why CMake?

β€Ždocs/differences.mdβ€Ž

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ build system:
3737
* Better cross-compiling support with CMake toolchain files and ability to set
3838
the cross-compiling emulator.
3939
40-
* The installation include directory (`/usr/local/include/php`) can be adjusted
41-
with `PHP_INCLUDE_PREFIX` variable to support multiple PHP versions. For
42-
example, `/usr/local/include/php/8.4`.
43-
4440
## Behavior
4541
4642
* sapi/phpdbg readline support works more intuitively regardless of the readline
@@ -83,6 +79,16 @@ build system:
8379
* ext/bcmath (Windows: enabled, Autotools: disabled, CMake: disabled)
8480
* ext/calendar (Windows: enabled, Autotools: disabled, CMake: disabled)
8581

82+
* Installation
83+
84+
* The installation include directory (`/usr/local/include/php`) can be
85+
adjusted with the `PHP_INCLUDE_PREFIX` variable to support multiple PHP
86+
versions. For example, `/usr/local/include/php/8.4`.
87+
88+
* The PHP Autotools layout configuration option `--with-layout=[PHP|GNU]` is
89+
in CMake removed and not implemented in favor of the GNU standard directory
90+
layout.
91+
8692
## Bugs fixed
8793

8894
* Building inside folder with spaces.

β€Ždocs/php-installation.mdβ€Ž

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,40 @@ Common practice is to also add program prefix and suffix (for example, to have
173173

174174
See `./configure --help` for more information on how to adjust these locations.
175175

176+
PHP Autotools directory structure with GNU layout:
177+
178+
```sh
179+
πŸ— <INSTALL_ROOT> # πŸ—
180+
β””β”€πŸ— ${prefix} # β””β”€πŸ— /usr/local/include
181+
β”œβ”€πŸ— ${bindir} # β”œβ”€πŸ— bin
182+
β””β”€πŸ— ${sysconfdir} # β””β”€πŸ— etc
183+
β”œβ”€πŸ— php-fpm.d # β”œβ”€πŸ— php-fpm.d
184+
β”œβ”€πŸ“„ php-fpm.conf.default # β”œβ”€πŸ“„ php-fpm.conf.default
185+
β””β”€πŸ“„ pear.conf # β””β”€πŸ“„ pear.conf
186+
β””β”€πŸ— ${includedir} # β””β”€πŸ— include
187+
β””β”€πŸ— php # β””β”€πŸ— php
188+
β”œβ”€πŸ— ext # β”œβ”€πŸ— ext
189+
β”œβ”€πŸ— main # β”œβ”€πŸ— main
190+
β”œβ”€πŸ— sapi # β”œβ”€πŸ— sapi
191+
β”œβ”€πŸ— TSRM # β”œβ”€πŸ— TSRM
192+
β””β”€πŸ— Zend # β””β”€πŸ— Zend
193+
β””β”€πŸ— ${libdir} # β””β”€πŸ— lib
194+
β””β”€πŸ— php # β””β”€πŸ— php
195+
β”œβ”€πŸ— 20230901-zts-debug # β”œβ”€πŸ— 20230901-zts-debug
196+
β””β”€πŸ— build # β””β”€πŸ— build
197+
β”œβ”€πŸ— ${sbindir} # β”œβ”€πŸ— sbin
198+
β””β”€πŸ— ${datarootdir} # β””β”€πŸ— share
199+
β””β”€πŸ— ${mandir} # β””β”€πŸ— man
200+
β”œβ”€πŸ— man1 # β””β”€πŸ— man1
201+
β””β”€πŸ— man8 # β””β”€πŸ— man8
202+
β”œβ”€πŸ— pear # β””β”€πŸ— pear
203+
β””β”€πŸ— php # β””β”€πŸ— php
204+
β””β”€πŸ— fpm # β””β”€πŸ— fpm
205+
β””β”€πŸ— ${localstatedir} # β””β”€πŸ— var
206+
β””β”€πŸ— log # β””β”€πŸ— log
207+
β””β”€πŸ— ${runstatedir} # β””β”€πŸ— var/run
208+
```
209+
176210
## Installing PHP with CMake
177211

178212
In this repository, installing PHP with CMake can be done in a similar way:

0 commit comments

Comments
Β (0)