100% found this document useful (1 vote)
19 views

Learn PHP 8: Using MySQL, JavaScript, CSS3, and HTML5 Second Edition Steve Prettyman - The full ebook with all chapters is available for download now

The document promotes various eBooks available for download on textbookfull.com, including titles on PHP, MySQL, JavaScript, HTML5, and CSS3. It highlights the second edition of 'Learn PHP 8: Using MySQL, JavaScript, CSS3, and HTML5' by Steve Prettyman, among other resources. The eBooks are available in multiple formats for instant access on any device.

Uploaded by

tevelircsc51
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
19 views

Learn PHP 8: Using MySQL, JavaScript, CSS3, and HTML5 Second Edition Steve Prettyman - The full ebook with all chapters is available for download now

The document promotes various eBooks available for download on textbookfull.com, including titles on PHP, MySQL, JavaScript, HTML5, and CSS3. It highlights the second edition of 'Learn PHP 8: Using MySQL, JavaScript, CSS3, and HTML5' by Steve Prettyman, among other resources. The eBooks are available in multiple formats for instant access on any device.

Uploaded by

tevelircsc51
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 68

Explore the full ebook collection and download it now at textbookfull.

com

Learn PHP 8: Using MySQL, JavaScript, CSS3, and


HTML5 Second Edition Steve Prettyman

https://textbookfull.com/product/learn-php-8-using-mysql-
javascript-css3-and-html5-second-edition-steve-prettyman/

OR CLICK HERE

DOWLOAD EBOOK

Browse and Get More Ebook Downloads Instantly at https://textbookfull.com


Click here to visit textbookfull.com and download textbook now
Your digital treasures (PDF, ePub, MOBI) await
Download instantly and pick your perfect format...

Read anywhere, anytime, on any device!

Biota Grow 2C gather 2C cook Loucas

https://textbookfull.com/product/biota-grow-2c-gather-2c-cook-loucas/

textbookfull.com

Learning PHP MySQL JavaScript With jQuery CSS HTML5 5th


Edition Robin Nixon

https://textbookfull.com/product/learning-php-mysql-javascript-with-
jquery-css-html5-5th-edition-robin-nixon/

textbookfull.com

Learning PHP, MySQL & JavaScript, 6th Edition Robin Nixon

https://textbookfull.com/product/learning-php-mysql-javascript-6th-
edition-robin-nixon/

textbookfull.com

Pro HTML5 Games. Learn to build your own Games using HTML5
and JavaScript Aditya Ravi Shankar

https://textbookfull.com/product/pro-html5-games-learn-to-build-your-
own-games-using-html5-and-javascript-aditya-ravi-shankar/

textbookfull.com
New Perspectives on HTML5, CSS3, and JavaScript 6th
Edition Patric Carey

https://textbookfull.com/product/new-perspectives-on-html5-css3-and-
javascript-6th-edition-patric-carey/

textbookfull.com

Learning PHP MySQL JavaScript Early Release 6th Edition


Robin Nixon

https://textbookfull.com/product/learning-php-mysql-javascript-early-
release-6th-edition-robin-nixon/

textbookfull.com

Murach s HTML5 and CSS3 Anne Boehm

https://textbookfull.com/product/murach-s-html5-and-css3-anne-boehm/

textbookfull.com

Beginning iPhone and iPad Web Apps Scripting with HTML5


CSS3 and JavaScript 1st Edition Apers Chris Paterson
Daniel
https://textbookfull.com/product/beginning-iphone-and-ipad-web-apps-
scripting-with-html5-css3-and-javascript-1st-edition-apers-chris-
paterson-daniel/
textbookfull.com

Responsive Web Design by Example Embrace responsive design


with HTML5 CSS3 JavaScript jQuery and Bootstrap 4 Hussain

https://textbookfull.com/product/responsive-web-design-by-example-
embrace-responsive-design-with-html5-css3-javascript-jquery-and-
bootstrap-4-hussain/
textbookfull.com
Learn PHP 8
Using MySQL, JavaScript, CSS3, and
HTML5

Second Edition

Steve Prettyman
Learn PHP 8
Using MySQL, JavaScript, CSS3,
and HTML5
Second Edition

Steve Prettyman
Learn PHP 8: Using MySQL, JavaScript, CSS3, and HTML5
Steve Prettyman
Key West, FL, USA

ISBN-13 (pbk): 978-1-4842-6239-9 ISBN-13 (electronic): 978-1-4842-6240-5


https://doi.org/10.1007/978-1-4842-6240-5

Copyright © 2020 by Steve Prettyman


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Steve Anglin
Development Editor: Matthew Moodie
Coordinating Editor: Mark Powers
Cover designed by eStudioCalamar
Cover image by Alvaro Pinot on Unsplash (www.unsplash.com)
Distributed to the book trade worldwide by Apress Media, LLC, 1 New York Plaza, New York, NY 10004,
U.S.A. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit
www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer
Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected]; for reprint,
paperback, or audio rights, please e-mail [email protected].
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub via the book’s product page, located at www.apress.com/9781484262399. For more
detailed information, please visit http://www.apress.com/source-code.
Printed on acid-free paper
This edition is dedicated to all essential workers throughout the world
who have helped provide a more safe world from illness (pandemics)
and other natural disasters. Your dedication makes the world a better
place. You support the Key West, Florida (USA),
motto of “One Human Family.”
Table of Contents
About the Author����������������������������������������������������������������������������������������������������� xi

About the Technical Reviewer������������������������������������������������������������������������������� xiii


Acknowledgments���������������������������������������������������������������������������������������������������xv

Introduction�����������������������������������������������������������������������������������������������������������xvii

Chapter 1: An Introduction to PHP 8������������������������������������������������������������������������� 1


Chapter Objectives/Student Learning Outcomes�������������������������������������������������������������������������� 1
PHP 7, PHP 7.4+, PHP 8, and PHP.NET������������������������������������������������������������������������������������������ 1
PHP Versions: PHP 7+, PHP 7.4+, and PHP 8+������������������������������������������������������������������������ 7
Do It����������������������������������������������������������������������������������������������������������������������������������������� 9
PHP, JavaScript, CSS, HTML, and Apache Web Server���������������������������������������������������������������� 10
Do It��������������������������������������������������������������������������������������������������������������������������������������� 15
PHP, Apache, and MySQL/MariaDB���������������������������������������������������������������������������������������������� 15
Do It��������������������������������������������������������������������������������������������������������������������������������������� 21
Putting It All Together—PHP, Apache, and MySQL����������������������������������������������������������������������� 21
easyPHP��������������������������������������������������������������������������������������������������������������������������������� 22
XAMPP����������������������������������������������������������������������������������������������������������������������������������� 27
Microsoft Internet Information Server����������������������������������������������������������������������������������� 31
Do It��������������������������������������������������������������������������������������������������������������������������������������� 31
Testing Your Environment����������������������������������������������������������������������������������������������������������� 32
Testing Your Administration Environment������������������������������������������������������������������������������ 32
Do It��������������������������������������������������������������������������������������������������������������������������������������� 34
Testing Your PHP Environment����������������������������������������������������������������������������������������������� 34
Do It��������������������������������������������������������������������������������������������������������������������������������������� 37

v
Table of Contents

Alias (Working) Directories���������������������������������������������������������������������������������������������������������� 37


Do It��������������������������������������������������������������������������������������������������������������������������������������� 40
Notepad++, Editors, and Code Testers��������������������������������������������������������������������������������������� 40
Notepad++���������������������������������������������������������������������������������������������������������������������������� 41
Other Editors�������������������������������������������������������������������������������������������������������������������������� 41
Do It��������������������������������������������������������������������������������������������������������������������������������������� 42
Chapter Terms����������������������������������������������������������������������������������������������������������������������������� 42
Chapter Questions and Projects�������������������������������������������������������������������������������������������������� 43

Chapter 2: Interfaces, Platforms, and Three-Tier Programming���������������������������� 47


Chapter Objectives/Student Learning Outcomes������������������������������������������������������������������������ 47
PHP Platforms����������������������������������������������������������������������������������������������������������������������������� 47
PHP, AJAX, and CSS—Web Applications�������������������������������������������������������������������������������� 48
PHP, AJAX, and CSS—Smart Phone Web Applications���������������������������������������������������������� 56
PHP Three-Tier Architecture�������������������������������������������������������������������������������������������������������� 63
Do It��������������������������������������������������������������������������������������������������������������������������������������� 65
Interface Tier������������������������������������������������������������������������������������������������������������������������� 65
Do It��������������������������������������������������������������������������������������������������������������������������������������� 67
Business Rules Tier��������������������������������������������������������������������������������������������������������������� 68
Do It��������������������������������������������������������������������������������������������������������������������������������������� 70
Data Tier�������������������������������������������������������������������������������������������������������������������������������� 70
Do It��������������������������������������������������������������������������������������������������������������������������������������� 72
Putting It All Together������������������������������������������������������������������������������������������������������������ 72
Case Study����������������������������������������������������������������������������������������������������������������������������� 74
Do It��������������������������������������������������������������������������������������������������������������������������������������� 80
MVC and Dependency Injection�������������������������������������������������������������������������������������������������� 80
Chapter Terms����������������������������������������������������������������������������������������������������������������������������� 81
Chapter Questions and Projects�������������������������������������������������������������������������������������������������� 82

Chapter 3: The Basics: PHP 8 Syntax��������������������������������������������������������������������� 89


Chapter Objectives/Student Learning Outcomes������������������������������������������������������������������������ 89
The Basic Syntax������������������������������������������������������������������������������������������������������������������������� 89
Do It��������������������������������������������������������������������������������������������������������������������������������������� 98
vi
Table of Contents

Conditional Statements��������������������������������������������������������������������������������������������������������������� 98
Do It������������������������������������������������������������������������������������������������������������������������������������� 108
Functions���������������������������������������������������������������������������������������������������������������������������������� 109
Do It������������������������������������������������������������������������������������������������������������������������������������� 115
Arrays���������������������������������������������������������������������������������������������������������������������������������������� 116
Do It������������������������������������������������������������������������������������������������������������������������������������� 121
Chapter Terms��������������������������������������������������������������������������������������������������������������������������� 122
Chapter Questions and Projects������������������������������������������������������������������������������������������������ 123

Chapter 4: Modular Programming������������������������������������������������������������������������ 129


Chapter Objectives/Student Learning Outcomes���������������������������������������������������������������������� 129
PHP Libraries, Extensions, Classes, and Objects���������������������������������������������������������������������� 129
PHP Extensions������������������������������������������������������������������������������������������������������������������������� 130
Classes and Objects������������������������������������������������������������������������������������������������������������ 132
Creating a PHP Class����������������������������������������������������������������������������������������������������������������� 133
Do It������������������������������������������������������������������������������������������������������������������������������������� 140
Return Method�������������������������������������������������������������������������������������������������������������������������� 141
Do It������������������������������������������������������������������������������������������������������������������������������������� 144
Set Methods������������������������������������������������������������������������������������������������������������������������������ 145
Do It������������������������������������������������������������������������������������������������������������������������������������� 153
Get Methods������������������������������������������������������������������������������������������������������������������������������ 154
Do It������������������������������������������������������������������������������������������������������������������������������������� 159
Constructor Method������������������������������������������������������������������������������������������������������������������ 159
Do It������������������������������������������������������������������������������������������������������������������������������������� 165
Chapter Terms��������������������������������������������������������������������������������������������������������������������������� 166
Chapter Questions and Projects������������������������������������������������������������������������������������������������ 167

Chapter 5: Secured User Interfaces���������������������������������������������������������������������� 175


Chapter Objectives/Student Learning Outcomes���������������������������������������������������������������������� 175
Secured User Interaction���������������������������������������������������������������������������������������������������������� 175
HTML5 Form Validation������������������������������������������������������������������������������������������������������������� 176
Do It������������������������������������������������������������������������������������������������������������������������������������� 179

vii
Table of Contents

PHP Filtering����������������������������������������������������������������������������������������������������������������������������� 180


Do It������������������������������������������������������������������������������������������������������������������������������������� 182
Additional HTML Input Security������������������������������������������������������������������������������������������������� 182
HTML5 Select List Box and Radio Buttons�������������������������������������������������������������������������� 183
Do It������������������������������������������������������������������������������������������������������������������������������������� 188
Validating Input with an XML File���������������������������������������������������������������������������������������� 188
Dependency Injection���������������������������������������������������������������������������������������������������������������� 194
Do It������������������������������������������������������������������������������������������������������������������������������������� 212
Chapter Terms��������������������������������������������������������������������������������������������������������������������������� 213
Chapter Questions and Projects������������������������������������������������������������������������������������������������ 214

