- Broschiertes Buch
- Merkliste
- Auf die Merkliste
- Bewerten Bewerten
- Teilen
- Produkt teilen
- Produkterinnerung
- Produkterinnerung
Dive into web development with this comprehensive guide to PHP 8! Whether you're a beginner or an experienced developer, you'll find everything you need to build dynamic, secure websites. Walk through installing PHP, object-oriented programming, and working with databases like MySQL. Gain hands-on experience with detailed code and application examples to. Master advanced topics like debugging, automated testing, security, and more!
Highlights include: 1) Installation 2) Strings, arrays, and regular expressions 3) Mathematical and date functions 4) Web techniques 5) Databases 6)…mehr
Andere Kunden interessierten sich auch für
- Thomas TheisGetting Started with JavaScript30,99 €
- Sandip DholakiaModern Cryptography45,99 €
- Torsten T. WillC++54,99 €
- Kevin WelterKubernetes45,99 €
- Xingni ZhouComposite Data Structures and Modularization40,99 €
- Joel MurachMurach's PHP and MySQL (2nd Edition)62,99 €
- Brett D. McLaughlinPHP & Mysql: The Missing Manual31,99 €
-
-
-
Dive into web development with this comprehensive guide to PHP 8! Whether you're a beginner or an experienced developer, you'll find everything you need to build dynamic, secure websites. Walk through installing PHP, object-oriented programming, and working with databases like MySQL. Gain hands-on experience with detailed code and application examples to. Master advanced topics like debugging, automated testing, security, and more!
Highlights include:
1) Installation
2) Strings, arrays, and regular expressions
3) Mathematical and date functions
4) Web techniques
5) Databases
6) Object-oriented programming
7) Namespaces
8) Design patterns
9) XML, graphics, and PDFs
10) Administration and security
11) Debugging
12) Automated testing
Highlights include:
1) Installation
2) Strings, arrays, and regular expressions
3) Mathematical and date functions
4) Web techniques
5) Databases
6) Object-oriented programming
7) Namespaces
8) Design patterns
9) XML, graphics, and PDFs
10) Administration and security
11) Debugging
12) Automated testing
Produktdetails
- Produktdetails
- Verlag: Rheinwerk Computing / Rheinwerk Verlag
- Artikelnr. des Verlages: 459/22667
- Seitenzahl: 1005
- Erscheinungstermin: 6. August 2025
- Englisch
- Abmessung: 254mm x 178mm
- ISBN-13: 9781493226672
- ISBN-10: 1493226673
- Artikelnr.: 72077995
- Herstellerkennzeichnung
- Rheinwerk Verlag GmbH
- Rheinwerkallee 4
- 53227 Bonn
- Info@rheinwerk-verlag.de
- Verlag: Rheinwerk Computing / Rheinwerk Verlag
- Artikelnr. des Verlages: 459/22667
- Seitenzahl: 1005
- Erscheinungstermin: 6. August 2025
- Englisch
- Abmessung: 254mm x 178mm
- ISBN-13: 9781493226672
- ISBN-10: 1493226673
- Artikelnr.: 72077995
- Herstellerkennzeichnung
- Rheinwerk Verlag GmbH
- Rheinwerkallee 4
- 53227 Bonn
- Info@rheinwerk-verlag.de
... Preface ... 25
... Materials for the Book ... 25
... The Concept ... 26
... The Content ... 28
... About the PHP 8.3 Edition ... 29
... Support ... 30
PART I ... Preparations ... 31
1 ... Introduction to PHP ... 33
1.1 ... History of PHP ... 33
1.2 ... Success and Commitment ... 34
1.3 ... The Concept of PHP ... 36
1.4 ... The Most Important New Features in PHP 8 to 8.4 ... 37
1.5 ... The Most Important Features in PHP 7.3 ... 41
1.6 ... The Most Important Features in PHP 7 ... 42
1.7 ... The Most Important Features in PHP 5.4, 5.5, and 5.6 ... 43
1.8 ... Downloads and Documentation ... 44
2 ... Installation ... 45
2.1 ... Install PHP ... 45
2.2 ... PEAR ... 75
3 ... Testing and Help ... 79
3.1 ... Common Errors ... 79
3.2 ... Additional Resources ... 88
PART II ... Getting Started with PHP ... 91
4 ... PHP Language Basics ... 93
4.1 ... PHP in HTML ... 93
4.2 ... Output with PHP ... 99
4.3 ... Variables ... 101
4.4 ... Constants ... 112
5 ... Programming ... 113
5.1 ... Operators ... 113
5.2 ... Case Distinctions ... 135
5.3 ... Loops ... 149
5.4 ... Jumps ... 161
6 ... Functions and Language Constructs ... 163
6.1 ... Functions ... 163
6.2 ... Language Constructs ... 192
7 ... Strings ... 201
7.1 ... Connect ... 201
7.2 ... Splitting and Joining ... 202
7.3 ... Upper- and Lowercase ... 212
7.4 ... Pruning ... 214
7.5 ... Search and Replace ... 216
7.6 ... Special Characters, HTML, and the Like ... 223
7.7 ... Compare ... 231
7.8 ... Helpful and Useful Information ... 233
8 ... Arrays ... 239
8.1 ... Basics ... 239
8.2 ... Arrays and Loops ... 244
8.3 ... Examine ... 250
8.4 ... Transform ... 251
8.5 ... Search and Sort ... 259
8.6 ... Superglobal Arrays ... 261
9 ... Mathematical and Date Functions ... 267
9.1 ... Math ... 267
9.2 ... Date and Time ... 278
10 ... Regular Expressions ... 295
10.1 ... Basics ... 295
10.2 ... Functions for Regular Expressions ... 297
10.3 ... Application Examples ... 303
11 ... Object-Oriented Programming ... 307
11.1 ... History of Object Orientation in PHP ... 307
11.2 ... Classes and Objects: Basic Concepts ... 309
11.3 ... Advanced ... 320
11.4 ... Helpful and Useful Information ... 348
11.5 ... Namespaces ... 376
12 ... Design Patterns: MVC and Co. ... 385
12.1 ... Laminas ... 386
12.2 ... MVC ... 387
12.3 ... Adapter and Factory ... 394
PART III ... Web Techniques ... 399
13 ... Forms ... 401
13.1 ... Preparations ... 401
13.2 ... Forms with PHP ... 404
13.3 ... Form Validation ... 421
13.4 ... Prefill ... 434
13.5 ... File Uploads ... 444
13.6 ... Application Examples ... 448
13.7 ... Settings ... 455
14 ... Cookies ... 457
14.1 ... Preparations ... 457
14.2 ... Facts and Background ... 459
14.3 ... Working with Cookies in PHP ... 461
14.4 ... Cookie Test ... 476
14.5 ... Final Considerations ... 479
15 ... Sessions ... 481
15.1 ... Preparations ... 481
15.2 ... Facts, Background, and Configuration ... 482
15.3 ... Working with Sessions in PHP ... 486
15.4 ... Protected Area ... 491
15.5 ... Sessions in Databases ... 493
15.6 ... Security Concerns ... 501
16 ... Email ... 505
16.1 ... Preparations ... 505
16.2 ... Sending Mails with PHP ... 510
PART IV ... Databases ... 523
17 ... SQL ... 525
17.1 ... Create Databases and Tables ... 526
17.2 ... Enter Data ... 529
17.3 ... Query Data ... 530
17.4 ... Update Data ... 532
17.5 ... Delete Data ... 533
17.6 ... Special Features ... 534
18 ... PDO ... 541
18.1 ... Preparations ... 542
18.2 ... Database Access with PDO ... 544
18.3 ... Guestbook ... 550
19 ... MySQL ... 559
19.1 ... Preparations ... 559
19.2 ... Database Access with MySQL ... 566
19.3 ... Application Example ... 588
19.4 ... Settings ... 596
20 ... SQLite ... 599
20.1 ... Preparations ... 599
20.2 ... Database Access with SQLite ... 601
20.3 ... Application Example ... 613
21 ... Microsoft SQL Server ... 621
21.1 ... Preparations ... 621
21.2 ... Microsoft SQL Server Driver for PHP ... 623
21.3 ... Application Example ... 632
22 ... Oracle ... 641
22.1 ... Preparations ... 641
22.2 ... Database Access with Oracle ... 645
22.3 ... Application Example ... 654
23 ... PostgreSQL ... 661
23.1 ... Preparations ... 661
23.2 ... Database Access with PostgreSQL ... 664
23.3 ... Application Example ... 676
23.4 ... Settings ... 683
24 ... MongoDB ... 685
24.1 ... Preparations ... 685
24.2 ... Database Access with MongoDB ... 690
24.3 ... Application Example ... 697
24.4 ... Settings ... 704
PART V ... Communication ... 705
25 ... Files ... 707
25.1 ... Preparations ... 707
25.2 ... File Handling with PHP ... 708
25.3 ... Application Examples ... 718
25.4 ... Settings ... 725
26 ... HTTP and Beyond: Connections to the Outside World ... 727
26.1 ... Preparations ... 727
26.2 ... External Connection with PHP ... 727
26.3 ... Fibers ... 741
26.4 ... Application Examples ... 742
27 ... APIs and Services ... 747
27.1 ... Preparation ... 747
27.2 ... REST ... 754
27.3 ... nuSOAP ... 758
27.4 ... PHP-SOAP ... 765
28 ... JavaScript ... 771
28.1 ... Preparations ... 771
28.2 ... Connecting JavaScript with PHP ... 772
28.3 ... Ajax ... 777
28.4 ... WebSockets ... 782
PART VI ... Data Formats ... 789
29 ... XML ... 791
29.1 ... Preparations ... 791
29.2 ... XML Access ... 797
29.3 ... XMLReader and XMLWriter ... 814
29.4 ... EXIF ... 817
30 ... Graphics with PHP ... 823
30.1 ... Preparations ... 823
30.2 ... GD 2 in Action ... 824
30.3 ... The Alternatives ... 842
31 ... PDF with PHP ... 845
31.1 ... Preparation ... 846
31.2 ... TCPDF ... 847
31.3 ... FPDF ... 859
31.4 ... Conclusion ... 861
PART VII ... Administration and Security ... 863
32 ... Security ... 865
32.1 ... User Input ... 866
32.2 ... XSS ... 869
32.3 ... SQL Injection ... 874
32.4 ... Hidden Fields ... 876
32.5 ... Input Filter ... 878
32.6 ... Cross-Site Request Forgery ... 881
32.7 ... Screen Scraping and Captchas ... 886
32.8 ... Encrypt Passwords ... 891
33 ... Authentication ... 895
33.1 ... Apache Authentication ... 896
33.2 ... IIS Authentication ... 900
33.3 ... HTTP Authentication by Hand ... 901
33.4 ... Standards-Based Authentication ... 903
33.5 ... Conclusion ... 915
34 ... Configuration Options in php.ini ... 917
34.1 ... Where to Configure? ... 917
34.2 ... Configure What? ... 920
PART VIII ... Beyond PHP ... 929
35 ... Troubleshooting with Xdebug ... 931
35.1 ... Debugging by Hand ... 933
35.2 ... Debugging with Xdebug ... 935
35.3 ... Resolution ... 939
36 ... Unit Tests with PHPUnit ... 941
36.1 ... Unit Tests ... 941
36.2 ... Install PHPUnit ... 942
36.3 ... Testing with PHPUnit ... 943
37 ... Apache Functions ... 947
37.1 ... Preparations ... 947
37.2 ... Application Examples ... 948
38 ... Composer ... 955
38.1 ... Install Composer ... 955
38.2 ... Install Packages via Composer ... 957
38.3 ... Customize Your Own Code for Composer ... 961
39 ... PHP Extensions ... 965
39.1 ... Programming ... 966
39.2 ... Compile ... 971
39.3 ... Testing ... 974
40 ... Contribute to PHP ... 977
40.1 ... Patches for PHP ... 977
40.2 ... Further Options ... 983
... The Authors ... 985
... Index ... 987
... Materials for the Book ... 25
... The Concept ... 26
... The Content ... 28
... About the PHP 8.3 Edition ... 29
... Support ... 30
PART I ... Preparations ... 31
1 ... Introduction to PHP ... 33
1.1 ... History of PHP ... 33
1.2 ... Success and Commitment ... 34
1.3 ... The Concept of PHP ... 36
1.4 ... The Most Important New Features in PHP 8 to 8.4 ... 37
1.5 ... The Most Important Features in PHP 7.3 ... 41
1.6 ... The Most Important Features in PHP 7 ... 42
1.7 ... The Most Important Features in PHP 5.4, 5.5, and 5.6 ... 43
1.8 ... Downloads and Documentation ... 44
2 ... Installation ... 45
2.1 ... Install PHP ... 45
2.2 ... PEAR ... 75
3 ... Testing and Help ... 79
3.1 ... Common Errors ... 79
3.2 ... Additional Resources ... 88
PART II ... Getting Started with PHP ... 91
4 ... PHP Language Basics ... 93
4.1 ... PHP in HTML ... 93
4.2 ... Output with PHP ... 99
4.3 ... Variables ... 101
4.4 ... Constants ... 112
5 ... Programming ... 113
5.1 ... Operators ... 113
5.2 ... Case Distinctions ... 135
5.3 ... Loops ... 149
5.4 ... Jumps ... 161
6 ... Functions and Language Constructs ... 163
6.1 ... Functions ... 163
6.2 ... Language Constructs ... 192
7 ... Strings ... 201
7.1 ... Connect ... 201
7.2 ... Splitting and Joining ... 202
7.3 ... Upper- and Lowercase ... 212
7.4 ... Pruning ... 214
7.5 ... Search and Replace ... 216
7.6 ... Special Characters, HTML, and the Like ... 223
7.7 ... Compare ... 231
7.8 ... Helpful and Useful Information ... 233
8 ... Arrays ... 239
8.1 ... Basics ... 239
8.2 ... Arrays and Loops ... 244
8.3 ... Examine ... 250
8.4 ... Transform ... 251
8.5 ... Search and Sort ... 259
8.6 ... Superglobal Arrays ... 261
9 ... Mathematical and Date Functions ... 267
9.1 ... Math ... 267
9.2 ... Date and Time ... 278
10 ... Regular Expressions ... 295
10.1 ... Basics ... 295
10.2 ... Functions for Regular Expressions ... 297
10.3 ... Application Examples ... 303
11 ... Object-Oriented Programming ... 307
11.1 ... History of Object Orientation in PHP ... 307
11.2 ... Classes and Objects: Basic Concepts ... 309
11.3 ... Advanced ... 320
11.4 ... Helpful and Useful Information ... 348
11.5 ... Namespaces ... 376
12 ... Design Patterns: MVC and Co. ... 385
12.1 ... Laminas ... 386
12.2 ... MVC ... 387
12.3 ... Adapter and Factory ... 394
PART III ... Web Techniques ... 399
13 ... Forms ... 401
13.1 ... Preparations ... 401
13.2 ... Forms with PHP ... 404
13.3 ... Form Validation ... 421
13.4 ... Prefill ... 434
13.5 ... File Uploads ... 444
13.6 ... Application Examples ... 448
13.7 ... Settings ... 455
14 ... Cookies ... 457
14.1 ... Preparations ... 457
14.2 ... Facts and Background ... 459
14.3 ... Working with Cookies in PHP ... 461
14.4 ... Cookie Test ... 476
14.5 ... Final Considerations ... 479
15 ... Sessions ... 481
15.1 ... Preparations ... 481
15.2 ... Facts, Background, and Configuration ... 482
15.3 ... Working with Sessions in PHP ... 486
15.4 ... Protected Area ... 491
15.5 ... Sessions in Databases ... 493
15.6 ... Security Concerns ... 501
16 ... Email ... 505
16.1 ... Preparations ... 505
16.2 ... Sending Mails with PHP ... 510
PART IV ... Databases ... 523
17 ... SQL ... 525
17.1 ... Create Databases and Tables ... 526
17.2 ... Enter Data ... 529
17.3 ... Query Data ... 530
17.4 ... Update Data ... 532
17.5 ... Delete Data ... 533
17.6 ... Special Features ... 534
18 ... PDO ... 541
18.1 ... Preparations ... 542
18.2 ... Database Access with PDO ... 544
18.3 ... Guestbook ... 550
19 ... MySQL ... 559
19.1 ... Preparations ... 559
19.2 ... Database Access with MySQL ... 566
19.3 ... Application Example ... 588
19.4 ... Settings ... 596
20 ... SQLite ... 599
20.1 ... Preparations ... 599
20.2 ... Database Access with SQLite ... 601
20.3 ... Application Example ... 613
21 ... Microsoft SQL Server ... 621
21.1 ... Preparations ... 621
21.2 ... Microsoft SQL Server Driver for PHP ... 623
21.3 ... Application Example ... 632
22 ... Oracle ... 641
22.1 ... Preparations ... 641
22.2 ... Database Access with Oracle ... 645
22.3 ... Application Example ... 654
23 ... PostgreSQL ... 661
23.1 ... Preparations ... 661
23.2 ... Database Access with PostgreSQL ... 664
23.3 ... Application Example ... 676
23.4 ... Settings ... 683
24 ... MongoDB ... 685
24.1 ... Preparations ... 685
24.2 ... Database Access with MongoDB ... 690
24.3 ... Application Example ... 697
24.4 ... Settings ... 704
PART V ... Communication ... 705
25 ... Files ... 707
25.1 ... Preparations ... 707
25.2 ... File Handling with PHP ... 708
25.3 ... Application Examples ... 718
25.4 ... Settings ... 725
26 ... HTTP and Beyond: Connections to the Outside World ... 727
26.1 ... Preparations ... 727
26.2 ... External Connection with PHP ... 727
26.3 ... Fibers ... 741
26.4 ... Application Examples ... 742
27 ... APIs and Services ... 747
27.1 ... Preparation ... 747
27.2 ... REST ... 754
27.3 ... nuSOAP ... 758
27.4 ... PHP-SOAP ... 765
28 ... JavaScript ... 771
28.1 ... Preparations ... 771
28.2 ... Connecting JavaScript with PHP ... 772
28.3 ... Ajax ... 777
28.4 ... WebSockets ... 782
PART VI ... Data Formats ... 789
29 ... XML ... 791
29.1 ... Preparations ... 791
29.2 ... XML Access ... 797
29.3 ... XMLReader and XMLWriter ... 814
29.4 ... EXIF ... 817
30 ... Graphics with PHP ... 823
30.1 ... Preparations ... 823
30.2 ... GD 2 in Action ... 824
30.3 ... The Alternatives ... 842
31 ... PDF with PHP ... 845
31.1 ... Preparation ... 846
31.2 ... TCPDF ... 847
31.3 ... FPDF ... 859
31.4 ... Conclusion ... 861
PART VII ... Administration and Security ... 863
32 ... Security ... 865
32.1 ... User Input ... 866
32.2 ... XSS ... 869
32.3 ... SQL Injection ... 874
32.4 ... Hidden Fields ... 876
32.5 ... Input Filter ... 878
32.6 ... Cross-Site Request Forgery ... 881
32.7 ... Screen Scraping and Captchas ... 886
32.8 ... Encrypt Passwords ... 891
33 ... Authentication ... 895
33.1 ... Apache Authentication ... 896
33.2 ... IIS Authentication ... 900
33.3 ... HTTP Authentication by Hand ... 901
33.4 ... Standards-Based Authentication ... 903
33.5 ... Conclusion ... 915
34 ... Configuration Options in php.ini ... 917
34.1 ... Where to Configure? ... 917
34.2 ... Configure What? ... 920
PART VIII ... Beyond PHP ... 929
35 ... Troubleshooting with Xdebug ... 931
35.1 ... Debugging by Hand ... 933
35.2 ... Debugging with Xdebug ... 935
35.3 ... Resolution ... 939
36 ... Unit Tests with PHPUnit ... 941
36.1 ... Unit Tests ... 941
36.2 ... Install PHPUnit ... 942
36.3 ... Testing with PHPUnit ... 943
37 ... Apache Functions ... 947
37.1 ... Preparations ... 947
37.2 ... Application Examples ... 948
38 ... Composer ... 955
38.1 ... Install Composer ... 955
38.2 ... Install Packages via Composer ... 957
38.3 ... Customize Your Own Code for Composer ... 961
39 ... PHP Extensions ... 965
39.1 ... Programming ... 966
39.2 ... Compile ... 971
39.3 ... Testing ... 974
40 ... Contribute to PHP ... 977
40.1 ... Patches for PHP ... 977
40.2 ... Further Options ... 983
... The Authors ... 985
... Index ... 987
... Preface ... 25
... Materials for the Book ... 25
... The Concept ... 26
... The Content ... 28
... About the PHP 8.3 Edition ... 29
... Support ... 30
PART I ... Preparations ... 31
1 ... Introduction to PHP ... 33
1.1 ... History of PHP ... 33
1.2 ... Success and Commitment ... 34
1.3 ... The Concept of PHP ... 36
1.4 ... The Most Important New Features in PHP 8 to 8.4 ... 37
1.5 ... The Most Important Features in PHP 7.3 ... 41
1.6 ... The Most Important Features in PHP 7 ... 42
1.7 ... The Most Important Features in PHP 5.4, 5.5, and 5.6 ... 43
1.8 ... Downloads and Documentation ... 44
2 ... Installation ... 45
2.1 ... Install PHP ... 45
2.2 ... PEAR ... 75
3 ... Testing and Help ... 79
3.1 ... Common Errors ... 79
3.2 ... Additional Resources ... 88
PART II ... Getting Started with PHP ... 91
4 ... PHP Language Basics ... 93
4.1 ... PHP in HTML ... 93
4.2 ... Output with PHP ... 99
4.3 ... Variables ... 101
4.4 ... Constants ... 112
5 ... Programming ... 113
5.1 ... Operators ... 113
5.2 ... Case Distinctions ... 135
5.3 ... Loops ... 149
5.4 ... Jumps ... 161
6 ... Functions and Language Constructs ... 163
6.1 ... Functions ... 163
6.2 ... Language Constructs ... 192
7 ... Strings ... 201
7.1 ... Connect ... 201
7.2 ... Splitting and Joining ... 202
7.3 ... Upper- and Lowercase ... 212
7.4 ... Pruning ... 214
7.5 ... Search and Replace ... 216
7.6 ... Special Characters, HTML, and the Like ... 223
7.7 ... Compare ... 231
7.8 ... Helpful and Useful Information ... 233
8 ... Arrays ... 239
8.1 ... Basics ... 239
8.2 ... Arrays and Loops ... 244
8.3 ... Examine ... 250
8.4 ... Transform ... 251
8.5 ... Search and Sort ... 259
8.6 ... Superglobal Arrays ... 261
9 ... Mathematical and Date Functions ... 267
9.1 ... Math ... 267
9.2 ... Date and Time ... 278
10 ... Regular Expressions ... 295
10.1 ... Basics ... 295
10.2 ... Functions for Regular Expressions ... 297
10.3 ... Application Examples ... 303
11 ... Object-Oriented Programming ... 307
11.1 ... History of Object Orientation in PHP ... 307
11.2 ... Classes and Objects: Basic Concepts ... 309
11.3 ... Advanced ... 320
11.4 ... Helpful and Useful Information ... 348
11.5 ... Namespaces ... 376
12 ... Design Patterns: MVC and Co. ... 385
12.1 ... Laminas ... 386
12.2 ... MVC ... 387
12.3 ... Adapter and Factory ... 394
PART III ... Web Techniques ... 399
13 ... Forms ... 401
13.1 ... Preparations ... 401
13.2 ... Forms with PHP ... 404
13.3 ... Form Validation ... 421
13.4 ... Prefill ... 434
13.5 ... File Uploads ... 444
13.6 ... Application Examples ... 448
13.7 ... Settings ... 455
14 ... Cookies ... 457
14.1 ... Preparations ... 457
14.2 ... Facts and Background ... 459
14.3 ... Working with Cookies in PHP ... 461
14.4 ... Cookie Test ... 476
14.5 ... Final Considerations ... 479
15 ... Sessions ... 481
15.1 ... Preparations ... 481
15.2 ... Facts, Background, and Configuration ... 482
15.3 ... Working with Sessions in PHP ... 486
15.4 ... Protected Area ... 491
15.5 ... Sessions in Databases ... 493
15.6 ... Security Concerns ... 501
16 ... Email ... 505
16.1 ... Preparations ... 505
16.2 ... Sending Mails with PHP ... 510
PART IV ... Databases ... 523
17 ... SQL ... 525
17.1 ... Create Databases and Tables ... 526
17.2 ... Enter Data ... 529
17.3 ... Query Data ... 530
17.4 ... Update Data ... 532
17.5 ... Delete Data ... 533
17.6 ... Special Features ... 534
18 ... PDO ... 541
18.1 ... Preparations ... 542
18.2 ... Database Access with PDO ... 544
18.3 ... Guestbook ... 550
19 ... MySQL ... 559
19.1 ... Preparations ... 559
19.2 ... Database Access with MySQL ... 566
19.3 ... Application Example ... 588
19.4 ... Settings ... 596
20 ... SQLite ... 599
20.1 ... Preparations ... 599
20.2 ... Database Access with SQLite ... 601
20.3 ... Application Example ... 613
21 ... Microsoft SQL Server ... 621
21.1 ... Preparations ... 621
21.2 ... Microsoft SQL Server Driver for PHP ... 623
21.3 ... Application Example ... 632
22 ... Oracle ... 641
22.1 ... Preparations ... 641
22.2 ... Database Access with Oracle ... 645
22.3 ... Application Example ... 654
23 ... PostgreSQL ... 661
23.1 ... Preparations ... 661
23.2 ... Database Access with PostgreSQL ... 664
23.3 ... Application Example ... 676
23.4 ... Settings ... 683
24 ... MongoDB ... 685
24.1 ... Preparations ... 685
24.2 ... Database Access with MongoDB ... 690
24.3 ... Application Example ... 697
24.4 ... Settings ... 704
PART V ... Communication ... 705
25 ... Files ... 707
25.1 ... Preparations ... 707
25.2 ... File Handling with PHP ... 708
25.3 ... Application Examples ... 718
25.4 ... Settings ... 725
26 ... HTTP and Beyond: Connections to the Outside World ... 727
26.1 ... Preparations ... 727
26.2 ... External Connection with PHP ... 727
26.3 ... Fibers ... 741
26.4 ... Application Examples ... 742
27 ... APIs and Services ... 747
27.1 ... Preparation ... 747
27.2 ... REST ... 754
27.3 ... nuSOAP ... 758
27.4 ... PHP-SOAP ... 765
28 ... JavaScript ... 771
28.1 ... Preparations ... 771
28.2 ... Connecting JavaScript with PHP ... 772
28.3 ... Ajax ... 777
28.4 ... WebSockets ... 782
PART VI ... Data Formats ... 789
29 ... XML ... 791
29.1 ... Preparations ... 791
29.2 ... XML Access ... 797
29.3 ... XMLReader and XMLWriter ... 814
29.4 ... EXIF ... 817
30 ... Graphics with PHP ... 823
30.1 ... Preparations ... 823
30.2 ... GD 2 in Action ... 824
30.3 ... The Alternatives ... 842
31 ... PDF with PHP ... 845
31.1 ... Preparation ... 846
31.2 ... TCPDF ... 847
31.3 ... FPDF ... 859
31.4 ... Conclusion ... 861
PART VII ... Administration and Security ... 863
32 ... Security ... 865
32.1 ... User Input ... 866
32.2 ... XSS ... 869
32.3 ... SQL Injection ... 874
32.4 ... Hidden Fields ... 876
32.5 ... Input Filter ... 878
32.6 ... Cross-Site Request Forgery ... 881
32.7 ... Screen Scraping and Captchas ... 886
32.8 ... Encrypt Passwords ... 891
33 ... Authentication ... 895
33.1 ... Apache Authentication ... 896
33.2 ... IIS Authentication ... 900
33.3 ... HTTP Authentication by Hand ... 901
33.4 ... Standards-Based Authentication ... 903
33.5 ... Conclusion ... 915
34 ... Configuration Options in php.ini ... 917
34.1 ... Where to Configure? ... 917
34.2 ... Configure What? ... 920
PART VIII ... Beyond PHP ... 929
35 ... Troubleshooting with Xdebug ... 931
35.1 ... Debugging by Hand ... 933
35.2 ... Debugging with Xdebug ... 935
35.3 ... Resolution ... 939
36 ... Unit Tests with PHPUnit ... 941
36.1 ... Unit Tests ... 941
36.2 ... Install PHPUnit ... 942
36.3 ... Testing with PHPUnit ... 943
37 ... Apache Functions ... 947
37.1 ... Preparations ... 947
37.2 ... Application Examples ... 948
38 ... Composer ... 955
38.1 ... Install Composer ... 955
38.2 ... Install Packages via Composer ... 957
38.3 ... Customize Your Own Code for Composer ... 961
39 ... PHP Extensions ... 965
39.1 ... Programming ... 966
39.2 ... Compile ... 971
39.3 ... Testing ... 974
40 ... Contribute to PHP ... 977
40.1 ... Patches for PHP ... 977
40.2 ... Further Options ... 983
... The Authors ... 985
... Index ... 987
... Materials for the Book ... 25
... The Concept ... 26
... The Content ... 28
... About the PHP 8.3 Edition ... 29
... Support ... 30
PART I ... Preparations ... 31
1 ... Introduction to PHP ... 33
1.1 ... History of PHP ... 33
1.2 ... Success and Commitment ... 34
1.3 ... The Concept of PHP ... 36
1.4 ... The Most Important New Features in PHP 8 to 8.4 ... 37
1.5 ... The Most Important Features in PHP 7.3 ... 41
1.6 ... The Most Important Features in PHP 7 ... 42
1.7 ... The Most Important Features in PHP 5.4, 5.5, and 5.6 ... 43
1.8 ... Downloads and Documentation ... 44
2 ... Installation ... 45
2.1 ... Install PHP ... 45
2.2 ... PEAR ... 75
3 ... Testing and Help ... 79
3.1 ... Common Errors ... 79
3.2 ... Additional Resources ... 88
PART II ... Getting Started with PHP ... 91
4 ... PHP Language Basics ... 93
4.1 ... PHP in HTML ... 93
4.2 ... Output with PHP ... 99
4.3 ... Variables ... 101
4.4 ... Constants ... 112
5 ... Programming ... 113
5.1 ... Operators ... 113
5.2 ... Case Distinctions ... 135
5.3 ... Loops ... 149
5.4 ... Jumps ... 161
6 ... Functions and Language Constructs ... 163
6.1 ... Functions ... 163
6.2 ... Language Constructs ... 192
7 ... Strings ... 201
7.1 ... Connect ... 201
7.2 ... Splitting and Joining ... 202
7.3 ... Upper- and Lowercase ... 212
7.4 ... Pruning ... 214
7.5 ... Search and Replace ... 216
7.6 ... Special Characters, HTML, and the Like ... 223
7.7 ... Compare ... 231
7.8 ... Helpful and Useful Information ... 233
8 ... Arrays ... 239
8.1 ... Basics ... 239
8.2 ... Arrays and Loops ... 244
8.3 ... Examine ... 250
8.4 ... Transform ... 251
8.5 ... Search and Sort ... 259
8.6 ... Superglobal Arrays ... 261
9 ... Mathematical and Date Functions ... 267
9.1 ... Math ... 267
9.2 ... Date and Time ... 278
10 ... Regular Expressions ... 295
10.1 ... Basics ... 295
10.2 ... Functions for Regular Expressions ... 297
10.3 ... Application Examples ... 303
11 ... Object-Oriented Programming ... 307
11.1 ... History of Object Orientation in PHP ... 307
11.2 ... Classes and Objects: Basic Concepts ... 309
11.3 ... Advanced ... 320
11.4 ... Helpful and Useful Information ... 348
11.5 ... Namespaces ... 376
12 ... Design Patterns: MVC and Co. ... 385
12.1 ... Laminas ... 386
12.2 ... MVC ... 387
12.3 ... Adapter and Factory ... 394
PART III ... Web Techniques ... 399
13 ... Forms ... 401
13.1 ... Preparations ... 401
13.2 ... Forms with PHP ... 404
13.3 ... Form Validation ... 421
13.4 ... Prefill ... 434
13.5 ... File Uploads ... 444
13.6 ... Application Examples ... 448
13.7 ... Settings ... 455
14 ... Cookies ... 457
14.1 ... Preparations ... 457
14.2 ... Facts and Background ... 459
14.3 ... Working with Cookies in PHP ... 461
14.4 ... Cookie Test ... 476
14.5 ... Final Considerations ... 479
15 ... Sessions ... 481
15.1 ... Preparations ... 481
15.2 ... Facts, Background, and Configuration ... 482
15.3 ... Working with Sessions in PHP ... 486
15.4 ... Protected Area ... 491
15.5 ... Sessions in Databases ... 493
15.6 ... Security Concerns ... 501
16 ... Email ... 505
16.1 ... Preparations ... 505
16.2 ... Sending Mails with PHP ... 510
PART IV ... Databases ... 523
17 ... SQL ... 525
17.1 ... Create Databases and Tables ... 526
17.2 ... Enter Data ... 529
17.3 ... Query Data ... 530
17.4 ... Update Data ... 532
17.5 ... Delete Data ... 533
17.6 ... Special Features ... 534
18 ... PDO ... 541
18.1 ... Preparations ... 542
18.2 ... Database Access with PDO ... 544
18.3 ... Guestbook ... 550
19 ... MySQL ... 559
19.1 ... Preparations ... 559
19.2 ... Database Access with MySQL ... 566
19.3 ... Application Example ... 588
19.4 ... Settings ... 596
20 ... SQLite ... 599
20.1 ... Preparations ... 599
20.2 ... Database Access with SQLite ... 601
20.3 ... Application Example ... 613
21 ... Microsoft SQL Server ... 621
21.1 ... Preparations ... 621
21.2 ... Microsoft SQL Server Driver for PHP ... 623
21.3 ... Application Example ... 632
22 ... Oracle ... 641
22.1 ... Preparations ... 641
22.2 ... Database Access with Oracle ... 645
22.3 ... Application Example ... 654
23 ... PostgreSQL ... 661
23.1 ... Preparations ... 661
23.2 ... Database Access with PostgreSQL ... 664
23.3 ... Application Example ... 676
23.4 ... Settings ... 683
24 ... MongoDB ... 685
24.1 ... Preparations ... 685
24.2 ... Database Access with MongoDB ... 690
24.3 ... Application Example ... 697
24.4 ... Settings ... 704
PART V ... Communication ... 705
25 ... Files ... 707
25.1 ... Preparations ... 707
25.2 ... File Handling with PHP ... 708
25.3 ... Application Examples ... 718
25.4 ... Settings ... 725
26 ... HTTP and Beyond: Connections to the Outside World ... 727
26.1 ... Preparations ... 727
26.2 ... External Connection with PHP ... 727
26.3 ... Fibers ... 741
26.4 ... Application Examples ... 742
27 ... APIs and Services ... 747
27.1 ... Preparation ... 747
27.2 ... REST ... 754
27.3 ... nuSOAP ... 758
27.4 ... PHP-SOAP ... 765
28 ... JavaScript ... 771
28.1 ... Preparations ... 771
28.2 ... Connecting JavaScript with PHP ... 772
28.3 ... Ajax ... 777
28.4 ... WebSockets ... 782
PART VI ... Data Formats ... 789
29 ... XML ... 791
29.1 ... Preparations ... 791
29.2 ... XML Access ... 797
29.3 ... XMLReader and XMLWriter ... 814
29.4 ... EXIF ... 817
30 ... Graphics with PHP ... 823
30.1 ... Preparations ... 823
30.2 ... GD 2 in Action ... 824
30.3 ... The Alternatives ... 842
31 ... PDF with PHP ... 845
31.1 ... Preparation ... 846
31.2 ... TCPDF ... 847
31.3 ... FPDF ... 859
31.4 ... Conclusion ... 861
PART VII ... Administration and Security ... 863
32 ... Security ... 865
32.1 ... User Input ... 866
32.2 ... XSS ... 869
32.3 ... SQL Injection ... 874
32.4 ... Hidden Fields ... 876
32.5 ... Input Filter ... 878
32.6 ... Cross-Site Request Forgery ... 881
32.7 ... Screen Scraping and Captchas ... 886
32.8 ... Encrypt Passwords ... 891
33 ... Authentication ... 895
33.1 ... Apache Authentication ... 896
33.2 ... IIS Authentication ... 900
33.3 ... HTTP Authentication by Hand ... 901
33.4 ... Standards-Based Authentication ... 903
33.5 ... Conclusion ... 915
34 ... Configuration Options in php.ini ... 917
34.1 ... Where to Configure? ... 917
34.2 ... Configure What? ... 920
PART VIII ... Beyond PHP ... 929
35 ... Troubleshooting with Xdebug ... 931
35.1 ... Debugging by Hand ... 933
35.2 ... Debugging with Xdebug ... 935
35.3 ... Resolution ... 939
36 ... Unit Tests with PHPUnit ... 941
36.1 ... Unit Tests ... 941
36.2 ... Install PHPUnit ... 942
36.3 ... Testing with PHPUnit ... 943
37 ... Apache Functions ... 947
37.1 ... Preparations ... 947
37.2 ... Application Examples ... 948
38 ... Composer ... 955
38.1 ... Install Composer ... 955
38.2 ... Install Packages via Composer ... 957
38.3 ... Customize Your Own Code for Composer ... 961
39 ... PHP Extensions ... 965
39.1 ... Programming ... 966
39.2 ... Compile ... 971
39.3 ... Testing ... 974
40 ... Contribute to PHP ... 977
40.1 ... Patches for PHP ... 977
40.2 ... Further Options ... 983
... The Authors ... 985
... Index ... 987