Chapter 6: Handling and Logging Exceptions������������������������������������������������������� 219


Chapter Objectives/Student Learning Outcomes���������������������������������������������������������������������� 219
Handling Exceptions����������������������������������������������������������������������������������������������������������������� 220
Do It������������������������������������������������������������������������������������������������������������������������������������� 229
Exception and Error Handling vs. If/Else Conditions����������������������������������������������������������������� 229
Do It������������������������������������������������������������������������������������������������������������������������������������� 239
Logging Exceptions������������������������������������������������������������������������������������������������������������������� 239
Do It������������������������������������������������������������������������������������������������������������������������������������� 248
Reading Log and Text Files������������������������������������������������������������������������������������������������������� 248
Do It������������������������������������������������������������������������������������������������������������������������������������� 258
Chapter Terms��������������������������������������������������������������������������������������������������������������������������� 259
Chapter Questions and Projects������������������������������������������������������������������������������������������������ 260

Chapter 7: Data Objects���������������������������������������������������������������������������������������� 265


Chapter Objectives/Student Learning Outcomes���������������������������������������������������������������������� 265
The Data Class�������������������������������������������������������������������������������������������������������������������������� 265
JSON Data��������������������������������������������������������������������������������������������������������������������������������� 280
MySQL and NoSQL Data with MySQL 8+���������������������������������������������������������������������������������� 281
Do It������������������������������������������������������������������������������������������������������������������������������������� 284
Backup and Recovery��������������������������������������������������������������������������������������������������������������� 284
JSON Backup and Recovery������������������������������������������������������������������������������������������������������ 302

viii
Table of Contents

MySQL Backup and Recovery��������������������������������������������������������������������������������������������������� 303


Do It������������������������������������������������������������������������������������������������������������������������������������� 307
Connecting the Data Tier����������������������������������������������������������������������������������������������������������� 308
Do It������������������������������������������������������������������������������������������������������������������������������������� 315
Chapter Terms��������������������������������������������������������������������������������������������������������������������������� 316
Chapter Questions and Projects������������������������������������������������������������������������������������������������ 317

Chapter 8: Authentication������������������������������������������������������������������������������������� 321


Chapter Objectives/Student Learning Outcomes���������������������������������������������������������������������� 321
Verification and Sessions���������������������������������������������������������������������������������������������������������� 321
JSON Data��������������������������������������������������������������������������������������������������������������������������������� 334
MySQL Data������������������������������������������������������������������������������������������������������������������������������ 334
Do It������������������������������������������������������������������������������������������������������������������������������������� 335
Registration������������������������������������������������������������������������������������������������������������������������������� 336
JSON Data��������������������������������������������������������������������������������������������������������������������������������� 340
MySQL Data������������������������������������������������������������������������������������������������������������������������������ 341
Logging In��������������������������������������������������������������������������������������������������������������������������������� 342
JSON Data��������������������������������������������������������������������������������������������������������������������������������� 349
MySQL Data������������������������������������������������������������������������������������������������������������������������������ 349
Change Password��������������������������������������������������������������������������������������������������������������������� 350
JSON Data��������������������������������������������������������������������������������������������������������������������������������� 356
MySQL Data������������������������������������������������������������������������������������������������������������������������������ 356
Do It������������������������������������������������������������������������������������������������������������������������������������� 356
Chapter Terms��������������������������������������������������������������������������������������������������������������������������� 357
Chapter Questions and Projects������������������������������������������������������������������������������������������������ 357

Chapter 9: Multifunctional Interfaces������������������������������������������������������������������� 361


Chapter Objectives/Student Learning Outcomes���������������������������������������������������������������������� 361
The Complete Application��������������������������������������������������������������������������������������������������������� 361
Data Handling Using JavaScript������������������������������������������������������������������������������������������������ 362
Do It������������������������������������������������������������������������������������������������������������������������������������� 380

ix
Table of Contents

Updating, Deleting, and Inserting in the Interface Tier�������������������������������������������������������������� 380


Do It������������������������������������������������������������������������������������������������������������������������������������� 390
Updating, Deleting, and Inserting in the Business Rules Tier���������������������������������������������������� 390
Do It������������������������������������������������������������������������������������������������������������������������������������� 399
Final Touches���������������������������������������������������������������������������������������������������������������������������� 399
Do It������������������������������������������������������������������������������������������������������������������������������������� 410
ABC Canine Shelter Reservation System Logical Design���������������������������������������������������������� 411
Limitations/Suggestions������������������������������������������������������������������������������������������������������ 412
Chapter Terms��������������������������������������������������������������������������������������������������������������������������� 415
Chapter Questions and Projects������������������������������������������������������������������������������������������ 415

Index��������������������������������������������������������������������������������������������������������������������� 419

x
About the Author
Steve Prettyman earned his bachelor of arts degree in education from Oglethorpe
University in 1979. He quickly began his teaching career as a high-school mathematics
instructor while continuing his education by earning a master’s degree in business
information systems from Georgia State University (1985). Since then, Steve has spent
over 30 years in the IT industry. He has also been a professor at Chattahoochee Technical
College, Kennesaw State University, and Southern Polytechnic State University for over
25 years. His primary teaching responsibilities include programming, web design, and
web application development. Steve, his wife Beverly, and their two dogs (Pixee and
Buster) currently reside in Paradise (Key West, Florida).

xi
About the Technical Reviewer
Satej Kumar Sahu works in the role of Senior Enterprise Architect at Honeywell. He is
passionate about technology, people, and nature. He believes through technology and
conscientious decision making, each of us has the power to make this world a better
place. In his free time, he can be seen reading books, playing basketball, and having fun
with friends and family.

xiii
Acknowledgments
Thank you to everyone who has helped put this book together. Special thanks to the
Introduction to PHP classes that have been the true testers and debuggers for this
journey.
Special acknowledgment to all the open source developers and providers of
free tutorials and training to every Internet user who wants to learn more about
programming.

xv
Introduction
Learn PHP 8: Using MySQL, JavaScript, CSS3, and HTML5 is intended for use as a
beginner- and intermediate-level programming book. It is not the goal of this book
to cover advanced techniques in the current versions of the PHP programming
language. Some knowledge of general programming concepts is expected, but no actual
programming experience or education is assumed.
All code examples in this book are compatible with PHP 8. Most examples are
compatible with PHP 7. The newest (as of the publication date) methods (functions)
available in PHP have been used to provide the reader with the most current coding
techniques. The examples use core methods provided in the PHP language. PHP
includes many additional methods to accomplish similar tasks. The reader may,
and should, research additional ways of improving security, performance, and other
techniques. It is the goal of this book to prompt users to always consider using the most
secure and efficient methods of program development. The code in this book provides
some examples of using these techniques. The user should remember that no program
is 100% secure. The programmer can only strive to make an application as secure as
possible. It takes a team of developers, network personnel, security administrators, data
center personnel, and others working together to provide the safest environment.

A Different Approach
There are quite a number of PHP books on the market today. What makes this book any
different than others?

• This book uses the concept of “learning by doing,” which shows the
reader how to develop applications with conditional statements,
loops, arrays, and methods. Over 70 PHP methods (functions) are
introduced and demonstrated in coding examples.

• Very early in the book, the reader is introduced to object-oriented


(OO) programming techniques. Many other books only briefly cover
OO programming (if at all) in the final chapters.

xvii
Introduction

• Object-oriented set methods are used to verify and filter user input.
Many other books simply show a set method accepting data and
storing it.

• A major objective of the book is to convince the reader to create all


programs as secure and efficient as possible. The newest password
encryption techniques (password_hash) are demonstrated.

• The try and catch methods are introduced to capture exceptions


and some errors. The newest versions of PHP have been created to
handle exceptions and errors using this approach.

• Multitier program design is introduced in the early chapters. This


allows the reader to discover what logic and coding should take place
in each tier. Many PHP books do not even cover this topic.

• The majority of the examples in the book are used to develop one
main application (ABC Canine Shelter Reservation System). As
the book progresses, the application is built from the beginning, in
stages, showing the reader that application development should be
broken into stages. Only after each stage is completed and tested
can the next stage begin. This approach works hand in hand with
multitier design. Additional programming exercises and a term
project are provided to enhance the understanding of development.

• The creation of user, change, and error logs are introduced. This
allows the reader to gain an understanding of how to provide backup
and recovery ability to keep an application functioning properly
when security breaches or exceptions occur.

• The introduction of data objects and the data tier demonstrates to the
reader the importance of creating an application that provides the
ability to change data storage techniques and data storage location
without requiring a major rewrite of the application. XML, JSON, and
MySQL examples are provided.

• A natural relationship between PHP, HTML5, CSS3, and JavaScript


is demonstrated throughout the book. This relationship is one of the
major strengths of PHP.

xviii
Introduction

• Throughout the book, web links are provided to point the user to
additional resources to help understand the material or to dig deeper
into the subject matter. Updates to link locations are provided on the
book’s web site.

Special Note for Teachers


The design of the content of this book provides flexibility in teaching styles and approaches.
Each college and university approaches the initial education of programming concepts in
different ways. This book provides three different types of programming exercises, which
allow teachers to pick and choose what would work best in their environment. “Do It”
exercises are provided in each chapter to allow the student to gain hands-on experience with
techniques shown by modifying existing examples to produce the desired results. These
exercises provide a level of confidence before the student attempts to program exercises at
the end of the chapters. In addition, a term project is provided that builds an application that
uses the same types of algorithms and programming techniques shown in the book.

Code Examples, Images, and Links


Every effort has been made to catch any errors in code (and grammar). Please let us
know if/when you discover problems in this book. Please send all corrections to Steve
Prettyman ([email protected]).
All code examples, images, and links are available via the Download Source Code
link on the book’s product page, located at www.apress.com/9781484262399 and
the following location. Copying code from the book may cause errors due to format
requirements for publishing.

C
 hapter Overview
C
 hapter 1: An Introduction to PHP 8
After completing this chapter, the student will be able to

• Understand the difference between LAMP, WAMP, and MAMP

• Successfully install a version of LAMP, WAMP, or MAMP


xix
Introduction

• Search the Internet for troubleshooting problems

• Explain the difference between a programming language and a


scripting language

• Create an error-free simple PHP program

C
 hapter 2: Interfaces, Platforms, and Three-Tier
Programming
After completing this chapter, the student will be able to

• Give examples of platforms or containers that can host PHP programs

• Create a simple, dynamic web application using PHP

• Explain three-tier design and determine what is contained in each


tier

• Design a three-tier application

• Explain each step of the program development life cycle (PDLC)

• Define and explain MVC and dependency injection

C
 hapter 3: The Basics: PHP 8 Syntax
After completing this chapter, the student will be able to
• Create a simple, error-free PHP program

• Understand the use and value of conditional statements

• Understand the use and value of for, while, and foreach loops

• Understand the use and value of functions

• Understand the use and value of arrays

xx
Introduction

C
 hapter 4: Modular Programming
After completing this chapter, the student will be able to

• Create an error-free, simple objected-oriented (OO) modular PHP


program

• Create a PHP class and make an instance of the class (object)

• Create an OO PHP encapsulated program, including get and set


methods

• Create PHP methods (functions) that accept parameters and return


information

• Create PHP public and private properties (variables)

• Import existing PHP code from another file or library into a program

• Validate information received using ternary (conditional) operators

C
 hapter 5: Secured User Interfaces
After completing this chapter, the student will be able to

• Explain why user input must be validated in the interface and


business rules tiers

• Explain why user input must be filtered in the business rules tier

• Use HTML5 code to validate user input


• Use JavaScript code to validate user input

• Use PHP if statements (conditional statements) to validate and filter


input

• Use the foreach loops to dynamically create an HTML select box


from an XML file

• Use simple arrays for filtering and validation


• Pass simple arrays into methods (functions)

• Understand how to use dependency injection to control code version


changes

xxi
Introduction

C
 hapter 6: Handling and Logging Exceptions
After completing this chapter, the student will be able to

• Explain the difference between errors and exceptions

• Create a PHP program that can handle general exceptions

• Create a PHP program that can create, raise, and handle user
exceptions

• Explain and use a switch and/or embedded if/else statement

• Create a PHP program that uses the while loop and/or the for loop

• Create a program that reads/updates a text file using a


two-­dimensional array

• Create a PHP program that logs exceptions and emails support


personnel

C
 hapter 7: Data Objects
After completing this chapter, the student will be able to

• Create a data class that inserts, updates, and deletes XML or JSON
data

• Explain how to create a data class that updates MySQL Data using a
SQL Script

• Create a PHP program that creates a change backup log

• Create a PHP program that can recover data from a previous backup

• Apply changes to create up-to-date valid information

• Use dependency injection to attach a data class to another class in


the BR tier

• Create a three-tier PHP application

xxii
Introduction

C
 hapter 8: Authentication
After completing this chapter, the student will be able to

• Define sessions and explain how they are used for authentication

• Create a PHP program that authenticates user logon

• Create a PHP program that registers users

• Create a PHP program that will allow users to change their passwords

• Create a PHP program that logs invalid login attempts

C
 hapter 9: Multifunctional Interfaces
After completing this chapter, the student will be able to

• Create a complete PHP application that deletes, updates, and inserts


data

• Create a professional look to a completed application using CSS

• Use JavaScript to accept and manipulate data from another program

• Secure all programs within an application requiring user


IDs/passwords

• Populate HTML objects with values from a JSON object

xxiii
CHAPTER 1

An Introduction to PHP 8
PHP is a popular general-purpose scripting language that is especially
suited to web development. Fast, flexible, and pragmatic, PHP powers
everything from your blog to the most popular web sites in the world.
—www.php.net

Chapter Objectives/Student Learning Outcomes


After completing this chapter, the student will be able to

• Understand the differences between LAMP, WAMP, and MAMP

• Successfully install a version of LAMP, WAMP, or MAMP

• Search the Internet for troubleshooting problems

• Explain the difference between a programming language and a


scripting language

• Create an error-free simple PHP program

PHP 7, PHP 7.4+, PHP 8, and PHP.NET


Today, PHP (Hypertext Preprocessor) is one of the most popular languages used for web
application development. The language has evolved to allow the programmer to quickly
develop well-formed error-free programs using both procedural and objected-oriented
programming techniques. It provides the ability to use many preexisting libraries of
code that either come with the basic installation or can be installed within the PHP
environment. This gives you multiple ways to complete a particular task. It provides
more flexibility than many other languages. The ease with which additional libraries of
code can be added to the environment is one of the many driving forces in its popularity.

1
© Steve Prettyman 2020
S. Prettyman, Learn PHP 8, https://doi.org/10.1007/978-1-4842-6240-5_1
Chapter 1 An Introduction to PHP 8

Procedural language—A procedural programming language


includes functions/methods that can be called from the main flow
of the program. The flow of the program jumps to the function/
method, executes the code within the module, and then returns
to the next statement in the main flow of the program. Some
procedural languages include a main function/method that
automatically is called when the program is executed.

Object-oriented language—An object-oriented language uses


classes and objects. Classes are similar to blueprints. A class
describes what an object can contain, including properties/
variables and functions/methods. An object is an instance of a class
(like a building that has been created from a blueprint). Object-­
oriented languages provide polymorphism, encapsulation, and
inheritance. Objects are naturally encapsulated by containing all
related functions/methods and properties/variables within the
object itself. Polymorphism allows duplicate method/function
names within object-oriented objects. However, the “signature”
must be different. The “signature” is the combination of the types
of variables (numbers and characters) passed into the method/
function and the type of information passed out of a method/
function. For example, several add methods could be created—
one that only accepts integers (whole numbers), one that only
accepts floating-point numbers (numbers with decimals), and one
that accepts a combination. The program will determine which
method/function to call by what has been passed into the method/
function. Inheritance in object-oriented programming allows an
object to inherit properties/variables and functions/methods from
another object. The object can also override those items inherited.
This is similar to a child inheriting characteristics from the parents.
Object-oriented languages can also be event driven. An event-­
driven program will “sleep” until an event occurs. This is similar to
an ATM machine program waiting for a user to input an ATM card
or walk in front of the machine.

2
Chapter 1 An Introduction to PHP 8

PHP is an open source language. As such, each version of the language is created
using input from the individuals who use it—the programmers themselves. This allows
the language, over time, to evolve and float into the direction that is driven by the users.
From its first release in 1995 as a Personal Home Page Tool (PHP) by Rasmus Lerdorf, the
versions have been released on the Internet with forums to provide users the ability to
make suggestions and even provide code changes and additions. Today, www.php.net is
the official PHP web site.

Open source language—An open source programming language


is developed by a community of interested parties. The community
accepts input from fellow programmers for suggested upgrades
and corrections. Several members of the community work together
to present proposals and to make changes to the language. Open
source languages are “free.” A non-open source language (such
as Microsoft C#) is created and updated by a company or major
organization. Non-open source languages are not usually “free.”

Figure 1-1. PHP.NET (03/28/2020)

The www.php.net home page provides information on each of the latest releases of
the language. It also provides information on future releases, the features planned for
those releases, and the planned release dates. In addition, other related PHP information
can be found, including links and information to major PHP conferences.

3
Chapter 1 An Introduction to PHP 8

Figure 1-2. Get involved (03/28/2020)


As mentioned, this site provides the ability for users to help with the future development
of the language. Users can get involved with testing beta versions and reporting errors or
program bugs. Visitors can also view documentation related to the development of possible
future versions. This is a good way of discovering future enhancements or security fixes
before major announcements have been made to the public.

Figure 1-3. Download page (03/28/2020)

The download page, as you might have guessed, provides the ability to gain easy
access to the latest versions of the language. However, as you will note, only the language
itself is provided. It is more common, and recommended, that the beginning user use
a WAMP (Windows, Apache, MySQL/MariaDB, PHP), LAMP (Linux, Apache, MySQL/
MariaDB, PHP), or MAMP (Mac, Apache, MySQL/MariaDB, PHP) stack package for initial
installation. These packages (which we will look at later) allow for easy installation of
multiple products at the same time. Otherwise, you have to run many separate installations.
4
Chapter 1 An Introduction to PHP 8

WAMP/LAMP/MAMP—Open source (free) combinations,


including Apache web server, MySQL/MariaDB, and PHP for
a specific operating system (Windows, Linux, and Mac). These
packages are open source. The combination of software is used for
creating dynamic web sites and web applications.

Figure 1-4. Documentation pages (03/28/2020)

One of the more important pages of the PHP web site is the documentation page.
This page allows users to search for descriptions and functionality of the language itself.
You can also download the complete documentation. However, since this is a “live”
site, with possible changes occurring, the most current information is best obtained by
directly accessing it from the web site.

Figure 1-5. The Manual (03/28/2020)

5
Chapter 1 An Introduction to PHP 8

You can use the manual as if it were a textbook by clicking through each link from
the beginning. The limited amount of explanation provided with each section of the
manual might cause a beginner to want to give up on programming and change interests
to something ghastly like networking! The manual does provide a great guide for
experienced programmers, as the syntax of the language is similar to other languages
such as Python, JavaScript, Perl, and Java.

Figure 1-6. Search (03/28/2020)

On any page of the web site, the user can enter a term, an expression, or even a
function name to find more information. As the information is entered in search box, the
web page will provide the user with one or more options below the box for the user to
select.

Figure 1-7. echo (03/28/2020)

6
Chapter 1 An Introduction to PHP 8

Once the user has selected an option (such as echo shown in Figure 1-7), the results
of the search provide the user with a general description of the item requested, any
inputs or outputs for a function (parameters), and example code.

Figure 1-8. echo code (03/28/2020)

The example code provides explanations of the use of the function within the
code itself by using comments (indicated by the // and gold color in Figure 1-8). The
comments are not executable code. The executable code is color-coded to highlight
strings (red), variables (blue), keywords (green), and the PHP opening and closing tags
(blue). Color-coding helps make the code more readable. It also can make it easier to
find syntax errors when creating programs. Many PHP editors provide similar color
schemes.

PHP Versions: PHP 7+, PHP 7.4+, and PHP 8+


With the release of the PHP 7 environment, great improvements took place, including
major security upgrades and major performance improvements.

PHP 7 is based on the PHPNG project (PHP Next-Gen), that was led by
Zend to speed up PHP applications. The performance gains realized from
PHP 7 are huge! They vary between 25% and 70% on real-world apps, and
all of that just from upgrading PHP, without having to change a single line
of code!
—www.zend.com

7
Chapter 1 An Introduction to PHP 8

PHP 7 also replaces fatal errors, which previously would crash a program, with
exceptions that can be handled within the program itself. PHP 7 added many additional
features, including type declarations for classes and functions, and a spaceship operator.
In addition to bug fixes and security enhancements, PHP 7.4 introduced the spread
operator which provides much better performance for merging arrays than array_
merge. The preload of functions and classes available in PHP 7.4 greatly increases PHP
performance on heavy used systems. Any preloaded items are already resident in the
web server and can immediately be executed. They stay resident as long as the sever
is running. Arrow functions have been introduced to provide easier use of anonymous
functions. Type declarations in class properties have also been improved and expanded.
The order of preference for concatenation of strings and numbers has been adjusted to
reduce error situations.

<?php
   $num1 = 1;
   $num2 = 2;
   echo "Hello " . $num1 + $num2;
?>

Before PHP 7.5, this statement would produce a nonnumeric value error when
evaluated from left to right. After PHP 7.5, the two values on the right ($num1 and
$num2) are first added and then the resulting number and string will be concatenated to
produce
“Hello 3”
With the rollout of 5G Internet speeds and real-time results promised by our ISP
providers, PHP must again increase speed and performance. While PHP 7 and PHP
7.4 greatly improved execution times over previous versions, PHP developers of large-
scale systems, like Facebook, demanded even more efficiencies. Before PHP 8, these
developers had to decide between compiling PHP 7 as it was originally designed and
using Facebook’s HHVM (Hip Hop Virtual Machine) which converts PHP code into C++
code which can then be executed for better performance.
With the introduction of PHP 8, code is compiled using a JIT (just-in-time) compiler.
This technique has been used for many years in other languages, such as Java. Code
compiled with JIT will initially be transformed into opcode. When the opcode is
executed, it transitions into executable machine-level code. This change in combination
with the preloaded classes and functions introduced in PHP 7.4 dramatically increases

8
Chapter 1 An Introduction to PHP 8

code efficiency and speed. So much so that some developers may now begin to look at
using PHP for more than just web applications! Game developers may finally look at PHP
as a legit development platform!
In addition, PHP 8 introduces union types and static return types. It builds upon PHP
7.4’s introduction of weak references and allows a weakmap relationship with objects
to allow them to remain in memory without being destroyed by the server’s garbage
collector. The str_contains function (finally) allows us to search more efficiently for
contents in a string. Internal function errors now behave in the same way as user-defined
function errors. The @ operator, which you may have seen in older PHP code, is removed.
To stop errors from being displayed, you must set this feature within your server.
If you are migrating from a previous version of PHP to PHP 8, please review the
migration notes in the appendix of the online manual:

http://php.net/manual/

The code used in the examples in this book are compatible with PHP 8. Most
examples are also compatible with PHP 7 and PHP 7.4.

D
 o It
1. Go to www.php.net. Search for information on the print and
printf functions. How are these functions similar? How are they
different?

2. How do you “join the team” and help with the creation of the next
version of PHP? Hint: Go to www.php.net and search for the
answer.

3. Which ways can the www.php.net web site be useful for a


beginning PHP programmer?

4. What language is used to create PHP? Hint: The answer is


somewhere on the www.php.net web site.

5. Go to www.php.net. Search for the list of improvements and


changes with PHP 8. List those improvements and changes. Which
of these do you think will affect a beginner-­level programmer?
What changes have occurred since the initial release of PHP 8?

9
Another Random Document on
Scribd Without Any Related Topics
God remain alone as He was in the beginning. To these doctrines
Abu Hudhayl seems to have been led by two considerations, both
significant for the drift of the Mu‘tazilites. First, there was about their
reasonings a grimness of logic touched with utilitarianism. Thus,
from their position that man could come by the light of his reason to
the knowledge of God and of virtue, they drew the conclusion that it
was man’s duty so to attain, and that God would damn eternally
every man who did not. Their utilitarianism, again, comes out
strikingly in their view of heaven and hell. These, at present, were
serving no useful purpose because they had no inhabitants;
therefore, at present, they did not exist. But this made difficulties for
Abu Hudhayl. What has a beginning must have an end. So he
explained the end as the ceasing of all changes. Second, he shows
clear evidence of influence from Greek philosophy. The Qur’an
teaches that the world has been created in time; Aristotle, that it is
from eternity and to eternity. The creation, Abu Hudhayl applied to
changes; before that, the world was, but in eternal rest. Hereafter,
all changes will cease; rest will again enter and endure to all
eternity. We shall see how largely this doctrine was advanced and
developed by his successors.
But there were further complications in the doctrine of man’s
actions and into some of these we must enter, on account of their
later importance. Not everything that comes from the action of a
man is by his action. God has a creative part in it, apparently as
regards the effects. Especially, knowledge in the mind of a pupil
does not come from the teacher, but from God. The idea seems to
be that the teacher may teach, but that the being taught in the pupil
is a divine working. Similarly, he distinguished motions in the mind,
which he held were not altogether due to the man, and external
motions which were. There is given, too, to a man at the time of his
performing an action an ability to perform the action, which is a
special accident in him apart from any mere soundness of health or
limb.
In these ways, Abu Hudhayl recognized God’s working through
man. Another of his positions had a similar basis and was a curious
combination of historical criticism and mysticism, a combination
which we shall find later in al-Ghazzali, a much greater man. The
evidence of tradition for things dealing with the Unseen World (al-
ghayb) he rejected. Twenty witnesses might hand on the tradition in
question, but it was not to be received unless among them there
was one, at least, of the People of Paradise. At all times, he taught,
there were in the world these Friends of God (awliya Allah, sing.
wali), who were protected against all greater sins and could not lie.
It is the word of these that is the basis for belief, and the tradition is
merely a statement of what they have said. This shows clearly how
far the doctrine of the ecstatic life and of knowledge gained through
direct intercourse between the believer and God had already
advanced.
But Abu Hudhayl was only one in a group of daring and absolutely
free-minded speculators. They were applying to the ideas of the
Qur’an the keen solvent of Greek dialectic, and the results which
they obtained were of the most fantastically original character.
Thrown into the wide sea and utter freedom of Greek thought, their
ideas had expanded to the bursting point and, more than even a
German metaphysician, they had lost touch of the ground of
ordinary life, with its reasonable probabilities, and were swinging
loose on a wild hunt after ultimate truth, wielding as their weapons
definitions and syllogisms. The lyric fervors of Muhammad in the
Qur’an gave scope enough of strange ideas from which to start, or
which had to be explained away. Their belief in the powers of the
science of logic was unfailing, and, armed with Aristotle’s “Analytics,”
they felt sure that certainty was within their reach. It was at the
court and under the protection of al-Ma’mun that they especially
flourished, and some account of the leading spirits among them will
be necessary before we describe how they reached their utmost
pride of power and how they fell.
An-Nazzam (d. 231) has the credit among later
historians of having made use, to a high degree, of AN-NAZZAM
the doctrines of the Greek philosophers. He was
one of the Satans of the Qadarites, say they; he read the books of
the philosophers and mingled their teachings with the doctrines of
the Mu‘tazilites. He taught, in the most absolute way, that God could
do nothing to a creature, either in this world or in the next, that was
not for the creature’s good and in accordance with strict justice. It
was not only that God would not do it; He had not the power to do
anything evil. Evidently the personality of God was fast vanishing
behind an absolute law of right. To this, orthodox Islam opposed the
doctrine that God could do anything; He could forgive whom He
willed, and punish whom He willed. Further, he taught that God’s
willing a thing meant only that He did it in accordance with His
knowledge; and when He willed the action of a creature that meant
only that He commanded it. This is evidently to evade phrases in the
Qur’an. Man, again, he taught, was spirit (ruh), and the body
(badan) was only an instrument. But this spirit was a fine substance
which flowed in the body like the essential oil in a rose, or butter in
milk. In a universe determined by strict law, man alone was
undetermined. He could throw a stone into the air, and by his action
the stone went up; but when the force of his throw was exhausted it
came again under law and fell. If he had only asked himself how it
came to fall, strange things might have happened. But he, and all his
fellows, were only playing with words like counters. Further, he
taught that God had created all created things at once, but that He
kept them in concealment until it was time for them to enter on the
stage of visible being and do their part. All things that ever will exist
are thus existing now, but, in a sense, in retentis. This seems to be
another attempt to solve the problem of creation in time, and it had
important consequences. Further, the Qur’an was no miracle (mu‘jiz)
to him. The only miraculous elements in it are the narratives about
the Unseen World, and past things and things to come, and the fact
that God deprived the Arabs of the power of writing anything like it.
But for that, they could easily have surpassed it as literature. As a
high Imamite he rejected utterly agreement and analogy. Only the
divinely appointed Imam had the right to supplement the teaching of
Muhammad. We pass over some of his metaphysical views, odd as
they are. The Muslim writers on theological history have classified
him rightly as more of a physicist than a metaphysician. He had a
concrete mind and that fondness for playing with metaphysical
paradoxes which often goes with it.
Another of the group was Bishr ibn al-Mu‘tamir.
His principal contribution was the doctrine of tawlid BISHR; MA‘MAR
and tawallud, begetting and deriving. It is the
transmission of a single action through a series of objects; the agent
meant to affect the first object only; the effect on the others
followed. Thus, he moves his hand, and the ring on his finger is
moved. What relation of responsibility, then, does he bear to these
derived effects? Generally, how are we to view a complex of causes
acting together and across one another? The answer of later
orthodox Islam is worth giving at this point. God creates in the man
the will to move his hand; He creates the movement of the hand and
also the movement of the ring. All is by God’s direct creation at the
time. Further, could God punish an infant or one who had no
knowledge of the faith? Bishr’s reply on the first point was simply a
bit of logical jugglery to avoid saying frankly that there was anything
that God could not do. His answer on the second was that God could
have made a different and much better world than this, a world in
which all men might have been saved. But He was not bound to
make a better world—in this Bishr separates from the other
Mu‘tazilites—He was only bound to give man free-will and, then,
either revelation to guide him to salvation or reason to show him
natural law.
With Ma‘mar ibn Abbad, the philosophies wax faster and more
furious. He succeeded in reducing the conception of God to a bare,
indefinable something. We could not say that God had knowledge.
For it must be of something in Himself or outside of Himself. If the
first, then there was a union of knower and known, and that is
impossible; or a duality in the divine nature, and that was equally
impossible. Here Ma‘mar was evidently on the road to Hegel. If the
second, then His knowledge depended on the existence of
something other than Himself, and that did away with His
absoluteness. Similarly, he dealt with God’s Will. Nor could He be
described as qadim, prior to all things, for that word, in Arabic,
suggested sequence and time. By all this, he evidently meant that
our conceptions cannot be applied to God; that God is unthinkable
by us. On creation, he developed the ideas of an-Nazzam.
Substances (jisms) only were created by God, and by “substances”
he seems to mean matter as a whole; all changes in them, or it,
come either of necessity from its nature, as when fire burns, the sun
warms; or of free-will, as always in the animal world. God has no
part in these things. He has given the material and has nothing to do
with the coming and going of separate bodies; such are simple
changes, forms of existence, and proceed from the matter itself. Man
is an incorporeal substance. The soul is the man and his body is but
a cover. This true man can only know and will; the body perceives
and does.
The last of this group whose views we need consider, is Thumama
ibn Ashras. He was of very dubious morals; was imprisoned as a
heretic by Harun ar-Rashid, but highly favored by al-Ma’mun, in
whose Khalifate he died, a.h. 213. He held that actions produced
through tawallud had no agent, either God or man. That knowledge
of good and evil could be produced by tawallud through speculation,
and is, therefore, an action without an agent, and required even
before revelation. That Jews, Christians, Magians will be turned into
dust in the next world and will not enter either Paradise or Hell; the
same will be the fate of cattle and children. That any one of the
unbelievers who does not know his Creator is excusable. That all
knowledge is a priori. That the only action which men possess is will;
everything besides that is a production without a producer. That the
world is the act of God by His nature, i.e., it is an act which His
nature compels Him to produce; is, therefore, from eternity and to
eternity with Him. It may be doubted how far Thumama was a
professional theologian and how far he was a free-thinking, easy-
living man of letters.
In all this, the influence of Greek theology and of Aristotle can be
clearly traced. With Aristotle had come to them the idea of the world
as law, an eternal construction subsisting and developing on fixed
principles. This conception of law shows itself in their thought frankly
at strife with Muhammad’s conception of God as will, as the
sovereign over all. Hence, the crudities and devices by which they
strove to make good their footing on strange ground and keep a
right to the name of Muslim, while changing the essence of their
faith. The anthropomorphic God of Muhammad, who has face and
hands, is seen in Paradise by the believer and settles Himself firmly
upon His throne, becomes a spirit, and a spirit, too, of the vaguest
kind.
It remains now only to touch upon one or two
points common to all the Mu‘tazilites. First, the THE VISION OF
GOD
Beatific Vision of God in Paradise. It was a fixed
agreement of the early Muslim Church, based on texts of the Qur’an
and on tradition, that some believers, at least, would see and gaze
upon God in the other world; this was the highest delight held out to
them. But the Mu‘tazilites perceived that vision involved a directing
of the eyes on the part of the seer and position on the part of the
seen. God must, therefore, be in a place and thus limited. So they
were compelled to reject the agreement and the traditions in
question and to explain away the passages in the Qur’an. Similarly,
in Qur’an vii. 52, we read that God settled Himself firmly upon His
throne. This, with other anthropomorphisms of hands and feet and
eyes, the Mu‘tazilites had to explain away in a more or less
cumbrous fashion.
With one other detail of this class we must deal at greater length.
It was destined to be the vital point of the whole Mu‘tazilite
controversy and the test by which theologians were tried and had
their places assigned. It had a weighty part also in bringing about
the fall of the Mu‘tazilites. There had grown up very early in the
Muslim community an unbounded reverence and awe in the
presence of the Qur’an. In it God speaks, addressing His servant, the
Prophet; the words, with few exceptions, are direct words of God. It
is, therefore, easily intelligible that it came to be called the word of
God (kalam Allah). But Muslim piety went further and held that it
was uncreated and had existed from all eternity with God. Whatever
proofs of this doctrine may have been brought forward later from
the Qur’an itself, we can have no difficulty in recognizing that it is
plainly derived from the Christian Logos and that the Greek Church,
perhaps through John of Damascus, has again played a formative
part. So, in correspondence with the heavenly and uncreated Logos
in the bosom of the Father, there stands this uncreated and eternal
Word of God; to the earthly manifestation in Jesus corresponds the
Qur’an, the Word of God which we read and recite. The one is not
the same as the other, but the idea to be gained from the
expressions of the one is equivalent to the idea which we would gain
from the other, if the veil of the flesh were removed from us and the
spiritual world revealed.
That this view grew up very early among the
Muslims is evident from the fact that it is opposed THE WORD OF
GOD
by Jahm ibn Safwan, who was killed toward the
end of the Umayyad period. It seems to have originated by a kind of
transfusion of ideas from Christianity and not as a result of
controversy or dialectic about the teachings of the Qur’an. We find
the orthodox party vehemently opposing discussion on the subject,
as indeed they did on all theological subjects. “Our fathers have told
us; it is the faith received from the Companions;” was their
argument from the earliest time we can trace. Malik ibn Anas used
to cut off all discussions with “Bila kayfa” (Believe without asking
how); and he held strongly that the Qur’an was uncreated. The
same word kalam which we have found applied to the Word of God
—both the eternal, uncreated Logos and its manifestation in the
Qur’an—was used by them most confusingly for “disputation;” “he
disputed” was takallam and “one who disputed” was mutakallim. All
that was anathema to the pious, and it is amusing to see the origin
of what became later the technical terms for scholastic theology and
its students in their shuddering repulsion to all “talking about” the
sacred mysteries.
This opposition appeared in two forms. First, they refused to go
an inch beyond the statements in the Qur’an and tradition and to
draw consequences, however near the surface these consequences
might seem to lie. A story is told of al-Bukhari, (d. 257), late as he
is, which shows how far this went and how long it lasted. An
inquisition was got up against him out of envy by one of his fellow-
teachers. The point of attack was the orthodoxy of his position on
the lafz (utterance) of the Qur’an; was it created or uncreated? He
said readily that the Qur’an was uncreated and was obstinately silent
as to the utterance of it by men. At last, persistent questioning drove
him to an outburst. “The Qur’an is the Word of God and is
uncreated. The speech of man is created and inquisition (imtihan) is
an innovation (bid‘a).” But beyond that he would not go, even to
draw the conclusion of the syllogism which he had indicated. Some,
as we may gather from this story, had felt themselves driven to hold
that not only the Qur’an in itself but also the utterance of it by the
lips of men and the writing of it by men’s hands—all between the
boards, as they said—was uncreated. Others were coming to deny
absolutely the existence of the eternal Logos and that this revealed
Qur’an was uncreated in any sense. But others, as al-Bukhari, while
holding tenaciously that the Qur’an was uncreated, refused to make
any statement as to its utterance by men. There was nothing said
about that in Qur’an or tradition.
The second form of opposition was to any upholding of their belief
by arguments, except of the simplest and most apparent. That was
an invasion by reason (aql) of the realm of traditional faith (naql).
When the pious were eventually driven to dialectic weapons, their
arguments show that these were snatched up to defend already
occupied positions. They ring artificial and forced. Thus, in the
Qur’an itself, the Qur’an is called “knowledge from God.” It is, then,
inseparable from God’s quality of knowledge. But that is eternal and
uncreated; therefore, so too, the Qur’an. Again, God created
everything by the word, “Be.” But this word cannot have been
created, otherwise a created word would be a creator. Therefore,
God’s word is uncreated. Again, there stands in the Qur’an (vii, 52),
“Are not the creation and the command His?” The command here is
evidently different from the creation, i.e., not created. Further, God’s
command creates; therefore it cannot be created. But it is God’s
word in command. It will be noticed here how completely God’s
word is hypostatized. This appears still more strongly in the following
argument. God said to Moses, (Qur. vii, 141), “I have chosen thee
over mankind with my apostolate and my word.” God, therefore, has
a word. But, again (Qur. iv, 162), He addresses Moses with this word
(kallama-llahu Musa taklima, evidently regarded as meaning that
God’s word addressed Moses) and said, “Lo, I am thy Lord.” This
argument is supposed to put the opponent in a dilemma. Either he
rejects the fact of Moses being so addressed, which is rejecting what
God has said, and is, therefore, unbelief; or he holds that the kalam
which so addresses Moses is a created thing. Then, a created thing
asserts that it is Moses’ Lord. Therefore, God’s kalam with which He
addresses the prophets, or which addresses the prophets, is eternal,
uncreated.
But if this doctrine grew up early in Islam, opposition to it was not
slow in appearing, and that on different sides. Literary vanity,
national pride, and philosophical scruples all made themselves felt.
Even in Muhammad’s lifetime, according to the legend of the poet
Labid and the verses which he put up in challenge on the Ka‘ba, the
Qur’an had taken rank as inimitable poetry. At all points it was the
Word of God and perfect in every detail. But, among the Arabs, a
jealous and vain people, if there was one thing on which each was
more jealous and vain than another, it was skill in working with
words. The superiority of Muhammad as a Prophet of God they
might endure, though often with a bad grace; but Muhammad as a
rival and unapproachable literary artist they could not away with. So
we find satire of the weaknesses of the Qur’an appearing here and
there, and it came to be a sign of emancipation and freedom from
prejudice to examine it in detail and balance it against other
products of the Arab genius. The rival productions of Musaylima, the
False Prophet, long enjoyed a semi-contraband existence, and Abu
Ubayda (d. 208) found it necessary to write a treatise in defence of
the metaphors of the Qur’an. Among the Persians this was still more
the case. To them, Muhammad might be a prophet, but he was also
an Arab; and while they accepted his mission, accepting his books in
a literary way was too much for them. As a prophet, he was a man;
as a literary artist, he was an Arab. So Jahm ibn Safwan may have
felt; so, certainly, others felt later. The poet Bashshar ibn Burd (killed
for satire, in 167), a companion of Wasil ibn Ata and a Persian of
very dubious orthodoxy, used to amuse himself by comparing poems
by himself and others with passages in the Qur’an, to the
disadvantage of the latter. And Ibn al-Muqaffa (killed about 140), the
translator of “Kalila and Dimna” and many other books into Arabic,
and a Persian nationalist, is said to have planned an imitation of the
Qur’an.
Added to all this came the influence of the
Mu‘tazilite theologians. They had a double ground MU‘TAZILITE
ATTITUDE
for their opposition. The doctrine of an absolutely
divine and perfect book limited them too much in their intellectual
freedom. They were willing to respect and use the Qur’an, but not to
accept its ipsissima verba. Regarded as the production of
Muhammad under divine influence, it could have a human and a
divine side, and things which needed to be dropped or changed in it
could be ascribed to the human side. But that was not possible with
a miraculous book come down from heaven. In a word, they were
meeting the difficulty which has been met by Christianity in the latter
half of the nineteenth century. The least they could do was to deny
that the Qur’an was uncreated.
But they had a still more vital, if not more important, philosophical
base of objection. We have seen already how they viewed the
doctrine of God’s qualities (sifat) and tried to limit them in every
way. These qualities ran danger, they held, of being hypostatized
into separate persons like those in the Christian Trinity, and we have
just seen how near that danger really lay in the case of God’s kalam.
In orthodox Islam it has become a plain Logos.
The position in this of an-Nazzam has been given above. It is
interesting as showing that the Qur’an, even then, was given as a
probative miracle (mu‘jiz) because it deprived all men of power
(i‘jaz) to imitate it. That is, its æsthetic perfection was raised to the
miraculous degree and then regarded as a proof of its divine origin.
But al-Muzdar, a pupil of Bishr ibn al Mu‘tamir and an ascetic of high
rank, called the Monk of the Mu‘tazilites, went still further than an-
Nazzam. He flatly damned as unbelievers all who held the eternity of
the Qur’an; they had taken unto themselves two Gods. Further, he
asserted that men were quite capable of producing a work even
finer than the Qur’an in point of style. But the force of this opinion is
somewhat diminished by the liberality with which he denounced his
opponents in general as unbelievers. Stories are told of him very
much like those in circulation with us about those who hold that few
will be saved, and it is worth noticing that upon this point of
salvability the Mu‘tazilites were even narrower than the orthodox.

CHAPTER II

Al-Ma’mun and the triumph of the Mu‘tazilites; the


Mihna and Ahmad ibn Hanbal; al-Farabi; the
Fatimids and the Ikhwan as-Safa; the early
mystics, ascetic and pantheistic; al-Hallaj.

Such for long was the situation between the Mu‘tazilites and their
orthodox opponents. From time to time the Mu‘tazilites received
more or less protection and state favor; at other times, they had to
seek safety in hiding. Popular favor they seem never to have
enjoyed. As the Umayyads grew weak, they became more stiff in
their orthodoxy; but with the Abbasids, and especially with al-
Mansur, thought was again free. As has been shown above,
encouragement of science and research was part of the plan of that
great man, and he easily saw that the intellectual hope of the future
was with these theological and philosophical questioners. So their
work went slowly on, with a break under Harun ar-Rashid, a
magnificent but highly orthodox monarch, who understood no trifling
with things of the faith. It is an interesting but useless question
whether Islam could ever have been broadened and developed to
the point of enduring in its midst free speculation and research. As
the case stands in history, it has known periods of intellectual life,
but only under the protection of isolated princes here and there. It
has had Augustan ages; it has never had great popular yearnings
after wider knowledge. Its intellectual leaders have lived and studied
and lectured at courts; they have not gone down and taught the
masses of the people. To that the democracy of Islam has never
come. Hampered by scholastic snobbishness, it has never learned
that the abiding victories of science are won in the village school.
But most unfortunately for the Mu‘tazilites and
for Islam, a Khalifa arose who had a relish for AL-MA’MUN
theological discussions and a high opinion of his
own infallibility. This was al-Ma’mun. It did not matter that he
ranged himself on the progressive side; his fatal error was that he
invoked the authority of the state in matters of the intellectual and
religious life. Thus, by enabling the conservative party to pose as
martyrs, he brought the prejudices and passions of the populace still
more against the new movement. He was that most dangerous of all
beings, a doctrinaire despot. He had ideas and tried to make other
people live up to them. Al-Mansur, though a bloody tyrant, had been
a great statesman and had known how to bend people and things
quietly to his will. He had sketched the firm outlines of a policy for
the Abbasids, but had been cautious how he proclaimed his
programme to the world. The world would come to him in time, and
he could afford to wait and work in the dark. He knew, above all,
that no people would submit to be school-mastered into the way in
which they should go. Al-Ma’mun, for all his genius, was at heart a
school-master. He was an enlightened patron of an enlightened
Islam. Those who preferred to dwell in the darkness of the
obscurant, he first scolded and then punished. Discussions in
theology and comparative religion were his hobby. That some such
interchange of letters between Muslims and Christians as that which
crystallized in the Epistle of al-Kindi took place at his court seems
certain. Bishr al-Marisi, who had lived in hiding in ar-Rashid’s time on
account of his heretical views, disputed, in 209, before al-Ma’mun on
the nature of the Qur’an. He founded at Baghdad an academy with
library, laboratories, and observatory. All the weight of his influence
was thrown on the side of the Mu‘tazilites. It appeared as though he
were determined to pull his people up by force from their
superstition and ignorance.
At last, he took the final and fatal step. In 202 a decree appeared
proclaiming the doctrine of the creation of the Qur’an as the only
truth, and as binding upon all Muslims. At the same time, as an
evident sop to the Persian nationalists and the Alids, Ali was
proclaimed the best of creatures after Muhammad. The Alids, it
should be remembered, had close points of contact with the
Mu‘tazilites. Such a theological decree as this was a new thing in
Islam; never before had the individual consciousness been
threatened by a word from the throne. The Mu‘tazilites through it
practically became a state church under erastian control. But the
system of Islam never granted to the Imam, or leader of the Muslim
people, any position but that of a protector and representative. Its
theology could only be formed, as we have seen in the case of its
law, by the agreement of the whole community. The question then
naturally was what effect such a new thing as this decree could have
except to exasperate the orthodox and the masses. Practically, there
was no other effect. Things went on as before. All that it meant was
that one very prominent Muslim had stated his opinion and thrown
in his lot with heretics.
For six years this continued, and then a method was devised of
bringing the will of the Khalifa home upon the people. In 217 a
distinguished Mu‘tazilite, Ahmad ibn Abi Duwad, was appointed chief
qadi, and in 218 the decree was renewed. But this time it was
accompanied by what we would call a test-act, and an inquisition
(mihna) was instituted. The letter of directions for the conduct of
this matter, written by al-Ma’mun to his lieutenant at Baghdad, is
decisive as to the character of the man and the nature of the
movement. It is full of railings against the common people who
know not the law and are accursed. They are too stupid to
understand philosophy or argument. It is the duty of the Khalifa to
guide them and especially to show them the distinction between God
and His book. He who holds otherwise than the Khalifa is either too
blind or too lying and deceitful to be trusted in any other thing.
Therefore, the qadis must be tested as to their views. If they hold
that the Qur’an is uncreated, they have abandoned tawhid, the
doctrine of God’s Unity, and can no longer hold office in a Muslim
land. Also, the qadis must apply the same test to all the witnesses in
cases before them. If these do not hold that the Qur’an is created,
they cannot be legal witnesses. Other letters followed; the Mihna
was extended through the Abbasid empire and applied to other
doctrines, e.g., that of free-will and of the vision of God. The Khalifa
also commanded that the death penalty for unbelief (kufr) should be
inflicted on those who refused to take the test. They were to be
regarded as idolaters and polytheists. The death of al-Ma’mun in the
same year relieved the pressure. It is true that the Mihna was
continued by his successor, al-Mu‘tasim, and by his successor, al-
Wathiq, but without energy; it was more a handy political weapon
than anything else. In 234, the second year of al-Mutawakkil, it was
abolished and the Qur’an decreed uncreated. At the same time the
Alids and all Persian nationalism came under a ban. Practically, the
status quo ante was restored and Mu‘tazilism was again left a
struggling heresy. The Arab party and the pure faith of Muhammad
had reasserted themselves.
In this long conflict, the most prominent figure
was certainly that of Ahmad ibn Hanbal. He was AHMAD IBN
HANBAL
the trust and strength of the orthodox; that he
stood fast through imprisonment and scourging defeated the plans
of the Mu‘tazilites. In dealing with the development of law, we have
seen what his legal position was. The same held in theology.
Scholastic theology (kalam) was his abomination. Those who
disputed over doctrines he cast out. That their dogmatic position
was the same as his made no difference. For him, theological truth
could not be reached by reasoning (aql); tradition (naql) from the
fathers (as-salaf) was the only ground on which the dubious words
of the Qur’an could be explained. So, in his long examinations before
the officials of al-Ma‘mun and al-Mu‘tasim, he contented himself with
repeating either the words of the Qur’an which for him were proofs
or such traditions as he accepted. Any approach to drawing a
consequence he utterly rejected. When they argued before him, he
kept silence.
What, then, we may ask, was the net result of this incident? for it
was nothing more. The Mu‘tazilites dropped back into their former
position, but under changed conditions. The sympathy of the
populace was further from them than ever. Ahmad ibn Hanbal, saint
and ascetic, was the idol of the masses; and he, in their eyes, had
maintained single-handed the honor of the Word of God. For his
persecutors there was nothing but hatred. And after he had passed
away, the conflict was taken up with still fiercer bitterness by the
school of law founded by his pupils. They continued to maintain his
principles of Qur’an and tradition long after the Mu‘tazilites
themselves had practically vanished from the scene, and all that was
left for them to contend against was the modified system of
scholastic theology which is now the orthodox theology of Islam.
With these reactionary Hanbalites we shall have to deal later.
The Mu‘tazilites, on their side, having seen the
shipwreck of their hopes and the growing storm of SCHOOLS OF
MU‘TAZILITES
popular disfavor, seem to have turned again to
their scholastic studies. They became more and more theologians
affecting a narrower circle, and less and less educators of the world
at large. Their system became more metaphysical and their
conclusions more unintelligible to the plain man. The fate which has
fallen on all continued efforts of the Muslim mind was coming upon
them. Beggarly speculations and barren hypotheses, combats of
words over names, sapped them of life and reality. What the ill-fated
friendship of al-Ma’mun had begun was carried on and out by the
closed circle of Muslim thought. They separated into schools, one at
al-Basra and another at Baghdad. At Baghdad the point especially
developed was the old question, What is a thing (shay)? They
defined a thing, practically, as a concept that could be known and of
which something could be said. Existence (wujud) did not matter. It
was only a quality which could be there or not. With it, the thing was
an entity (mawjud); without it, a non-entity (ma‘dum), but still a
thing with all equipment of substance (jawhar) and accident (arad),
genus and species. The bearing of this was especially upon the
doctrine of creation. Practically, by God’s adding a single quality,
things entered the sphere of existence and were for us. Here, then,
is evidently an approach to a doctrine of pre-existent matter. At al-
Basra the relation of God to His qualities was especially discussed,
and there it came to be pretty nearly a family dispute between al-
Jubba‘i (d. 303) and his son Abu Hashim. Orthodox Islam held that
God has qualities, existent, eternal, added to His essence; thus, He
knows, for example, by such a quality of knowledge. The students of
Greek philosophy and the Shi‘ites denied this and said that God
knew by His essence. We have seen already Mu‘tazilite views as to
this point. Abu Hudhayl held that these qualities were God’s essence
and not in it. Thus, He knew by a quality of knowledge, but that
quality was His essence. Al-Jubba‘i contented himself with
safeguarding this statement. God knew in accordance with His
essence, but it was neither a quality nor a state (hal) which required
that He should be a knower. The orthodox had said the first; his son,
Abu Hashim, said the second. He held that we know an essence and
know it under different conditions. The conditions varied but the
essence remained. These conditions are not thinkable by
themselves, for we know them only in connection with the essence.
These are states; they are different from the essence, but do not
exist apart from it. Al-Jubba‘i opposed to this a doctrine that these
states were really subjective in the mind of the perceiver, either
generalizations or relationships existing mentally but not externally.
This controversy spun itself out at great length through centuries. It
eventually resolved itself into the fundamental metaphysical inquiry,
What is a thing? A powerful school came to a conclusion that would
have delighted the soul of Mr. Herbert Spencer. Things are four, they
said, entities, non-entities, states and relationships. As we have seen
above, al-Jubba‘i denied the reality of both states and relationships.
Orthodox Islam has been of a divided opinion.
But all this time, other movements had been in progress, some of
which were to be of larger future importance than this fossilizing
intellectualism. In 255 al-Jahiz died. Though commonly reckoned a
Mu‘tazilite he was really a man of letters, free in life and thought. He
was a maker of books, learned in the writings of the philosophers
and rather inclined to the doctrines of the Tabi‘iyun, deistic
naturalists. His confession of faith was of the utmost simplicity. He
taught that whoever held that God had neither body nor form, could
not be seen with the eyes, was just and willed no evil deeds, such
was a Muslim in truth. And, further, if anyone was not capable of
philosophical reflection, but held that Allah was his Lord and that
Muhammad was the Apostle of Allah, he was blameless and nothing
more should be required of him. Here we have evidently in part a
reaction from the subtilties of controversy, and in part an attempt to
broaden theology enough to give even the unsettled a chance to
remain in the Muslim Church. Something of the same kind we shall
find, later, in the case of Ibn Rushd. Finally, we have probably to see
in his remark that the Qur’an was a body, turned at one time into a
man and at another into a beast, a satirical comment on the great
controversy of his time.
Al-Jahiz may be for us a link with the
philosophers proper, the students of the wisdom of AL-JAHIZ; AL-
KINDI
the Greeks. He represents the stand-point of the
educated man of the time, and was no specialist in anything but a
general scepticism. In the first generation of the philosophers of
Islam, in the narrower sense, stands conspicuously al-Kindi,
commonly called the Philosopher of the Arabs. The name belongs to
him of right, for he is almost the only example of a student of
Aristotle, sprung from the blood of the desert. But he was hardly a
philosopher in any independent sense. His rôle was translating, and
during the reigns of al-Ma’mun and al-Mu‘tasim a multitude of
translations and original works de omni scibili came from his hands;
the names of 265 of these have come down to us. In the orthodox
reaction under al-Mutawakkil he fared ill; his library was confiscated
but afterward restored. He died about 260, and with him dies the
brief, golden century of eager acquisition, and the scholastic period
enters in philosophy as in theology.
That the glory was departing from Baghdad and
the Khalifate is shown by the second important PLATO;
PLOTINUS;
name in philosophy. It is that of al-Farabi, who was ARISTOTLE
born at Farab in Turkestan, lived and worked in the
brilliant circle which gathered round Sayf ad-Dawla, the Hamdanid,
at his court at Aleppo. In music, in science, in philology, and in
philosophy, he was alike master. Aristotle was his passion, and his
Arabic contemporaries and successors united in calling him the
second teacher, on account of his success in unknotting the tangles
of the Greek system. It was in truth a tangled system which came to
him, and a tangled system which he left. The Muslim philosophers
began, in their innocence, with the following positions: The Qur’an is
truth and philosophy is truth; but truth can only be one; therefore,
the Qur’an and philosophy must agree. Philosophy they accepted in
whole-hearted faith, as it came to them from the Greeks through
Egypt and Syria. They took it, not as a mass of more or less
contradictory speculation, but as a form of truth. They, in fact, never
lost a certain theological attitude. Under such conditions, then, Plato
came to them; but it was mostly Plato as interpreted by Porphyrius,
that is, as neo-Platonism. Aristotle, too, came to them in the guise of
the later Peripatetic schools. But in Aristotle, especially, there
entered a perfect knot of entanglement and confusion. During the
reign of al-Mu‘tasim, a Christian of Emessa in the Lebanon—the
history in details is obscure—translated parts of the “Enneads” of
Plotinus into Arabic and entitled his work “The Theology of Aristotle.”
A more unlucky bit of literary mischief and one more far-reaching in
its consequences has never been. The Muslims took it all as
solemnly as they took the text of the Qur’an. These two great
masters, Plato and Aristotle, they said, had expounded the truth,
which is one. Therefore, there must be some way of bringing them
into agreement. So generations of toilers labored valiantly with the
welter of translations and pseudographs to get out of them and into
them the one truth. The more pious added the third element of the
Qur’an, and it must remain a marvel and a magnificent testimonial
to their skill and patience that they got even so far as they did and
that the whole movement did not end in simple lunacy. That al-
Farabi should have been so incisive a writer, so wide a thinker and
student; that Ibn Sina should have been so keen and clear a
scientist and logician; that Ibn Rushd should have known—really
known—and commented his Aristotle as he did, shows that the
human brain, after all, is a sane brain and has the power of
unconsciously rejecting and throwing out nonsense and falsehood.
But it is not wonderful that, dealing with such materials and
contradictions, they developed a tendency to mysticism. There were
many things which they felt compelled to hold which could only be
defended and rationalized in that cloudy air and slanting light.
Especially, no one but a mystic could bring together the emanations
of Plotinus, the ideas of Plato, the spheres of Aristotle and the
seven-storied heaven of Muhammad. With this matter of mysticism
we shall have to deal immediately. Of al-Farabi it is enough to say
that he was one of the most patient of the laborers at that
impossible problem. It seems never to have occurred to him, or to
any of the others, that the first and great imperative was to verify
his references and sources. The oriental, like the mediæval
scholastic, tests minutely the form of his syllogism, but takes little
thought whether his premises state facts or not. With a scrupulous
scepticism in deduction, he combines a childlike acceptance on
tradition or on the narrowest of inductions.
But there are other and more ominous signs in
al-Farabi of the scholastic decline. There appears AL-FARABI
first in him that tendency toward the writing of
encyclopædic compends, which always means superficiality and the
commonplace. Al-Farabi himself could not be accused of either, but
that he thus claimed all knowledge for his portion showed the risk of
the premature circle and the small gain. Another is mysticism. He is
a neo-Platonist, more exactly a Plotinian; although he himself would
not have recognized this title. He held, as we have seen, that he was
simply retelling the doctrines of Plato and Aristotle. But he was also
a devout Muslim. He seems to have taken in earnest all the bizarre
details of Muslim cosmography and eschatology; the Pen, the Tablet,
the Throne, the Angels in all their ranks and functions mingle
picturesquely with the system of Plotinus, his ἕν, his ψυχή, his νοῦς,
his receptive and active intellects. But to make tenable this position
he had to take the great leap of the mystic. Unto us these things are
impossible; with God, i.e., on another plane of existence, they are
the simplest realities. If the veil were taken from our eyes we would
see them. This has always been the refuge of the devout Muslim
who has tampered with science. We shall look for it more in detail
when we come to al-Ghazzali, who has put it into classical form.
Again, he was, in modern terms, a monarchist and a clericalist. His
conception of the model state is a strange compound of the republic
of Plato and Shi‘ite dreams of an infallible Imam. Its roots lie, of
course, in the theocratic idea of the Muslim state; but his city, which
is to take in all mankind, a Holy Roman Empire and a Holy Catholic
Church at once, a community of saints ruled by sages, shows a later
influence than that of the mother city of Islam, al-Madina, under Abu
Bakr and Umar. The influence is that of the Fatimids with their
capital, al-Mahdiya, near Tunis. The Hamdanids were Shi‘ites and
Sayf ad-Dawla, under whom al-Farabi enjoyed peace and protection,
was a vassal of the Fatimid Khalifas.
This brings us again to the great mystery of Muslim history. What
was the truth of the Fatimid movement? Was the family of the
Prophet the fosterer of science from the earliest times? What degree
of contact had they with the Mu‘tazilites? With the founders of
grammar, of alchemy, of law? That they were themselves the actual
beginners of everything—and everything has been claimed for them
—we may put down to legend. But one thing does stand fast. Just as
al-Ma’mun combined the establishment of a great university at
Baghdad with a favoring of the Alids, so the Fatimids in Cairo
erected a great hall of science and threw all their influence and
authority into the spreading and extending of knowledge. This
institution seems to have been a combination of free public library
and university, and was probably the gateway connecting between
the inner circle of initiated Fatimid leaders and the outside,
uninitiated world. We have already seen how unhappy were the
external effects of the Shi‘ite, and especially of the Fatimid,
propaganda on the Muslim world. But from time to time we become
aware of a deep undercurrent of scientific and philosophical labor
and investigation accompanying that propaganda, and striving after
knowledge and truth. It belongs to the life below the surface, which
we can know only through its occasional outbursts. Some of these
are given above; others will follow. The whole matter is obscure to
the last degree, and dogmatic statements and explanations are not
in place. It may be that it was only a natural drawing together on
the part of all the different forces and movements that were under a
ban and had to live in secrecy and stillness. It may be that the
students of the new sciences passed over, simply through their
studies and political despair—as has often happened in our day—into
different degrees of nihilism, or, at the other extreme, into a
passionate searching for, and dependence on, some absolute guide,
an infallible Imam. It may be that we have read wrongly the whole
history of the Fatimid movement; that it was in reality a deeply laid
and slowly ripened plan to bring the rule of the world into the
control of a band of philosophers, whose task it was to be to rule the
human race and gradually to educate it into self-rule; that they saw
—these unknown devotees of science and truth—no other way of
breaking down the barriers of Islam and setting free the spirits of
men. A wild hypothesis! But in face of the real mystery no
hypothesis can seem wild.
Closely allied with both al-Farabi and the
Fatimids is the association known as the Sincere IKHWAN AS-SAFA
Brethren (Ikhwan as-safa). It existed at al-Basra in
the middle of the fourth century of the Hijra during the breathing
space which the free intellectual life enjoyed after the capture of
Baghdad by the Buwayhids in 334. It will be remembered how that
Persian dynasty was Shi‘ite by creed and how it, for the time,
completely clipped the claws of the orthodox and Sunnite Abbasid
Khalifas. The only thing, thereafter, which heretics and philosophers
had to fear was the enmity of the populace, but that seems to have
been great enough. The Hanbalite mob of Baghdad had grown to be
a thing of terror. It was, then, an educational campaign on which
this new philosophy had to enter. Their programme was by means of
clubs, propagating themselves and spreading over the country from
al-Basra and Baghdad, to reach all educated people and introduce
among them gradually a complete change in their religious and
scientific ideas. Their teaching was the same combination of neo-
Platonic speculation and mysticism with Aristotelian natural science,
wrapped in Mu‘tazilite theology, that we have already known. Only
there was added to it a Pythagorean reverence for numbers, and
everything, besides, was treated in an eminently superficial and
popularized manner. Our knowledge of the Fraternity and its objects
is based on its publication, “The Epistles of the Sincere Brethren”
(Rasa’il ikhwan as-safa) and upon scanty historical notices. The
Epistles are fifty or fifty-one in number and cover the field of human
knowledge as then conceived. They form, in fact, an Arabic
Encyclopédie. The founders of the Fraternity, and authors,
presumably, of the Epistles, were at most ten. We have no certain
knowledge that the Fraternity ever took even its first step and
spread to Baghdad. Beyond that almost certainly the development
did not pass. The division of members into four—learners, teachers,
guides, and drawers near to God in supernatural vision—and the
plan of regular meetings of each circle for study and mutual
edification remained in its paper form. The society was half a secret
one and lacked, apparently, vitality and energy. There was among its
founders no man of weight and character. So it passed away and has
left only these Epistles which have come down to us in numerous
MSS., showing how eagerly they have been read and copied and
how much influence they at least must have exercised. That
influence must have been very mixed. It was, it is true, for
intellectual life, yet it carried with it in a still higher degree the
defects we have already noticed in al-Farabi. To them must be added
the most simple skimming of all real philosophical problems and a
treatment of nature and natural science which had lost all
connection with facts.
It has been suggested, and the suggestion
seems luminous and fertile, that this Fraternity was THE IKHWAN
AND THE
simply a part of the great Fatimid propaganda FATIMIDS
which, as we know, honey-combed the ground
everywhere under the Sunnite Abbasids. Descriptions which have
reached us of the methods followed by the leaders of the Fraternity
agree exactly with those of the missionaries of the Isma‘ilians. They
raised difficulties and suggested serious questionings; hinted at
possible answers but did not give them; referred to a source where
all questions would be answered. Again, their catch-words and fixed
phrases are the same as those afterward used by the Assassins, and
we have traces of these Epistles forming a part of the sacred library
of the Assassins. It is to be remembered that the Assassins were not
simply robber bands who struck terror by their methods. Both the
western and the eastern branches were devoted to science, and it
may be that in their mountain fortresses there was the most
absolute devotion to true learning that then existed. When the
Mongols captured Alamut, they found it rich in MSS. and in
instruments and apparatus of every kind. It is then possible that the
elevated eclecticism of the Ikhwan as-safa was the real doctrine of
the Fatimids, the Assassins, the Qarmatians and the Druses;
certainly, wherever we can test them there is the most singular
agreement. It is a mechanical and æsthetic pantheism, a
glorification of Pythagoreanism, with its music and numbers;
idealistic to the last degree; a worship and pursuit of a conception of
a harmony and beauty in all the universe, to find which is to find and
know the Creator Himself. It is thus far removed from materialism
and atheism, but could easily be misrepresented as both. This, it is
true, is a very different explanation from the one given in our first
Part; it can only be put along-side of that and left there. The one
expresses the practical effect of the Isma‘ilians in Islam; the other
what may have been their ideal. However we judge them, we must
always remember that somewhere in their teaching, at its best,
there was a strange attraction for thinking and troubled men. Nasir
ibn Khusraw, a Persian Faust, found peace at Cairo between 437 and
444 in recognizing the divine Imamship of al-Mustansir, and after a
life of persecution died in that faith as a hermit in the mountains of
Badakhshan in 481. The great Spanish poet, Ibn Hani, who died in
362, similarly accepted al-Mu‘izz as his spiritual chief and guide.
Another eclectic sect, but on a very different
principle, was that of the Karramites, founded by IBN KARRAM
Abu Abd Allah ibn Karram, who died in 256. Its
teachings had the honor to be accepted and protected by no less a
man than the celebrated Mahmud of Ghazna (388-421), Mahmud
the Idol-breaker, the first invader of India and the patron of al-
Beruni, Firdawsi, Ibn Sina and many another. But that, to which we
will return, belongs to a later date and, probably, to a modified form
of Ibn Karram’s teaching. For himself, he was an ascetic of Sijistan
and, according to the story, a man of no education. He lost himself
in theological subtleties which he seems to have failed to
understand. However, out of them all he put together a book which
he called “The Punishment of the Grave,” which spread widely in
Khurasan. It was, in part, a frank recoil to the crassest
anthropomorphism. Thus, for him, God actually sat upon the throne,
was in a place, had direction and so could move from one point to
another. He had a body with flesh, blood, and limbs; He could be
embraced by those who were purified to the requisite point. It was a
literal acceptance of the material expressions of the Qur’an along
with a consideration of how they could be so, and an explanation by
comparison with men—all opposed to the principle bila kayfa. So,
apparently, we must understand the curious fact that he was also a
Murji’ite and held faith to be only acknowledgment with the tongue.
All men, except professed apostates, are believers, he said, because
of that primal covenant, taken by God with the seed of Adam, when
He asked, “Am I not your Lord?” (Alastu bi-rabbikum) and they,
brought forth from Adam’s loins for the purpose, made answer, “Yea,
verily, in this covenant we remain until we formally cast it off.” This,
of course, involved taking God’s qualities in the most literal sense.
So, if we are to see in the Mu‘tazilites scholastic commentators
trying to reduce Muhammad, the poet, to logic and sense, we must
see in Ibn Karram one of those wooden-minded literalists, for whom
a metaphor is a ridiculous lie if it cannot be taken in its external
meaning. He was part of the great stream of conservative reaction,
in which we find also such a man as Ahmad ibn Hanbal. But the
saving salt of Ahmad’s sense and reverence kept him by the safe
proviso “without considering how and without comparison.” All
Ahmad’s later followers were not so wise. In his doctrine of the state
Ibn Karram inclined to the Kharijites.
Before we return to al-Jubba‘i and the fate of the Mu‘tazilites, it
remains to trace more precisely the thread of mysticism, that kashf,
revelation, which we have already mentioned several times. Its
fundamental fact is that it had two sides, an ascetic and a
speculative, different in degree, in spirit and in result, and yet so
closely entangled that the same mystic has been assigned, in good
and in bad faith, as an adherent of both.
It is to the form of mysticism which sprang from
asceticism that we must first turn. Attention has WOMEN SAINTS
been given above to the wandering monks and
hermits, the sa’ihs (wanderers) and rahibs who caught Muhammad’s
attention and respect. We have seen, too, how Muslim imitators
began in their turn to wander through the land, clad in the coarse
woollen robes which gave them the name of Sufis, and living upon
the alms of the pious. How early these appeared in any number and
as a fixed profession is uncertain, but we find stories in circulation of
meetings between such mendicant friars and al-Hasan al-Basri
himself. Women, too, were among them, and it is possible that to
their influence a development of devotional love-poetry was due. At
least, many verses of this kind are ascribed to a certain Rabi‘a, an
ascetic and ecstatic devotee of the most extreme other-worldliness,
who died in 135. Many other women had part in the contemplative
life. Among them may be mentioned, to show its grasp and spread,
A’isha, daughter of Ja‘far as-Sadiq, who died in 145; Fatima of
Naysabur, who died in 223, and the Lady Nafisa, a contemporary
and rival in learning with ash-Shafi‘i and the marvel of her time in
piety and the ascetic life. Her grave is one of the most venerated
spots in Cairo, and at it wonders are still worked and prayer is
always answered. She was a descendant of al-Hasan, the martyred
ex-Khalifa, and an example of how the fated family of the Prophet
was an early school for women saints. Even in the Heathenism we
have traces of female penitents and hermits, and the tragedy of Ali
and his sons and descendants gave scope for the self-sacrifice,
loving service and religious enthusiasm with which women are
dowered.
All these stood and stand in Islam on exactly the same footing as
men. The distinction in Roman Christendom that a woman cannot be
a priest there falls away, for in Islam is neither priest nor layman.
They lived either as solitaries or in conventual life exactly as did the
men. They were called by the same terms in feminine form; they
were Sufiyas beside the Sufis; Zahidas (ascetics) beside the Zahids;
Waliyas (friends of God) beside the Walis; Abidas (devotees) beside
the Abids. They worked wonders (karamat, closely akin to the
χαρίσματα of 1 Cor. xii, 9) by the divine grace, and still, as we have
seen, at their own graves such are granted through them to the
faithful, and their intercession (shafa‘a) is invoked. Their religious
exercises were the same; they held dhikrs and women darwishes yet
dance to singing and music in order to bring on fits of ecstasy. To
state the case generally, whatever is said hereafter of mysticism and
its workings among men must be taken as applying to women also.
To return: one of the earliest male devotees of whom we have
distinct note is Ibrahim ibn Adham. He was a wanderer of royal
blood, drifted from Balkh in Afghanistan to al-Basra and to Mecca.
He died in 161. Contempt for the learning of lawyers and for
external forms appears in him; obedience to God, contemplation of
death, death to the world formed his teaching. Another, Da’ud ibn
Nusayr, who died in 165, was wont to say, “Flee men as thou fleest a
lion. Fast from the world and let the breaking of thy fast be when
thou diest.” Another, al-Fudayl ibn Iyad of Khurasan, who died in
187, was a robber converted by a heavenly voice; he cast aside the
world, and his utterances show that he lapsed into the passivity of
quietism.
Reference has already been made in the chapter on jurisprudence
to the development of asceticism which came with the accession of
the Abbasids. The disappointed hopes of the old believers found an
outlet in the contemplative life. They withdrew from the world and
would have nothing to do with its rulers; their wealth and everything
connected with them they regarded as unclean. Ahmad ibn Hanbal
in his later life had to use all his obstinacy and ingenuity to keep free
of the court and its contamination. Another was this al-Fudayl.
Stories—chronologically impossible—are told how he rebuked Harun
ar-Rashid for his luxury and tyranny and denounced to his face his
manner of life. With such an attitude to those round him he could
have had little joy in his devotion. So it was said, “When al-Fudayl
died, sadness was removed from the world.”
But soon the recoil came. Under the spur of such
exercises and thoughts, the ecstatic oriental PASSAGE OF
ASCETICISM TO
temperament began to revel in expressions ECSTASY
borrowed from human love and earthly wine. Such
we find by Ma‘ruf of al-Karkh, a district of Baghdad, who died in 200,
and whose tomb, saved by popular reverence, is one of the few
ancient sites in modern Baghdad; and by his greater disciple, Sari
as-Saqati, who died in 257. To this last is ascribed, but dubiously, the
first use of the word tawhid to signify the union of the soul with
God. The figure that the heart is a mirror to image back God and
that it is darkened by the things of the body appears in Abu
Sulayman of Damascus, who died in 215. A more celebrated ascetic,
who died in 227, Bishr al-Hafi (bare-foot), speaks of God directly as
the Beloved (habib). Al-Harith al-Muhasibi was a contemporary of
Ahmad ibn Hanbal and died in 243. The only thing in him to which
Ahmad could take exception was that he made use of kalam in
refuting the Mu‘tazilites; even this suspicion against him he is said to
have abandoned. Sari and Bishr, too, were close friends of Ahmad’s.
Dhu-n-Nun, the Egyptian Sufi, who died in 245, is in more dubious
repute. He is said to have been the first to formulate the doctrine of
ecstatic states (hals, maqamas); but if he went no further than this,
his orthodoxy, in the broad sense, should be above suspicion. Islam
has now come to accept these as right and fitting. Perhaps the
greatest name in early Sufiism is that of al-Junayd (d. 297); on it no
shadow of heresy has ever fallen. He was a master in theology and
law, reverenced as one of the greatest of the early doctors.
Questions of tawhid he is said to have discussed before his pupils
with shut doors. But this was probably tawhid in the theological and
not in the mystical sense—against the Mu‘tazilites and not on the
union of the soul with God. Yet he, too, knew the ecstatic life and
fell fainting at verses which struck into his soul. Ash-Shibli (d. 334)
was one of his disciples, but seems to have given himself more
completely to the ascetic and contemplative life. In verses by him we
find the vocabulary of the amorous intercourse with God fully
developed. The last of this group to be mentioned here shall be Abu
Talib al-Makki, who died in 386. It is his distinction to have furnished
a text-book of Sufiism that is in use to this day. He wrote and spoke
openly on tawhid, now in the Sufi sense, and got into trouble as a
heretic, but his memory has been restored to orthodoxy by the
general agreement of Islam. When, in 488, al-Ghazzali set himself to
seek light in Sufiism, among the treatises he studied were the books
of four of those mentioned above, Abu Talib, al-Muhasibi, al-Junayd,
and ash-Shibli.
In the case of these and all the others already
spoken of there was nothing but a very simple and GROWTH OF
FRATERNITIES
natural development such as could easily be
paralleled in Europe. The earliest Muslims were burdened, as we
have seen, with the fear of the terrors of an avenging God. The
world was evil and fleeting; the only abiding good was in the other
world; so their religion became an ascetic other-worldliness. They
fled into the wilderness from the wrath to come. Wandering, either
solitary or in companies, was the special sign of the true Sufi. The
young men gave themselves over to the guidance of the older men;
little circles of disciples gathered round a venerated Shaykh;
fraternities began to form. So we find it in the case of al-Junayd, so
in that of Sari as-Saqati. Next would come a monastery, rather a
rest-house; for only in the winter and for rest did they remain fixed
in a place for any time. Of such a monastery there is a trace at
Damascus in 150 and in Khurasan about 200. Then, just as in
Europe, begging friars organized themselves. In faith they were
rather conservative than anything else; touched with a religious
passivism which easily developed into quietism. Their ecstasies went
little beyond those, for instance, of Thomas à Kempis, though struck
with a warmer oriental fervor.
The points on which the doctors of Islam took exception to these
earlier Sufis are strikingly different from what we would expect. They
concern the practical life far more than theological speculation. As
was natural in the case of professional devotees, a constantly
prayerful attitude began to assume importance beside and in
contrast to the formal use of the five daily prayers, the salawat. This
development was in all probability aided by the existence in Syria of
the Christian sect of the Euchites, who exalted the duty of prayer
above all other religious obligations. These, also, abandoned
property and obligations and wandered as poor brethren over the
country. They were a branch of Hesychasts, the quietistic Greek
monks who eventually led to the controversy concerning the
uncreated light manifested at the transfiguration on Mount Tabor
and added a doctrine to the Eastern Church. Considering these
points, it can hardly be doubted that there was some historical
connection and relation here, not only with earlier but also with later
Sufiism. There is a striking resemblance between the Sufis seeking
by patient introspection to see the actual light of God’s presence in
their hearts, and the Greek monks in Athos, sitting solitarily in their
cells and seeking the divine light of Mount Tabor in contemplation of
their navels.
But our immediate point is the matter of constant, free prayer. In
the Qur’an (xxxiii, 41) the believers are exhorted to “remember
(dhikr) God often;” this command the Sufis obeyed with a correlative
depreciation of the five canonical prayers. Their meetings for the
purpose, much like our own prayer-meetings, still more like the
“class-meetings” of the early Methodists, as opposed to stated public
worship, were called dhikrs. These services were fiercely attacked by
the orthodox theologians, but survived and are the darwish functions
which tourists still go to see at Constantinople and Cairo. But the
more private and personal dhikrs of individual Sufis, each in his
house repeating his Qur’anic litanies through the night, until to the
passer-by it sounded like the humming of bees or the unceasing drip
of roof-gutters, these seem, in the course of the third century, to
have fallen before ridicule and accusations of heresy.
Another point against the earlier Sufis was their
abuse of the principle of tawakkul, dependence TAWAKKUL
upon God. They gave up their trades and
professions; they even gave up the asking for alms. Their ideal was
to be absolutely at God’s disposal, utterly cast upon His direct
sustenance (rizq). No anxiety for their daily bread was permitted to
them; they must go through the world separated from it and its
needs and looking up to God. Only one who can do this is properly
an acknowledger of God’s unity, a true Muwahhid. To such, God
would assuredly open the door of help; they were at His gate; and
the biographies of the saints are full of tales how His help used to
come.
To this it may be imagined that the more sober, even among Sufis,
made vehement objection. It fell under two heads. One was that of
kasb, the gaining of daily bread by labor. The examples of the
husbandman who casts his seed into the ground and then depends
upon God, of the merchant who travels with his wares in similar
trust, were held up against the wandering but useless monk. As
always, traditions were forged on both sides. Said a man—
apparently in a spirit of prophecy—one day to the Prophet, “Shall I
let my camel run free and trust in God?” Replied the Prophet, or
someone for him with a good imitation of his humorous common-
sense, “Tie up your camel and trust in God.” The other head was the
use of remedies in sickness. The whole controversy parallels
strikingly the “mental science” and “Christian science” of the present
day. Medicine, it was held, destroyed tawakkul. In the fourth century
in Persia this insanity ran high and many books were written for it
and against it. The author of one on the first side was consulted in
an obstinate case of headache. “Put my book under your pillow,” he
said, “and trust in God.” On both these points the usage of the
Prophet and the Companions was in the teeth of the Sufi position.
They had notoriously earned their living, honestly or dishonestly, and
had possessed all the credulity of semi-civilization toward the most
barbaric and multifarious remedies. So the agreement of Islam
eventually righted itself, though the question in its intricacies and
subtilties remained for centuries a thing of delight for theologians. In
the end only the wildest fanatics held by absolute tawakkul.
But all this time the second form of Sufiism had
been slowly forcing its way. It was essentially SPECULATIVE
SUFIISM
speculative and theological rather than ascetic and
devotional. When it gained the upper hand, zahid (ascetic) was no
longer a convertible term with Sufi. We pass over the boundary
between Thomas à Kempis and St. Francis to Eckhart and Suso. The
roots of this movement cannot be hard to find in the light of what
has preceded. They lie partly in the neo-Platonism which is the
foundation of the philosophy of Islam. Probably it did not come to
the Sufis along the same channels by which it reached al-Farabi. It
was rather through the Christian mystics and, perhaps, especially
through the Pseudo-Dionysius the Areopagite, and his asserted
teacher, Stephen bar Sudaili with his Syriac “Book of Hierotheos.” We
need not here consider whether the Monophysite heresy is to be
reckoned in as one of the results of the dying neo-Platonism. It is
true that outlying forms of it meant the frank deifying of a man and
thus raised the possibility of the equal deifying of any other man and
of all men. But there is no certainty that these views had an
influence in Islam. It is enough that from a.d. 533 we find the
Pseudo-Dionysius quoted and his influence strong with the ultra
Monophysites, and still more, thereafter, with the whole mystical
movement in Christendom. According to it, all is akin in nature to the
Absolute, and all this life below is only a reflection of the glories of
the upper sphere, where God is. Through the sacraments and a
hierarchy of angels man is led back toward Him. Only in ecstasy can
man come to a knowledge of Him. The Trinity, sin and the
atonement fade out of view. The incarnation is but an example of
how the divine and the human can join. All is an emanation or an
emission of grace from God; and the yearnings of man are back to
his source. The revolving spheres, the groaning and travailing nature
are striving to return to their origin. When this conception had seized
the Oriental Church; when it had passed into Islam and dominated
its emotional and religious life; when through the translation of the
Pseudo-Dionysius by Scotus Erigena in 850, it had begun the long
contest of idealism in Europe, the dead school of Plotinus had won
the field, and its influence ruled from the Oxus to the Atlantic.
But the roots of Sufiism struck also in another direction. We have
already seen an early tendency to regard Ali and, later, members of
his house as incarnations of divinity. In the East, where God comes
near to man, the conception of God in man is not difficult. The
Semitic prophet through whom God speaks easily slips over into a
divine being in whom God exists and may be worshipped. But if with
one, why not with another? May it not be possible by purifying
exercises to reach this unity? If one is a Son of God, may not all
become that if they but take the means? The half-understood
pantheism which always lurks behind oriental fervors claims its due.
From his wild whirling dance, the darwish, stung to cataleptic
ecstasy by the throbbing of the drums and the lilting chant, sinks
back into the unconsciousness of the divine oneness. He has passed
temporarily from this scene of multiplicity into the sea of God’s unity
and, at death, if he but persevere, he will reach that haven where he
fain would be and will abide there forever. Here, we have not to do
with calm philosophers rearing their systems in labored speculations,
but with men, often untaught, seeking the salvation of their souls
earnestly and with tears.
One of the earliest of the pantheistic school was
Abu Yazid al-Bistami (d. 261). He was of Persian PANTHEISTIC
SCHOOL
parentage, and his father had been a follower of
Zarathustra. As an ascetic he was of the highest repute; he was also
an author of eminence on Sufiism (al-Ghazzali used his books) and
he joined to his devout learning and self-mortification clear
miraculous gifts. But equally clear was his pantheistic drift and his
name has come down linked to the saying, “Beneath my cloak there
is naught else than God.” It is worth noticing that certain other of his
sayings show that, even in his time, there were Sufi saints who
boasted that they had reached such perfection and such miraculous
powers that the ordinary moral and ceremonial law no longer applied
to them. The antinomianism which haunted the later Sufiism and
darwishdom had already appeared.
But the greatest name of all among these early
pantheists was that of al-Hallaj (the cotton carder), AL-HALLAJ
a pupil of al-Junayd, who was put to death with
great cruelty in 309. It is almost impossible to reach any certain
conclusion as to his real views and aims. In spite of what seem to be
utterances of the crassest pantheism, such as, “I am the Truth,”
there have not been wanting many in later Islam who have
reverenced his memory as that of a saint and martyr. To Sufis and
darwishes of his time and to this day he has been and is a patron
saint. In his life and death he represents for them the spirit of revolt
against dogmatic scholasticism and formalism. Further, even such a
great doctor of the Muslim Church as al-Ghazzali defended him and,
though lamenting some incautious phrases, upheld his orthodoxy. At
his trial itself before the theologians of Baghdad, one of them
refused to sign the fatwa declaring him an unbeliever; he was not
clear, he said, as to the case. And it is true that such records as we
have of the time suggest that his condemnation was forced by the
government as a matter of state policy. He was a Persian of Magian
origin, and evidently an advanced mystic of the speculative type. He
carried the theory to its legitimate conclusion, and proclaimed the
result publicly. He dabbled in scholastic theology; had evident
Mu‘tazilite leanings; wrote on alchemy and things esoteric. But with
this mystical enthusiasm there seem to have united in him other and
more dangerous traits. The stories which have reached us show him
of a character fond of excitement and change, surrounding himself
with devoted adherents and striving by miracle-working of a
commonplace kind to add to his following. His popularity among the
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like