100% found this document useful (1 vote)
94 views76 pages

PHP: 3 Books in 1: PHP Basics For Beginners + PHP Security and Session Management + Advanced PHP Functions Andy Vickler Ebook All Chapters PDF

books

Uploaded by

felcchans
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
94 views76 pages

PHP: 3 Books in 1: PHP Basics For Beginners + PHP Security and Session Management + Advanced PHP Functions Andy Vickler Ebook All Chapters PDF

books

Uploaded by

felcchans
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 76

Download Full Version ebookmass - Visit ebookmass.

com

PHP: 3 books in 1 : PHP Basics for Beginners + PHP


security and session management + Advanced PHP
functions Andy Vickler

https://ebookmass.com/product/php-3-books-in-1-php-basics-
for-beginners-php-security-and-session-management-advanced-
php-functions-andy-vickler/

OR CLICK HERE

DOWLOAD NOW

Discover More Ebook - Explore Now at ebookmass.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

PHP 8 Basics: For Programming and Web Development Gunnard


Engebreth

https://ebookmass.com/product/php-8-basics-for-programming-and-web-
development-gunnard-engebreth/

ebookmass.com

An Introduction to PHP: Learn PHP 8 to Create Dynamic


Websites 1st Edition Mark Simon

https://ebookmass.com/product/an-introduction-to-php-learn-php-8-to-
create-dynamic-websites-1st-edition-mark-simon/

ebookmass.com

An Introduction to PHP: Learn PHP 8 to Create Dynamic


Websites Mark Simon

https://ebookmass.com/product/an-introduction-to-php-learn-php-8-to-
create-dynamic-websites-mark-simon/

ebookmass.com

Contemporary Issues in Sustainable Finance: Exploring


Performance, Impact Measurement and Financial Inclusion
Mario La Torre
https://ebookmass.com/product/contemporary-issues-in-sustainable-
finance-exploring-performance-impact-measurement-and-financial-
inclusion-mario-la-torre/
ebookmass.com
Supervision: Key Link to Productivity – Ebook PDF Version

https://ebookmass.com/product/supervision-key-link-to-productivity-
ebook-pdf-version/

ebookmass.com

Russia's Interventions in Ethnic Conflicts: The Case of


Armenia and Azerbaijan 1st ed. Edition James J. Coyle

https://ebookmass.com/product/russias-interventions-in-ethnic-
conflicts-the-case-of-armenia-and-azerbaijan-1st-ed-edition-james-j-
coyle/
ebookmass.com

Blood Lust: Book One in the Blood-letting Series T.A.


Lumley

https://ebookmass.com/product/blood-lust-book-one-in-the-blood-
letting-series-t-a-lumley/

ebookmass.com

Risk Parity: How to Invest for All Market Environments


Alex Shahidi

https://ebookmass.com/product/risk-parity-how-to-invest-for-all-
market-environments-alex-shahidi/

ebookmass.com

American Science Fiction Television and Space. Productions


and (Re)configurations (1987-2021) Joel Hawkes

https://ebookmass.com/product/american-science-fiction-television-and-
space-productions-and-reconfigurations-1987-2021-joel-hawkes/

ebookmass.com
Dante John Took

https://ebookmass.com/product/dante-john-took/

ebookmass.com
© Copyright 2022 - All rights reserved.

The contents of this book may not be reproduced, duplicated, or transmitted without direct written permission from the author.
Under no circumstances will any legal responsibility or blame be held against the publisher for any reparation, damages, or
monetary loss due to the information herein, either directly or indirectly.

Legal Notice:
You cannot amend, distribute, sell, use, quote, or paraphrase any part of the content within this book without the consent of the
author.

Disclaimer Notice:
Please note the information contained within this document is for educational and entertainment purposes only. No warranties of
any kind are expressed or implied. Readers acknowledge that the author is not engaging in the rendering of legal, financial,
medical, or professional advice. Please consult a licensed professional before attempting any techniques outlined in this book.

By reading this document, the reader agrees that under no circumstances is the author responsible for any losses, direct or
indirect, which are incurred as a result of the use of the information contained within this document, including, but not limited to,
—errors, omissions, or inaccuracies.
Table of Contents

PHP
PHP Basics for Beginners
Introduction
PHP – Definition and History
PHP Structure
PHP Code Syntax.
PHP Objects & Classes
Obstacles to Mastering Object-Oriented Programming
What Are Object and Classes in PHP
Instantiation
The Variable $this
Access Modifiers
Inheritance
The Overriding of Method
Horizontal Inheritance - Using Traits
Invoking Parent Methods
Polymorphism
Encapsulation
Dunder Methods in PHP
__construct ()
__destruct()
__get(), __set(), __isset()
__call()
__sleep()
__wakeup()
__clone()
Abstract Classes & Method
Abstract Keyword
Abstract Methods
Final Keyword
Interfaces
Interface and Implements Keywords
Static Methods & Properties
Static Properties
Late Static Binding
Error Control and Exception Handling in PHP
The Pre-Existing Exception Class
Throwing an Exception
Setting a Level of Desired Error Sensitivity.
Error Reporting Sensitivity Levels
Logging Options
The Design Pattern of Model_View_Controller
The MCV URL Structure & URL Mapping
The index.PHP File
MVC Folder Structure
Develop the Functionality to Add New Carte Products
The Reflection API
The Pear Library
Install PEAR in a Windows Zend Framework Environment
Installation of PEAR in a Windows XAMPP Environment
Install PEAR in a Windows WAMP Environment
Install PEAR on Mac OS
Installing PEAR on Linux
Using PEAR - EXAMPLE:
Unit Testing With Phpunit
Installation of PHPUnit
Install PHPUnit on Macbook
Installation of PHPUnit on Linux
Test fixtures
Test Phases
Writing Test Cases
Assertion Methods
Testing Data from HTML Form Submissions
Test Suites
Mocks and Stubs
Create a Mock Class
Running PHPUnit from Eclipse Without Plug-ins
SVN - Source Code Management With Subversion
Installing Subversion on Windows
Installing Subversion on Macbook
PHP
PHP Security and Session Management
Chapter 1: Introduction to Php Security
XSS Attacks
Session Hijacking
Injection
Php Sessions
Create Sessions
Access Session
Destroy Session
XSS (Cross-Site Scripting) Attack
Session Side Jacking
Fixation of the Session
PHP Session Protection
Php Manual
Chapter 2: XSS (Site-to-Site Scripting)
Virus Infection of a Website
Stored (Persistent) XSS
Examples of Cross-Site Scripting (XSS)
Hijacking
Risk Levels of XSS Vulnerabilities
Preventing and Mitigating XSS Attacks
The usage of similar data types.
Validation of Input
Sanitization of the Output
XSS Testing Tool by PT AI
Chapter 3: Session Hijacking
The Different Types of Brute Force Attacks
Malicious Activity Hijacking Systems
Brute-Force-Attacking Tools
How Can Brute Force Attacks Be Prevented?
Chapter 4: Injections
SQLI Avoidance and Prevention
Cross-Site Scripting (Cross-Site Scripting) is an (XSS)
Alternate XSS Syntax
How to Prevent Code Injection in Applications?
How Can You Find Injection Flaws in Your Web App?
How Can Injection Attacks be Avoided?
Chapter 5: XSRF/CSRF
Preventing XSRF or CSRF Attack
Chapter 6: Php Security Best Practices
Chapter 7: Session Management
Chapter 8: Php Sessions
What Is a PHP Session, Exactly?
Create Sessions
Access Sessions
Destroying a Session
Chapter 9: How Secure Is Php Session
Unpatched Vulnerabilities With PHP Presentations
Hijacking Session Attack Working
Chapter 10: Php Session Management Best Practice
Chapter 11: Php Manual

PHP
Advanced PHP Functions
Introduction
Chapter 1: PHP Functions
Defining a Function
Types of Functions in PHP
PHP Function Arguments
PHP Function Default Values
Returning Values
Chapter 2: PHP Arrays
Length of an Array
PHP Indexed Arrays
PHP Associative Arrays
Multidimensional Arrays
Sorting Arrays
Chapter 3: PHP Superglobals
PHP $_SERVER
PHP $_POST Variable
Interactive PHP Programming
PHP Date and Time
Chapter 4: Object-oriented Programming
PHP Classes
Class Objects
Adding More Methods to the Guns Class
PHP The_Construct Function
The_Destruct Function of PHP
PHP Access Modifiers
Inheritance Classes
PHP Final Keyword
PHP Abstract Classes
PHP Class Interfaces
Chapter 5: Database Creation in PHP
Make the Connection
MySQLi Procedural
Database Creation
Table Creation
Chapter 6: PHP and SQL Database Commands
SQL Column Selection
WHERE Examples
Text Fields
The SQL AND, OR Operators
The NOT Clause
The Double Not Clause
Deciphering the SQL ORDER BY Keyboard
SQL Insert Into Clause
The UPDATE Statement
The DELETE Statement
TOP, ROWNUM, LIMIT Clause
The TOP 50 Percent
The Wildcards
Chapter 7: Restful APIs
Benefits of RESTful APIs
How to Create RESTful APIs
The Syntax for RESTful APIs
Chapter 8: PHP and Internet Services
Benefits of Using PHP for Internet Services
Challenges in Using PHP for Internet Services
Examples of Internet Services That Use PHP
Chapter 9: PHP Graphics
Drawing Lines in PHP
Drawing Rectangles in PHP
Drawing Circles in PHP
Drawing Polygons in PHP
Chapter 10: Files
PHP File Function Syntax
Uses of the Files Function
Chapter 11: Session and Cookies
Types of Cookies in PHP
Chapter 12: Mathematical Functions
Chapter 13: Working With Arrays
Chapter 14: String Functions
Benefits of String Functions in PHP
Examples of String Functions
Conclusion
PHP
PHP BASICS FOR BEGINNERS

Andy Vickler
Introduction

After learning PHP, I secured a high-paying back-end web development job right out of college
by demonstrating to recruiters my command of the language and my understanding of other
aspects of web development through my developed project. PHP is a relatively easy language for
beginners to learn, with a clean and stylish syntax, whose mastery is possible within a relatively
short duration from beginner to the professional level, typically 2–3 months. However, there is a
caveat.

As a novice, the instructor and the method of instruction have a considerable impact on the
learner's ability to assimilate. Without a good tutor, the student may quickly lose interest in the
subject. This can have a huge impact on one's career path in the worst-case situation. I, too, had
to struggle to learn these things.

Throughout my education, I learned that most PHP study materials - books, PDFs, and tutorials -
are not user-friendly. I felt that the author/tutor rushed through the course and neglected to
clarify the thought process required to get at the reasoning behind particular lines of code,
assuming the audience is already conversant with PHP. This is not the case for a newbie, so I
will spend time explaining the logic behind each code in this book.

When it comes to learning PHP, it is critical to choose an effective resource - one that keeps the
learning curve linear and progresses to difficult topics. After providing sufficient insight and
examples on the concepts, one that discusses the questions asked by recruiters at top
organizations, one that offers in-class support in the form of resolving any doubts students may
have about a concept or while solving practice problems, one that provides in-class support in the
form of resolving any questions students may have about a concept.

I'd like to emphasize that I relied heavily on free online video classes when I began learning.
However, as time went on, I learned that one of the primary challenges with learning from them
is that a 'free and open to everyone' society often attracts those who only want to make a quick
buck resulting in low-quality content.

Additionally, I noticed on a few websites that the author uses untaught reasoning when
answering programming queries or defining a concept. As a result, the learner will be guided to
the educational portions that handle that specific subject. The topics taught in those sections are
based on the rationale offered in another resource area; this book will try to avoid such an
approach.
PHP – Definition and History

The abbreviation PHP means Hypertext Preprocessor. The initial letter of the acronym represents
the full term, a most confusing trait of the language. It is considered to be a pretty simple one to
master.

PHP is a scripting language primarily built for the construction of websites. Data retrieval from
SQL databases is a typical use. It is also used in the production of graphs and other
visualizations. For instance, a designer can create links to images or make thumbnails for an
image gallery. PHP is responsible for duties such as password acceptance, user authentication,
and handling forum posts and guest books. Another frequent application is Facebook integration.

You may even use PHP to develop a website that enables users to create content - even if they
lack basic HTML knowledge!

The fact that PHP is dynamic is one of the key distinctions between it and normal HTML.
However, this is not an either/or scenario as both languages are interoperable. PHP has the
ability to generate HTML code.

PHP in its current form is a descendent of a program called PHP/FI. PHP’s first release was in
1994 by Rasmus Lerdorf. He named the script package "Personal Home Page Tools" or "PHP
Tools" because it was originally used to track visits to his online curriculum vitae. Rasmus
modified PHP Tools over time when additional functionality became necessary, resulting in a
substantially larger and more powerful implementation.

This new paradigm may interact with databases and other systems, enabling users to construct
simple dynamic web applications such as guestbooks. Rasmus gave the PHP Tools source code
to the public in June 1995, allowing developers to tweak it as desired. Additionally, users were
able - and encouraged - to provide solutions for code faults as well as general improvements.

Rasmus expanded PHP in September of that year, and for a little period, the PHP designation
was discarded. The new implementation, termed FI, includes several of PHP's essential functions
(short for "Forms Interpreter"). Variables resembling those found in Perl, automatic form
variable interpretation, and embedded HTML syntax were all included. Similar to Perl's syntax,
but far more restricted, basic, and inconsistent.

Developers must use HTML comments to embed code in an HTML file. Despite mixed reviews,
FI gained popularity and acceptability as a CGI tool — but not quite as much as it did as a
language. In October 1995, all this changed because Rasmus did a complete redesign of the code.
It was the first edition that included what is often considered an advanced scripting interface,
briefly called "Personal Home Page Construction Kit." The language's structure is similar to that
of C. It is, therefore, simpler for developers with experience in C, Perl, and other related
languages. The prospect of a Windows NT implementation was being explored, which had
previously been restricted to UNIX and POSIX-compliant PCs.

Rasmus renamed the code PHP/FI in April 1996, combining the names of previous iterations.
PHP began to truly emerge as a programming language in its own right with this second-
generation implementation. It supported databases DBM, mySQL, and Postgres95, as well as
cookies and user-defined functions. In June of that year, PHP / FI was upgraded to status 2.0.
PHP 2.0 was released as a single full version. It began as a beta version in the November of
1997. By that time, the main parsing engine had been totally rewritten.

Despite its brief development period, In the still-developing field of web development, it gained
a lot of traction quickly. PHP/FI gained a devoted presence of a couple of thousand individuals
throughout the world between 1997 and 1998. According to a May 1998 Netcraft survey,
Approximately 60,000 domains included the phrase "PHP" in their headers, showing that the
host server was executing it. At the time, this represented over 1% of total domains on the
Internet. Even with these impressive figures, PHP/development FI's remained small; while there
were a few tiny contributors, most of the code was written by a single person.

The edition that resembled PHP today was PHP 3.0. Following the discovery that PHP/FI 2.0
was still problematic and was incapable of running an ‘e-commerce application’ they tried to
establish as a university project, ‘Zeev Suraski’ and ‘Andi Gutmans’ of Tel Aviv, Israel, rebuilt
the parser in 1997. They corresponded with Rasmus via email over the reconstruction of PHP
and several parts of their recent implementations. Zeev, Andi, and Rasmus together begin
working on this programming language in order to improvise it and make it independent in order
to boost the engine and begin increasing the PHP/current FI user base. To prevent the idea of
limited personal usage implied by the PHP/FI 2.0 nomenclature, this brand-new language was
renamed. It was renamed "PHP" by recursively shortening the phrase Hypertext Preprocessor.

The strongest and most required characteristic of the new PHP 3.0 was its extensibility. The
language's extensibility drew numerous developers devoted to adding various components as
well as a matured interface for various APIs, protocols, and databases. This was perhaps the
deciding factor in PHP 3.0's enormous success. Additionally, PHP 3.0 was capable of supporting
OOP (object-oriented programming) along with a language syntax with substantial advancement
and uniformity.

The newly formed PHP Development Team launched PHP 3.0; PHP/FI 2.0’s official successor,
in June of 1998, attracting a significant number of fresh developers from all across the globe.
Since November of the previous year, it was clear that development on PHP/FI 2.0 had come to a
stop. ‘PHP 3.0’ has already been deployed on over 70,000 domains worldwide after nine months
of free public testing before it was allowed to portable_opetaring_system (POSIX-compliant). A
limited segment of websites reported PHP hosting on NT servers, "Windows 95, 98", and "Apple
computer." PHP 3.0 was formerly utilized on around 10% of all website servers.

In 1998, when PHP 3.0 had officially launched, Zeev Suraski and Andi Gutmans continued
working on rewriting PHP's foundation. The design's goal was to boost the efficiency of
complicated apps while simultaneously increasing the versatility of the structure of PHP. While
its enhanced functionality and availability for a vast scope of arbitrator databases and APIs
enabled such applications possible, PHP 3.0 was not designed to manage such complicated
systems rapidly.

This updated engine, nicknamed the "Zend Engine" (a combination of its founder developer's
names, Andi and Zeev), appeared in mid-1999 and accomplished these design goals. May 2000
marks the launch of PHP 4.0, succeeding its predecessor by almost two years. It was built on this
engine and included a plethora of new capabilities. PHP 4.0 has out-of-the-box support for a
plethora of new web servers, buffering of outputs, HTTP sessions, major performance
improvements, more secure methods for user input management, as well as a suite of new
language structures.

After a lengthy development and many pre-releases, July of 2004 marked the release of PHP 5. It
is primarily carried forward via its base, Zend Engine 2.0, which has a redesigned object-oriented
approach as well as a slew of additional improvements. PHP features hundreds of programmers
and others working on PHP-related and assisting initiatives such as PEAR, PECL, and manuals,
as well as a fundamental internet infrastructure that covers six contents of the world. Despite the
fact that this is an estimate based on prior years' statistics, This is reasonable to assume that PHP
is now running on hundreds of millions, if not thousands of millions, of domains worldwide.

PHP has garnered mixed reviews due to its lack of native Unicode support. In 2005, a project
was started to provide native Unicode compatibility for PHP. Andrei Zmievski oversaw this
endeavor. Due to the magnitude of the changes, it was decided to release this upgrade as a new
version, PHP 6.0. However, the project was delayed due to a dearth of developers who
understood the required enhancements. Despite the delay, PHP 5.3 was published in 2009, with a
large number of the PHP 6 project's features. In March 2010, the project was halted.

In 2014 and 2015, PHP introduced a new major version. PHP 7 was assigned to this version,
which caused some confusion, considering PHP 6 was never released. PHP 7 was also referred to
as PHP NG (PHPng). This version's purpose was to increase performance by redesigning the
Zend Engine while maintaining near-complete language compatibility. Benchmarks from July
2014 revealed a roughly 100% boost in performance. Zend Engine 3 is the new name for the
improved Zend Engine. This is a result of several key modifications.
PHP Structure

PHP Code Syntax.


PHP structure is something I must discuss before getting into more hard-core PHP programming.
So basically, PHP programming starts with a tag “<?PHP” that’s an opening tag while “>?” is
the closing tag. What it does is it tells the web browser that this is PHP and the PHP interpreter is
needed to be called. Whatever is within these two tags, that’s gonna be the actual PHP.

PHP files end with a .PHP extension with it. If you’ve worked in any other language, say html,
your files tend to end in .html. Just like that, the PHP files ends with .PHP, so whenever you save
a PHP file, you must add . PHP extention alongside the name of the file. For instance,
NewAPP.PHP.

You can also write your PHP code in html tags. In the instance shown below, you can see I’ve
used Html tags, but in the body, I have started with a PHP opening tag, and I ended PHP with
closing tag. Within these two tags comes the real PHP code. After that I used html tags again.
Here again, while using PHP and html together, make sure when you save the file you use a
.PHP extention.

This says that you can code html in your PHP file just way you want along with PHP but when it
comes to saving the file you save it with .PHP extention, and ultimately, it’s a PHP file now.

But if you’re working in pure PHP, without using any other language like html, then I’d suggest
you to not end with a closing tag >? . The reason why is when it’s just PHP in the file and
suppose you have ended with the closing tag, agter that if there’s any white spacing remaining in
your PHP script it can actually screw your program/website with the white space. So it’s better to
leave the document without a closing tag. It doesn’t make any difference when working in PHP
only.

So when working in pure PHP, just start with an opening tag and do whatever you want to do.
With pure PHP what I mean is you’re not using html css in that file. It’s only PHP in there.
When working along with html and PHP you must use your closing tag. And the extention of the
file will be .PHP.

The next thing that you’ll use the most is a semi colon ;. Just about every statement of PHP code
end with a semi colon. It differs throughout programming languages, some end with a colon (:)
some don’t use anything at all, but PHP always ends in a semi colon. You must practice this as
forgetting to add a semi colon can lead errors.
PHP Objects & Classes

Obstacles to Mastering Object-Oriented Programming


The main difficulty in explaining object-oriented programming is that there is no apparent linear
or sequential path to follow; all of the fundamental ideas are global in nature. Men are thought to
be linear thinkers, whereas women are said to be global thinkers. Men normally start at the
beginning and work in a logical order, accomplishing one task at a time. While women consider
the bigger picture, which makes them global thinkers. Object-oriented programming is built on a
foundation of broad ideas, while pure procedural programming, on the other hand, is
unambiguously linear.

This is an advantage of OOP, but it isn't helpful when describing it to someone who doesn't
know what it is. The great majority of teachers will begin by going through the three main
benefits of OOP: encapsulation, inheritance, and polymorphism, and then go over each one in
detail.

What Are Object and Classes in PHP


I'd explain what an object is at this point, although an object can't exist without a class function.
A class is nothing more than an object's blueprint. It's a C-struct-like sophisticated user-defined
data type. In OOP, "Object" refers to a class Instance (single).

A class, like a blueprint, describes the attributes of an instance. An object's properties describe it
and can be assigned values. While color is a property, "red" is a value that has been assigned to
it. ‘Method’, It’s a function acting as a class member. These functions are used to manipulate
data values.

The behavior of the object produced from the class is controlled by the properties assigned to
them within the class. A good illustration is one that shows how a method can take an object's
property value, such as its color, and write it to the database or the other way around.

Let me define an object in terms of computer programming because objects are important to
object-oriented programming. A user-defined template is used to organize data into objects. A
programming construct that specifies the members of a component and is used to create
duplicates of itself is known as a Class. A class function is simply a blueprint for defining the
attributes of a class, the properties of an object, how it will behave, and how its methods operate.
The properties of an object are what define it.

Objects can be anything from a bird to a table to a house to a person. If the object is an animal,
there are a few things to consider.
The animal's name, height, species, and a number of le,gs and habitat are all common features
that can be used to identify them. A class must declare an object before it may exist. Our basic
"Animal" class in PHP will be as follows:
<?PHP
class Animal
{
}
?>

This is the simplest definition possible, as it simply defines our class. Our class is currently
empty. It lacks characteristics that allow for the specification of the objects that will be built from
it, as well as methods that enable those objects to perform tasks and process data. Add some of
the following vital characteristics to the mix:
class Animal
{
$title;
$height;
$species;
$numOflegs;
$habitat
}

We provided various attributes to better describe an animal, but we can't use them because there
are no ways for setting or obtaining their values. To manage our properties, let's add some
"setter" and "getter" functions. We'll also create a method named __construct, but we won't use
or implement it for the time being. Later in the book, when we discuss PHP Magic Methods,
we'll go over this in further depth.
<?PHP
class Pet
{
$m_title;
$m_clr;
$m_numOflegs;
function set_Title_Pet($pet_title)
{
$this->m_title = $pet_title;
}
function get_Title_Pet()
{
return $this->m_title;
}

function set_Clr_Pet($pet_clr)
{
$this->m_clr = $pet_clr;
}
function get_Clr_Pet()
{
return $this->m_clr;
}

function set_No_Of_Legs($pet_noOflegs)
{
$this->m_noOflegs = $pet_numOflegs;
}
function get_No_Of_Legs()
{
return $this->m_noOflegs;
}
function __construct(){}
}
?>

Animal now contains descriptive properties as well as ways for storing and retrieving such
information. Bear in mind how the variable "$this" was utilized; we'll return to it later.

Now that we've created the person class let's use it to create several person objects. Permit me to
present you to two new acquaintances, Crocodile and Chicken, that are both instances of the
Animal (objects). Before we can construct Crocodile and Chicken, they must be instantiated.

Instantiation
‘Instantiation’ is the development of an object based on a class or an instance/object of that
particular class is known as ‘instantiating a class.’ A fresh keyword is used to instantiate an
object in PHP, as seen below:
$Crocodile = new Animal()
$Chicken = new Animal()

$Crocodile and $Chicken are now instances (objects) of the type Animal, which enables accurate
property assignment. Take note of the parenthesis immediately before the word "animal" this is
because the constructor of the Animal class is the first function called after the properties have
been supplied. Although this constructor is not utilized in this example, I will explain why later
when we discuss Magic Methods. Let us begin by examining Crocodile. Let us clarify the name
and other identifying characteristics:
$Crocodile->setName(‘Crocodile’);
$Crocodile->setHeight(‘brown’);
$Crocodile->setSpecies(‘reptile’);
$Crocodile->setNoOfLegs(‘four’);
$Crocodile->setHabitat(‘lakes’);

Now for Chicken:


$Chicken->setName(‘Chicken’);
$Chicken->setHeight(‘white’);
$Chicken->setSpecies(‘bird’);
$Chicken->setNoOfLegs(‘two’);
$Chicken->setHabitat(‘farms’);

The Variable $this


The object that is invoking the function is represented by the variable $this. If that doesn't make
sense to you, let me explain it in Crocodiles terms. Two geeks built a metaphysical animal called
Crocodile. When we instantiated $Crocodile, that's exactly what happened. The Animal class
was the blueprint. The following steps were taken to create the green eyes:
$Crocodile->setSpecies(‘reptile’);

That method is defined in the Animal class like so:


public function setSpecies($species)
{
$this->species = $species;
}

As a result, $this has been temporarily replaced by $Crocodile. It was instantiated because
$Crocodile is a clone of the Animal class that contains more particular characteristics than $this.
As a result, as seen below, the setSpecies('reptile') function is added to the $Crocodile object:
public function setSpecies(‘reptile’)
{
$Crocodile->species = ‘reptile’;
}

Access Modifiers
Access modifiers are keywords that specify how class properties and methods are visible. PHP
files can be classed as private, protected, or public. Assume each Crocodile has a cage. We could
code it as follows in PHP:
class Crocodile {
$cage_location;
function setLocation() { }
}

When we do it this way, the cage is automatically made public. It’ll be visible throughout the
program, in other words. It's the same as if you wrote it as:
class Crocodile {
public $cage_location;
}

Anyone, including Harry, Alex, and James, who are tourists, can see the Crocodile's cage due to
its public exposure, which is managed through a public access modification. Assume the zoo
keepers don’t want the tourists to see the Crocodile’s cage.
class Crocodile {
protected $cage_location;
protected function setLocation(){}
}

In PHP, we can let only some selected people see the cage by sending an invitation to the people
the zoo keepers want to see it through the extends keyword:
class Harry extends Crocodile {
function viewCage(){}
}
class Alex extends Crocodile....
class James extends Crocodile....

Because of all of these classes, the Crocodile's cage is visible. This is inheritance, and all of these
classes that extend Crocodile are part of its inheritance hierarchy. Imagine the zoo keepers want
only the doctor to see the cage. In PHP lingo, this means:
class Crocodile {
private $cage_location;
private setLocation(){}
private letHarrySee(){}
}

In other terms, PHP's three access modifiers are as follows: When a class is marked as private,
access to it is restricted. Private members are accessible only through methods, which belongs to
the same class. Take a look at the given instance:
class Visitor{
private $m_visitor_name;
public $m_visitor_height;
public function __construct($visitor_name, $visitor_height) {
$this->m_visitor_name = $visitor_name;
$this->m_visitor_height = $visitor_height;
}
}
$tmpVisitor = new Visitor ("Jhon","150");
echo "Visitor Name : " . $ tmpVisitor->m_visitor_name; //causes an error

Declaring data members as private aims to prevent external programs from altering the values
inappropriately without conducting sufficient validation. You must provide public getter/setter
methods for the data member's value if you make it private. The access modifier protected
provides access to data members as well as member methods for a given class and all of its
subclasses. Global access isn’t allowed.
class Pet {
protected $m__pet_name;
}
class Dog extends Pet {
function set_Pet_Name($pet_name) {
//this works as $pet_name is protected in Pet
$this->m_pet_name = $pet_name;
}
}
$tmpVisitor = new Visitor();
$tmpVisitor->set_Visitor_Name("Chandler");
$tmpVisitor->m_visitor_name = "Chandler"; //this causes error as $m_visitor_Name is protected and not public

The term "public" denotes that any code can access the member by its name.
class Visitor {
private $m_Visitor_Name;
public $m_Visitor_Height;
public function __construct($visitor_name, $visitor_height) {
$this->m_Visitor_Name = $visitor_Name;
$this->m_Visitor_Height = $visitor_Height;
}
}
$tmpVisitor = new Visitor("Chandler","150");
echo "Height : " . $tmpVisitor ->m_Visitor_Height; //prints 150

Returning to my earlier remark that object-oriented principles are "global" in the sense that they
should be regarded by a developer. I demonstrated access modifiers using the Crocodile’s cage,
but I also needed to illustrate encapsulation and inheritance. Inheritance and encapsulation are
essential strategies for limiting the capabilities of a class-defined object.

Inheritance
You're probably familiar with the Crocodile’s cage, notably the one made out of steel bars. In
PHP, the cage was designated as protected, which meant that it could be viewed by the Crocodile
and its extended classes. In PHP5, the keyword extends should be used in the class definition to
indicate inheritance.
class Parent
{
}
class Child extends Parent
{
}

Inheritance refers to the transmission of "knowledge" down the hierarchy. It is a technique for
incrementally adding new functionality to existing code. Class hierarchies are used to organize
classes, and heredity allows a single class's design and functions to somehow get transferred
through the ladder. As a result, minimal programming is required when introducing further
functionality to complex systems.

When a step is positioned at the bottom of the ladder, just the computation and information
associated with that step must be added. During that period, everything else gets transferred to
you. The capability of object-oriented programming to reuse existing objects is a big advantage.

The Overriding of Method


Method overriding occurs when the base class's method is re-defined using the derived class's
name, function signature, and access modifier (public or protected). The purpose of overriding a
method is to provide the functionality to the base class that isn't previously specified. Assume
you have a milkshake class from which two subclasses, mango, and strawberry, are derived.

While the Beverage class defines methods for mixing, shaking, and other operations, the
specialized classes Mango and Strawberry will need to override the stir and mix features because
they will have their own methods for mixing and stirring. Consider the following scenario for a
milkshake:
class MilkShakes {
public function mixing_method() {
echo "Mix method of MilkShakes Class";
}
public function shaking_method() {
echo "Shake method of MilkShakes Class";
}
}

class Mango extends MilkShakes {


public function mixing_method() {
echo "Mixing method of Mango Class ";
}
public function shaking_method () {
echo "Shaking method of the Mango Class ";
}
}

class Strawberry extends MilkShakes {


public function mixing_method() {
echo "Mixing method of strawberry Class ";
}
public function shaking_method() {
echo "Shaking method of the Strawberry Class";
}
}
$mango = new Mango();
$strawberry = new Strawberry();

$mango->shaking_method();
echo "\n";
$strawberry->shaking_method();

Output:
Shaking method of the Mango Class
Shaking method of the Strawberry Class

Horizontal Inheritance - Using Traits


Multiple inheritances is not supported in PHP; so for a given class, only a single base class can
be extended. What happens if you require code from many classes? Until recently, developers
had to work around this by copying and pasting code from other classes that were not necessary
in the base class. This is now possible due to the addition of a new feature in PHP5.4 called a
trait, which enables horizontal inheritance.

A trait resembles a class structurally, but it cannot be instantiated. While properties and methods
can be specified within a trait structure, they can only be used by a class that includes the use
keyword, which is called within the class that uses it, that is, within the curly brackets. Outside
of the curly brackets, it is not referred to in the class specification, unlike interfaces and the
extending class.
trait Calculation
{
public function addition($arg_1, $arg_2)
{
return $arg_1 + $arg_2;
}
public function subtraction($arg_1, $arg_2)
{
return $arg_1 - $arg_2;
}
}
trait BusTicket
{
private $bus_ticket = array();
public function addition($bus)
{
array_push($this->bus_ticket,$bus);
}
public function get_Bus_Ticket()
{
return $this->bus_ticket;
}
}
class BusTicketBook
{
use Calculation,BusTicket;
{
//Give priority to the addition method from the Calculation trait
Calculation::addtion insteadof BusTicket;
}
}
$bus_ticket_book = new BusTicketBook ();
echo $bus_ticket_book->addtion(9,6), "<br />";

Output:
15

Invoking Parent Methods


To begin, the term "invoke" refers to the act of "inviting" or "requesting" something to do
something. I simply wanted to get that out of the way as quickly as possible. When you override
a base class method, the functionality of the overridden method is fully hidden until It's
summoned directly from the child class. Use the term parent along with the two colons like
this"::" it’s known as the ‘scope resolution operator,’ and the method name to access methods
from a parent class.

For instance:
parent::name_of_function();

below is the code written;

class Pet {
public function pet_tail() {
echo "This is tail of Animal ";
}
}
class Parrot extends Pet{
public function pet_tail() {
parent::pet_tail();
echo "This is parrot's tail ";
}
}
$parrot = new Parrot();
$parrot->pet_tail();

Output:
This is Pet’s tail()
This is Parrot’s tail()

The tail() function of the Lion child class calls the tail() function of the Animal parent class in
the prior example. When the program calls the tail() method, it first calls the Lion class, which
then calls the parent class's tail() method. The remaining code in the Lion class's tail() function is
executed when the parent class's tail() function is completed.

Polymorphism
Now that you understand that a class acts as a blueprint from which objects are created, it's
critical to understand that a single class can be used to create a wide range of distinct objects. I
may only have one table class, but I can use that class to generate a wide range of table objects. I
can choose between a round table, a square table, a long table, and a short table. I had the option
of choosing between a blue and a brown table. I could have an oak table or a plastic table; both
are of the same basic quality.

The existence of multiple forms is referred to as polymorphism. Polymorphism is the ability to


generate multiple forms of a variable, function, or object in order to adapt to the task at hand. It
is a method that allows various types of objects to communicate with one another via a common
interface.

Polymorphism is used to improve application modularity and extensibility. Instead of clumsy,


difficult-to-read conditional statements defining alternative procedures, the programmer designs
reusable objects to suit their required needs. Polymorphism's primary goal is to achieve this.

Polymorphism is a technique that allows objects of different types to communicate with one
another through a single interface.

Using a common illustrative example, A program may declare an object type called Person that
contains the function speak() and then derive object sub-types such as Mary, Jane, and so on,
each with their own unique implementation of the speak() function. Polymorphism allows such
software to call the speak() function without knowing whether it is for Mary, Jane, or any other
derivative Person, while still performing the correct function for that specific Person.

Polymorphism should not be confused with method overloading or overriding (a method in OOP
is a function that belongs to a class, whereas class variables are called members) and should not
be used interchangeably.

Late Binding / Dynamic Binding


The process of polymorphism is called dynamic binding or (late-binding). A base class defines
the speak() function, but it also calls getName(), a polymorphic function that each child class
implements differently. The phrase "late binding" refers to the fact that the request is only bound
to a specific data type when the function is called at runtime. Simply put, despite the fact that
speak() is specified in the generic Person class, it will invoke the getName() implementation
particular to the child. True polymorphism is enabled through this late-binding feature, which is
PHP’s new feature.

Another example:
class Character {
protected $m_Character_Title;
public function __construct($character_Title)
{
$this->m_Character_Title = $character_Title;
}
public function get_Character_Title()
{
return $this->m_Character_Title;
}
}
class Rachel extends Character
{
public function get_Character_Title()
{
return 'Rachel: '.parent::get_Character_Title();
}
}

function Character_Name(Character $character)


{
echo $character->get_Character_Title();
}
$girlCharacter = new Rachel("who");
Name($girlCharacter);

This is a polymorphism example since the Name() function is aware that it is receiving an object
of type Person but is unaware of whether the Product is Lucy, or Jane, or someone else. Take
note of how we declared the type Person as a parameter for the Name() function – in highly
typed languages, stating the data type of function arguments is compulsory, whereas in PHP,
specifying the data type (known as type hinting) of functions is optional. If they are included,
PHP will throw a fatal error if a non-object or an object which is different from the expected data
type is passed to the function.

PHP is a dynamic programming language because it performs many of the same tasks as other
languages at compile time. It is loosely typed or dynamically typed, in the sense that the majority
of type checking occurs during runtime rather than during compilation. While values have types
in dynamic typing, variables do not; consequently, a variable can refer to any value of any type.

Method Overloading
If two or more methods (functions) within a given class has the same name, but with differing
parameter counts and/or data types, this is referred to as method overloading.

Method Overriding
When a child class (one derived through inheritance) calls a method with a name and parameters
the same as the parent class's function but with a different implementation, this is referred to as
method overriding. This is not synonymous with polymorphism because late-binding is not
always required; rather, overriding is a required component of the technique by which
polymorphism occurs. All of this may appear confusing at first, but a simple code sample can
help to clarify:
class Character {
protected $m_Character_Title;
public function __construct($character_Title)
{
$this->m_Character_Title = $character_Title;
}
public function get_Character_Title()
{
return $this->m_Character_Title;
}
}
class Rachel extends Character
{
public function get_Character_Title()
{
return 'Rachel: '.parent::get_Character_Title();
}
}
$girlCharacter = new Rachel("who");
echo $girlCharacter->get_Character_Title();

This is an example of overriding. In contrast to polymorphism, we define Lucy and invoke a


Lucy function directly via the Lucy's interface. PHP being a weakly typed language, means that
the vast bulk of data type handling is performed implicitly by PHP rather than by the
programmer. As a result, with PHP, the line between overriding and polymorphism can be quite
fine. Consider the following illustration:
<?PHP
class Character {
protected $m_Character_Title;
public function __construct($cahracter_Name)
{
$this->m_Character_Title = $character_Title;
}

public function get_Character_Title()


{
return $this->m_Character_Title;
}

public function Character_Talk()


{
return $this->get_Character_Title().' is talking <br />';
}
}

class Rachel extends Character


{
public function get_Character_Title()
{
return 'Rachel: '.parent::get_Character_Title();
}
}

$girlCharacter = new Rachel("who");


echo $girlCharacter->Character_Talk();
$character = new Character("someone");
echo $character->Character_Talk();
?>

OUTPUT:
Rachel: Who is speaking
someone is speaking

Encapsulation
The act of putting anything into a "capsule," or encapsulating functionality into a single package,
is referred to as encapsulation. Consider a capsule or a box containing Products to be an object.
The access modifiers work similarly to windows, with 'public' access being a large open window
that allows everyone to see inside and 'private' access being completely shaded and preventing
anyone from seeing inside.

The ability to control the visibility of an object's contents is a critical aspect of how
encapsulation works. An object is composed of attributes and methods, and because they are all
contained within an object, they form a mini-program with control over the visibility of its
contents, data. This is the idea behind encapsulation.

Encapsulation is a technical term for the creation of self-contained modules that link processing
processes to data. By keeping routines distinct and less prone to conflict, encapsulation promotes
code modularity. To summarize, each object is a miniature program that manages its own tasks
as if it were a standalone capsule or pill.
Dunder Methods in PHP

Dunder-methods are reserved method names that you may utilize in your classes to access PHP
function that isn't available otherwise. Magic methods allow you access to PHP behavior that
isn't available to the general public. Magic techniques are named by starting with with two
leading underscores followed by lower camel-case letters.

__construct ()
The constructor is a magical Technique which gets invoked during the creation of an object or a
class instance. Although, typically the first Product inside a class declaration, it is not essential; it
is merely another method that can be declared anywhere in the class. When we instantiated
Crocodile, recall how I stated the parenthesis following the Person class name?
$Mindi = new Person();

The constructor of the $Mindi object is a reference to the Person() class. The constructor is not
implemented in this situation since there is nothing enclosed in parenthesis. We don't initialize
any of $Mindi's properties when we call the constructor. The PHP engine will presume we're
using an unimplemented constructor if our class doesn't have a constructor function.
public function __contruct(){}

Constructors can be passed down the heirachy just like any other method. From the previous
inheritance example from Intro to OOP, the following constructor can be added to Person class:
// character.PHP
class Character
{
public function __construct() {
$this->object_creation_time = time();
$this->log_file = fopen('log_file.txt', 'w');
}
}

We may now construct a descendant class of the Person class. We can declare Lucy class which
inherits from Person without changing anything:
class Lucy extends Person {
}
$holy = new Lucy();
echo $holy->created;

Assuming we introduce a __construct method in Lucy class, it will be used instead by


instantiated Lucy instances.. Because there isn't one, PHP looks for and leverages information
included in the parent class definition. As a result, we now have the option of overriding or not
overriding in our new class, which is quite convenient.

Invoking Parent Constructor and Destructor


Using the same syntax as the parent method, we may call the function Object() { [native code] }
and destructor of PHP5's parent class, just like shown by the preceding illustration:
__destruct()
Have you noticed the constructor's file handle? When we're finished with an object, we don't
want to leave it sitting about, which is why the __destruct method overrides the constructor's
behavior. It is destroyed when we explicitly destroy an object or when we no longer require it,
which PHP handles for us. Person's __destruct method would be as follows:
class Character{
public function __construct() {
$this->character_creation_time = time();
$this->log_file = fopen('log_file.txt', 'w');
}
public function __destruct() {
fclose($this->log_file);
}
}

__get(), __set(), __isset()


In PHP, property overloading refers to the process of setting and retrieving values for properties
in a class that aren't explicitly declared. The PHP engine will automatically invoke the __set()
function when a script tries to assign something to a class property which has never been stated
explicitly. The __get() function is invoked silently when a script tries to obtain the value of an
undeclared class property. The __isset() function is also invoked when called on an undefined
property. Use __isset() to validate a property before interacting with it.
"User" illustration 1

Assume that there is a fundamental class called "User" that represents a real-world user in
software. The following is how this hypothetical class would be defined:
class Customer {
private $m_Customer_Forename = 'Ross';
private $m_Customer_Surname = 'Geller';
private $m_Customer_Email = '[email protected]';
// constructor (not implemented)
public function __construct(){}
// set customer's Fore_Name
public function set_Customer_Fore_Name($customer_fore_name)
{
$this->m_Customer_Forename = $customer_fore_name;
}
// get Customer's fore name
public function get_Customer_Fore_Name()
{
return $this->m_Customer_Fore_Name;
}
// set user's last name
public function set_Customer_Sur_Name($customer_Sur_Nname)
{
$this->m_Customer_Surname = $customer_Sur_Name;
}

// get customer's sur name


public function get_Customer_Sur_Name()
{
return $this->m_Customer_Sur_Name;
}
// set Customer's email address
public function set_Customer_Email($customer_Email)
{
$this->m_Customer_Email = $customer_Email;
}

// get Customer's email address


public function get_Customer_Email()
{
return $this->m_Customer_Email;
}
}

As is evident, the aforementioned "User" class is quite straightforward to design. It just has a few
setters and getters for defining and obtaining the attributes with its three specified properties,
$firstname, $lastname, and $email. So far, nothing unusual has occurred, correct? A basic
explanation is mentioned below:
$customer = new Customer();
$customer->set_Customer_Fore_Name('Ross');
$customer->set_Customer_Sur_Name('Geller');
$customer->set_Customer_Email('[email protected]');
// display customer data
echo 'Customer’s Fore Name: ' . $customer->get_Customer_Fore_Name() . '<BR> Customer’s Sur Name: ' . $user-
>get_Customer_Sur_Name() . '<BR> Customers Email: ' .
$user->get_Customer_Email();

/*

displays the following:


Customer’s Fore Name: Ross
Customer’s Sur Name: Geller
Customer’s Email: [email protected]
"User" illustration 2

I constructed a simple "User" class with an API that enabled us to rapidly apply and get the
quantities of its stated properties in the preceding example. As previously indicated, by putting
the "__set()" and "__get()" methods into practice, it is feasible to abbreviate and make its
explanation more "dynamic." To better show this notion, I'll extend this sample class so that we
may generate new class attributes at runtime and get their related values quickly. Please have a
look at the changed "User" class. Now that we understand what I'm going to do in the following
lines, let's get started. The following is how it is now displayed:
class User
class Customer
{
// constructor (not implemented)
public function _construct(){}

// set undeclared property


function __set($property_Of_Customer, $value_Of_Property)
{
$this->$property_Of_Customer = $value_Of_Property;
}

// get defined property


function __get($property_Of_Customer)
{
if (isset($this->$property_Of_Customer))
{
return $this->$property_Of_Customer;
}
}
}

the "__set()" method creates an undefined property and sets it a value. in the first scenario,
whereas the "__get()" function gets the value when the property in the second instance has
already been defined.

The use of these techniques simplifies the process of overloading properties. Additionally, it
minimizes the size and complexity of the source code of class. The shortcoming of this method is
it has a lot of disadvantages. To begin, the code is harder to understand and grasp due to the
absence of specific declarations for each class property. Second, an integrated development
environment (IDE) such as Eclipse PDT would have difficulty keeping track of such attributes
for commenting or documentation.
// example of usage of 'Customer' class with property overloading
$customer = new Customer();
$customer->m_Customer_Forename = 'Ross';
$user->m_Customer_Surname = 'Geller';
$user->m_Customer_Email = '[email protected]';
$user->m_Customer_Address = 'Central Perk';

// display customer data

echo 'Customer Fore Name: ' . $user->m_Customer_Forename . 'Customer Sur Name: ' . $user-
>m_Customer Surname . '<BR> Customer Email: ' . $user->m_Customer_Email .
'<BR>Customer Address: ' . $user->m_Customer_Address;

OUTPUT:
Customer Fore Name: Ross
Customer Sur Name: Geller
Customer Email: [email protected]
Customer Address: Central Perk

__call()
When you call a method on a class object that doesn't exist, the class's implementation of __call()
is utilised instead. Consider the following scenario:
<?PHP
//This class demonstrate how the __call() Magic Method is used
class PHPCallProgramTest {
private $arr = array(2, 1, 6);

public function __call($title_of_method, $args) {


echo "The method \"$title_of_method\" called.\n";
var_dump($args);
return $this->arr;
}
}
//test() doesn’t exist
$PHPCallProgramTest = new PHPCallProgramTest();
$var = $PHPCallProgramTest->test('a', 'b', 'c');
var_dump($var);
?>
Now let's add a test() function and rerun the program. It's worth noting that test() was used
instead of __call() this time:
<?PHP
//This class demonstrate how the __call() Magic Method is used
class PHPCallProgramTest {
private $arr = array(2, 1, 6);

public function __call($title_of_method, $args) {


echo "The method \"$naem_of_method\" called.\n";
var_dump($args);
return $this->arr;
}

public function test($args) {


echo "The method \"test\" exists now!\n";
return NULL;
}
}

//test() doesn’t exist


$PHPCallProgramTest = new PHPCallProgramTest();
$var = $example->test('a', 'b', 'c');
var_dump($varr);
?>

OUTPUT:
The method "test" exists now!
NULL

__sleep()
The __sleep() magic function is invoked when a class object is going to be serialised.
Serialization is just converting of objects into byte-by-byte sequence for storage or transmission
across a network. __sleep()returns an array as a mysterious method that takes no parameters. The
array must include searialized members of class in a list. This means if you do not want a
member of a class to be serialized, leave it out of the array. Consider the following illustration:

In the example above, the data just holds the fname of the Employee Object in serialized string.
It’s because __sleep() magic function provided an array with just the 'fname' data element,

__wakeup()
The __wakeup() magic method accepts no parameters and returns none, just as the __sleep()
method. It's responsible for re-initializing an object that has been unserialized. The opposite of
serialize is unserialize, which converts an array to a standard string that may be saved to a file or
supplied as a URL. When a string is transformed from a serialized string to an array, it is
unserialized. The PHP methods serialize() and unserialize() are used to perform these tasks.
Consider the case below:

OUTPUT:
object(Staff)#2 (2) {
["m_Staff_Forename:private"]=>
string(3) "Joey"
["m_Staff_Date_Of_Birth:private"]=>
string(10) "23-03-1969"
}

We utilize the $data variable and provide it to the unserialize() method once the $e object has
been serialised. The outcome is placed in the $data variable after being translated to a common
string. The __wakeup() function is invoked while the object is unserialized and created.

__clone()
Objects in PHP are generally allocated and passed through reference. For instance:
Class CloneStaffClass
{
public $m_Staff_Name;
}

$firstStaff = new CloneStaffClass();


$firstStaff->m_Staff_Name="Joey";
$secondStaff = $firstStaff;

echo "first Staff = " . $firstStaff->m_Staff_Name . "<BR><BR>";

$secondStaff->m_Staff_Name="Tribbiani";

echo "first Staff = " . $firstStaff->m_Staff_Name. "<BR>";


echo "second Staff = " . $secondStaff->m_Staff_Name . "<BR>";

OUTPUT:
first Staff = Joey
first Staff= Tribbiani
second Staff= Tribbiani

After I made a copy of the $first object named $secondStaff and set the value of $second-
>m_Staff_Name="Tribbiani," the value of the $firstStaff->m_Staff_Name property changed
from "Joey" to "Tribbiani." This is because the $secondStaff object was assigned by reference,
and both the $firstStaff and $secondStaff objects relate to the same object.

The __clone() magic-method can also be castoff to produce a duplicate of an object that does not
relate to the original object but instead creates a new, fully different object. Instead of setting
$secondStaff = $firstStaff, I'll use __clone() to explain how it works in the prior example.
Class CloneStaffClass
{
public $m_Staff_Name;
}
$firstStaff = new CloneStaffClass();
$firstStaff->m_Staff_Name="Joey";
$secondStaff = clone $firstStaff;
echo "first Staff = " . $first->m_Staff_Name . "<BR><BR>";

$secondStaff->m_Staff_Name="Tribbiani";

echo "first Staff= " . $firstStaff->m_Staff_Name . "<BR>";


echo "second Staff= " . $secondStaff->m_Staff_Name . "<BR>";

OUTPUT:
First Staff = Joey
first Staff = Joey
second Staff = Tribbiani

The value of $firstStaff->m_Staff_Name did not change after we set a value for $secondStaff-
>m_Staff_Name. This is due to the fact that cloning allows us to create an object that is
completely different from the original. As a result, instead of just two pointers to the same
object, we now have two objects.
Exploring the Variety of Random
Documents with Different Content
Oil fuel burning in marine practice. Sothern, J: W:
M. (F ’21)
Oil industry
Bosworth, T: O. Geology of the mid continent
oilfields. (O ’20)
Oil shales
Alderson, V: C. Oil shale industry. (N ’20)
Old and new. Grandgent, C: H. (N ’20)
Old Cape Cod. Bangs, M. R. (D ’20)
Old Chester secret. Deland, M. W. (D ’20)
Old coast road from Boston to Plymouth. Rothery,
A. E. (Jl ’20)
Old crosses and lychgates. Vallance, A. (F ’21)
Old English furniture and its surroundings.
Percival, M. (Ja ’21)
Old French fairy tales. Segur, S. (F ’21)
Old humanities and the new science. Osler, W: (Je
’20)
Old junk. Tomlinson, H. M. (Ap ’20)
Old naval days. Meissner, S. de. (Ja ’21)
Old New England houses. Robinson, A. G. (N ’20)
Old Plymouth trails. Packard, W. (Jl ’20)
Old Reliable in Africa. Dickson, H. (D ’20)
On a passing frontier. Linderman, F. B. (Ag ’20)
On the art of reading. Quiller-Couch, A. T: (D ’20)
On the edge of the wilderness. Eaton, W. P. (D
’20)
On the path of adventure. Price, J. M. (Ag ’20)
On the trail of the pioneers. Faris, J: T. (Je ’20)
One after another. Aumonier, S. (O ’20)
One hundred best novels condensed. Grozier, E.
A., ed. (Je ’20)
100%. Sinclair, U. B. (Ja ’21)
One thousand poems for children. Ingpen, R., ed.
(F ’21)
Open gates to Russia. Davis, M. W. (Mr ’20)
Open the door. Carswell, C. (S ’20)
Open vision. Dresser, H. W. (Je ’20)
Operas
Annesley, C:, pseud. Standard operaglass. (Je
’20)
MacKaye, P. W. Rip Van Winkle. (Mr ’20)
Opium
LaMotte, E. N. Opium monopoly. (Je ’20)
Opportunities in aviation. Sweetser, A., and
Lamont. G. (Mr ’20)
Opportunities in engineering. Horton, C: M. (Je
’20)
Ordeal of Mark Twain. Brooks, V. (O ’20)
Order. Washburn, C. C. (Ap ’20)
Ordnance and the world war. Crozier, W: (Jl ’20)
Ore treatment
Allen, A. W. Handbook of ore dressing,
equipment and practice. (F ’21)
Oregon
Discovery and exploration
Skinner, C. L. Adventurers of Oregon. (D ’20)
Organization of industrial scientific research. (S
’20)
Organized labor in American history. Carlton, F.
T. (Je ’20)
Organized self-government. Dawson, E. (Ag ’20)
Oscar Montague—paranoiac. Walton, G: L. (Ap
’20)
Ossoli, Sarah Margaret (Fuller) marchese
d’, 1810–1850
Anthony, K. Margaret Fuller. (N ’20)
Other woman. Davis. N. (Jl ’20)
Our America. Frank, W. D: (Ag ’20)
Our economic and other problems. Kahn, O: H.
(Ag ’20)
Our foreigners. Orth, S: P. (D ’20)
Our great war and the great war of the ancient
Greeks. Murray, G. (Ag ’20)
Our nervous friends. Carroll, R. S. (My ’20)
Our northern autumn. Keeler, H. L. (D ’20)
Our unseen guest. (Ap ’20)
Our Wisconsin. Doudna, E. G: (D ’20)
Our women. Bennett, A. (N ’20)
Outdoor life
Clark, F. E: Gospel of out of doors. (Ag ’20)
Outdoor sleeper. Koons, F. T: (N ’20)
Outdoors and in. Crowell, J. F. (O ’20)
Outlaw. Hewlett, M. H: (Ap ’20)
Outline of history. Wells, H. G: (D ’20)
Outlook for research and Invention. Hopkins, N.
M. (Mr ’20)
Outside inn. Kelley, E. M. (N ’20)
Outspoken essays. Inge, W: R. (My ’20)
Outstanding days. Herrick, C. A. (Ag ’20)
Overland for gold. Cheley, F. H. (F ’21)
Owen, Robert, 1771–1858
Owen, R. Life of Robert Owen. (S ’20)
Ozone. Rideal, E. K. (Ja ’21)

Pacific ocean
Scholefield. G. H. Pacific. (Ap ’20)
Paddy-the-next-best-thing. Page, G. (F ’21)
Padre. Prentice, S. (My ’20)
Pagan. Smith, G. A. (S ’20)
Pagan and Christian creeds. Carpenter, E: (Ap
’20)
Pagan fire. Richardson, N. (Ja ’21)
Paget, Violet. See Lee, V., pseud.
Painted meadows. Kerr, S. (Je ’20)
Painting
Oliver, M. I. G. First steps in the enjoyment of
pictures. (Ap ’20)
Painting, Chinese
Petrucci, R. Chinese painters. (S ’20)
Paints
Jennings, A. S. Paints and varnishes. (Jl ’20)
Palestine
Lock, H. O. Conquerors of Palestine through
forty centuries. (F ’21)
Description and travel
Maxwell, D. Last crusade. (F ’21)
Palmetto. Perry, S. G: (N ’20)
Panama canal
Bunau-Varilla, P. Great adventure of Panama.
(My ’20)
Pan-Americanism
Lockey, J. B. Pan-Americanism. (Ag ’20)
Pan-Islam. Bury, G: W. (Je ’20)
Paper making and trade
Chalmers. T: W. Paper making and its
machinery. (Ag ’20)
Witham, G: S. Modern pulp and paper making.
(O ’20)
Papers and essays for churchmen. Steele, D: M.
(Mr ’20)
Papers on current finance. Foxwell, H. S. (My ’20)
Papers on the legal history of government.
Bigelow, M. M. (Ap ’20)
Parables
Gibran, K. Forerunner. (D ’20)
Paradise Bend. White. W: P. (F ’21)
Paradise mystery. Fletcher, J. S. (Ag ’20)
Paris
Adam, H. P. Paris sees it through. (Ap ’20)
Description
Story, A. M. S. Present day Paris and the
battlefields. (N ’20)
Social life and customs
Edwards, A. H. Paris through an attic. (Jl ’20)
Paris in shadow. Holt, L. (Ja ’21)
Paris through an attic. Edwards, A. H. (Jl ’20)
Parliament and revolution. Macdonald, J. R. (Ag
’20)
Parliamentary reform
Trevelyan, G: M. Lord Grey of the reform bill.
(Je ’20)
Parodies
Castier, J. Rather like.... (Ag ’20)
Powell, C: Poets in the nursery. (D ’20)
Parties
Wolcott, T. H., ed. Book of games and parties.
(D ’20)
Parts men play. Baxter, A. B. (Ja ’21)
Passage of the barque Sappho. Patterson, J: E:
(My ’20)
Passenger. Swinnerton, H. (N ’20)
Passing legions. Fife, G: B. (Ja ’21)
Passing of the new freedom. Beck, J. M. (N ’20)
Passing of the old order in Europe. Zilboorg, G. (D
’20)
Passion. Desmond, S. (Jl ’20)
Passion for life. Hocking, J. (Jl ’20)
Pasteur, Louis, 1822–1895
Duclaux, E. Pasteur. (O ’20)
Pastor of the Pilgrims. Burgess, W. H. (O ’20)
Pastoral epistles. Parry, R. St J: (F ’21)
Patchwork. Myers, A. B. (My ’20)
Paternity of Abraham Lincoln. Barton, W: E. (D
’20)
Paths of inland commerce. Hulbert, A. B. (D ’20)
Pathway of adventure. Tyrrell, R. (Ag ’20)
Patriotism and popular education. Jones, H: A. (S
’20)
Patron and place-hunter. Sanders, L. C: (My ’20)
Patrons of democracy. Sharp, D. L. (My ’20)
Patti, Adelina (Baroness Cederstrom),
1843–1919
Klein, H. Reign of Patti. (N ’20)
Paul, Saint
Baldwin, C: S. God unknown. (O ’20)
Smith, D: Life and letters of St Paul. (Je ’20)
Paul and the printing press. Bassett, S. W. (O ’20)
Pawn in pawn. Sharp, H. M. (Jl ’20)
Pawns. Drinkwater, J: (Ja ’21)
Peabody, Ephraim, 1807–1856
Peabody, R. S. and F. G. New England romance.
(F ’21)
Peabody, Mrs Mary Jane (Derby), 1807–
1892
Peabody, R. S. and F. G. New England romance.
(F ’21)
Peace
Caldwell, W. E. Hellenic conceptions of peace.
(Mr ’20)
Cooke, R: J. Church and world peace. (F ’21)
Jay, W: War and peace. (Je ’20)
Peace conference, 1919–
Baruch, B. M. Making of the reparation and
economic sections of the treaty. (D ’20)
Bass, J: F. Peace tangle. (D ’20)
Dillon, E. J. Inside story of the peace
conference. (Mr ’20)
Gallagher, P. America’s aims and Asia’s
aspirations. (O ’20)
Harris, H. W. Peace in the making. (Ag ’20)
Haskins, C: H., and Lord, R. H. Some problems
of the Peace conference. (O ’20)
Keynes, J: M. Economic consequences of the
peace. (Mr ’20)
Scott, A. P. Introduction to the peace treaties.
(Je ’20)
Thompson, C: T. Peace conference day by day.
(S ’20)
Peace in the making. Harris, H. W. (Ag ’20)
Peace tangle. Bass, J: F. (D ’20)
Pearson, George Conover, pseud. See Gunion,
P. C.
Peculiar major. Bell, J: K. (Ap ’20)
Peddler. Rowland, H: C. (N ’20)
Peel, Lady Georgiana Adelaide (Russell),
1836–
Peel, G. A. Recollections. (S ’20)
Peggy in Toyland. Marshall, A. (N ’20)
Penance of Magdalena. Chase, J. S. (Ag ’20)
Pengard awake. Straus, R. (Ja ’21)
Penitentiary Post. Pinkerton, K. S. and R. E. (Ag
’20)
Pennsylvania
Description and travel
Wharton, A. H. In old Pennsylvania towns. (F
’21)
Penny plain. Douglas, O. E. (D ’20)
People of destiny. Gibbs, P. H. (O ’20)
People of the ruins. Shanks, E: B. (N ’20)
Perils of respectability. Fiske, C: (S ’20)
Periwinkle’s island. Elias, E. L. (N ’20)
Perpetual light. Benet, W: R. (Mr ’20)
Persia
Description and travel
Hale, F: From Persian uplands. (D ’20)
Social life and customs
Mirza, Y. B: When I was a boy in Persia. (Jl
’20)
Persian literature
Browne, E: G. History of Persian literature
under Tartar dominion. (F ’21)
Persian poetry
Jackson, A. V. W. Early Persian poetry. (Ag ’20)
Personal beauty and racial betterment. Dunlap, K.
(Ja ’21)
Personal prejudices. Sturgis, E. M. (N ’20)
Personal recollections of Andrew Carnegie. Lynch,
F: H: (F ’21)
Personality
Webb, C. C: J. God and personality. (My ’20)
Personnel administration. Tead, O., and Metcalf,
H: C. (D ’20)
Peter Jameson. Frankau, G. (My ’20)
Peter Kindred. Nathan, R. (My ’20)
Peter’s adventures in Meadowland. Vincent, F. S.
(N ’20)
Le petit nord. Grenfell, A. E., and Spalding, K. (Ap
’20)
Petroleum
Panyity, L: S. Prospecting for oil and gas. (F ’21)
Ross, V: Evolution of the oil industry. (Ja ’21)
Philadelphia
Description
Morley, C. D. Travels in Philadelphia. (My
’20)
Philately
Johnson, S. C. Stamp collector. (My ’20)
Philosophy
Bergson, H. L: Mind-energy. (N ’20)
Blood, B: P. Pluriverse. (Ja ’21)
Cushman, H. E. Beginner’s history of
philosophy. (Ap ’20)
Dewey, J: Reconstruction in philosophy. (N ’20)
Hoernlé, R. F. A. Studies in contemporary
metaphysics. (Ap ’20)
Joad, C. E. M. Essays in common sense
philosophy. (Ag ’20)
Merz, J: T. Fragment on the human mind. (Ag
’20)
Richardson, C. A. Spiritual pluralism and recent
philosophy. (D ’20)
Royce, J. Lectures on modern idealism. (Jl ’20)
Philosophy, Hindu
Carrington, H. Higher psychical development.
(N ’20)
Philosophy of mysticism. Watkin, E: I. (O ’20)
Philosophy of play. Gulick, L. H. (Je ’20)
Philosophy of speech. Willis, G: (O ’20)
Photography
Gamble, W: Photography and its applications.
(Jl ’20)
Hammond, A. Pictorial composition in
photography. (S ’20)
Photography, Aerial
Ives, H. E. Airplane photography. (Mr ’20)
Physical education
Camp, W. C. Handbook on health and how to
keep it. (My ’20)
Jensen, A. Massage and exercises combined. (N
’20)
Physician in France. Herringham, W. P. (My ’20)
Physicians
Biography
Kelly, H. A., and Burrage, W. L. American
medical biographies. (N ’20)
Physiology and national needs. Halliburton, W: D.
(Ja ’21)
Pianoforte
Instruction and study
Brower, H. M. Self-help in piano study. (F ’21)
Pic, the weapon-maker. Langford, G: (O ’20)
Piccadilly in three centuries. Dasent, A. I. (F ’21)
Pictorial composition in photography. Hammond,
A. (S ’20)
Picture-show. Sassoon, S. (Je ’20)
Pierre and Joseph. Bazin, R. F. N. M. (Je ’20)
Pilgrim fathers
Burgess, W. H. Pastor of the Pilgrims. (O ’20)
Crawford, M. C. In the days of the Pilgrim
fathers. (Jl ’20)
Griffis, W: E. Young people’s history of the
Pilgrims. (Je ’20)
Lord, A. Plymouth and the Pilgrims. (D ’20)
Marble, A. R. Women who came in the
Mayflower. (Jl ’20)
Mathews, B. J. Argonauts of faith. (Ag ’20)
Pilgrim maid. Taggart, M. A. (My ’20)
Pilgrimage. Gorell, R. G. B. (O ’20)
Pinion and paw. Eng title of Way of the wild. St
Mars, F. (O ’20)
Pink gods and blue demons. Stockley, C. (Ag ’20)
Pioneers of land reform. Spence, T:, and others. (S
’20)
Pipefuls. Morley, C. D. (D ’20)
Piping and panning. Robinson, E. M. (N ’20)
Pirates of the spring. Reid, F. (Ap ’20)
Place, Francis, 1771–1854
Wallas, G. Life of Francis Place. (Je ’20)
Place in the world. Turner, J: H. (My ’20)
Place of science in modern civilization, and other
essays. Veblen, T. B. (My ’20)
Plainsman, and other poems. Carpenter, R. (F ’21)
Planning and planting of little gardens. Dillistone,
G: (Ja ’21)
Plant propagation
Bailey, L. H. Nursery-manual. (Je ’20)
Plants
Saunders, C: F. Useful wild plants of the United
States and Canada. (Je ’20)
Play
Gulick, L. H. Philosophy of play. (Je ’20)
Plays. Galsworthy, J: (Je ’20)
Plays. Glaspell, S. (Ag ’20)
Plays and pageants of citizenship. Payne, F. U. (D
’20)
Plays for merry Andrews. Kreymborg, A. (F ’21)
Plays of the 47 workshop. 47 workshop. (D ’20)
Plays of the Harvard dramatic club. Harvard
university. Dramatic club. (D ’20)
Pleading and practice
Works, J: D. Juridical reform. (Ap ’20)
Pleasures of collecting. Teall, G. C. (N ’20)
Plunderer. Oyen, H: (Je ’20)
Pluralism
Blood, B: P. Pluriverse. (Ja ’21)
Richardson, C. A. Spiritual pluralism and recent
philosophy. (D ’20)
Pluriverse. Blood, B: P. (Ja ’21)
Plymouth, Mass.
Lord, A. Plymouth and the Pilgrims. (D ’20)
Plymouth and the Pilgrims. Lord, A. (D ’20)
Pocket guides to public speaking. Kleiser, G. (My
’20)
Poems, Books of
Adams, F. P. Something else again. (D ’20)
Aiken, C. P. House of dust. (N ’20)
Ananda Achārya. Snow-birds. (D ’20)
Ault, N. Dreamland shores. (Ja ’21)
Baker, K. Blue smoke. (My ’20)
Barker, H. G. Songs in cities and gardens. (Mr
’20)
Barney, D. Chords from Albireo. (Ag ’20)
Barr, A. E. Songs in the common chord. (Ap ’20)
Barrett, W. A. Songs from the journey. (Je ’20)
Benét, S. V. Heavens and earth. (F ’21)
Benet, W: R. Moons of grandeur. (D ’20)
Benet, W: R. Perpetual light. (Mr ’20)
Bennett, R. After the day. (F ’21)
Benshimol, E. Tomorrow’s yesterday. (N ’20)
Bodenheim, M. Advice. (N ’20)
Boni, A., ed. Modern book of French verse. (Ag
’20)
Bowman, A. A. Sonnets from a prison camp. (Je
’20)
Bradford, G. Prophet of joy. (O ’20)
Braithwaite, W: S. B., ed. Anthology of
magazine verse for 1919. (Ap ’20)
Braithwaite, W: S. B., ed. Book of modern
British verse. (My ’20)
Bridges, R. October. (O ’20)
Brown, A. F. Heart of New England. (N ’20)
Buck, H. S. Tempering. (Je ’20)
Bunker, J: J. L. Shining fields and dark towers.
(Mr ’20)
Burke, T: Song book of Quong Lee of
Limehouse. (F ’21)
Burt, M. S. Songs and portraits. (O ’20)
Bynner, W. Canticle of Pan. (Jl ’20)
Carpenter, R. Plainsman, and other poems. (F
’21)
Clark, A. Margaret book. (Je ’20)
Cone, H. G. Coat without a seam. (Jl ’20)
Conkling, G. W. Wilderness songs. (Jl ’20)
Conkling, H. Poems by a little girl. (Je ’20)
Contemporary verse anthology. (F ’21)
Coutts, F. B. T: M.- Spacious times and others.
(Je ’20)
Cromwell, G. Poems. (My ’20)
Crowell, J. F. Outdoors and in. (O ’20)
Davis, F. P., ed. Anthology of newspaper verse
for 1919, and year book of newspaper poetry.
(F ’21)
De La Mare, W. J: Collected poems. (Ja ’21)
Doyle, A. C. Guards came through, and other
poems. (My ’20)
Eliot, T: S. Poems. (My ’20)
Farrar, J: C. Forgotten shrines. (Jl ’20)
Flexner, H. Clouds and cobblestones. (D ’20)
France, A., pseud. Bride of Corinth. (F ’21)
Frothingham, R., comp. Songs of dogs. (N ’20)
Frothingham, R., comp. Songs of horses. (N ’20)
Fyleman, R. Fairies and chimneys. (N ’20)
Gayley, C: M., and Flaherty, M. C:, comps.
Poetry of the people. (S ’20)
Georgian poetry, 1918–1919. (My ’20)
Gibson, W. W. Neighbors. (F ’21)
Gorell, R. G. B. Pilgrimage. (O ’20)
Graves, R. Country sentiment. (Jl ’20)
Guiterman, A. Ballads of old New York. (Mr ’20)
Guiterman, A. Chips of jade. (F ’21)
Hardy, T: Collected poems. (D ’20)
Herbert, A. P. Bomber gipsy. (Jl ’20)
Hillyer, R. S. Five books of youth. (Ag ’20)
Hughes, A. M. Diantha goes the primrose way.
(D ’20)
Hughes, G. Broken lights. (D ’20)
Huxley, A. L. Leda. (O ’20)
Ingpen, R., ed. One thousand poems for
children. (F ’21)
Jesse, F. T. Happy bride. (D ’20)
Johnson, R. U. Collected poems. (Mr ’20)
Jones, H. Well of being. (Je ’20)
Jones, J. H:, jr. Heart of the world. (Ag ’20)
Kemp, H. H. Chanteys and ballads. (D ’20)
Kerr, R. W. War daubs. (Je ’20)
Kip, A. L. Poems. (Ag ’20)
Knibbs, H: H. Songs of the trail. (D ’20)
Kossovo: heroic songs of the Serbs. (Ag ’20)
Kreymborg, A. Blood of things. (F ’21)
Lawrence, D: H. New poems. (Ag ’20)
Ledwidge, F. Complete poems of Francis
Ledwidge. (Ap ’20)
Lee, H. S. High company. (O ’20)
Le Gallienne, R: Junk-man. (N ’20)
Leonard, W: E. C. Lynching bee. (F ’21)
Lincoln, E. C. Rhymes of a homesteader. (My
’20)
Lindsay, N. V. Golden whales of California. (Jl
’20)
Lomax, J: A. Songs of the cattle trail and cow
camp. (My ’20)
Low, B: R. C. Broken music. (F ’21)
MacDonnell, J. F. C. Cairn of stars. (Jl ’20)
Markham, E. Gates of paradise. (Jl ’20)
Masefield, J: Enslaved. (S ’20)
Masefield, J: Right Royal. (F ’21)
Masters, E. L. Domesday book. (Ja ’21)
Masters, E. L. Starved Rock. (Ag ’20)
Maynard, T., comp. Tankard of ale. (O ’20)
Millen, W: A. Songs of the Irish revolution and
songs of the newer Ireland. (Jl ’20)
Miscellany of American poetry, 1920. (O ’20)
Montague, J. J. More truth than poetry. (D ’20)
Moore, T: S. Little school. (S ’20)
Morgan, A. Hail, man! (My ’20)
Morley, C. D. Hide and seek. (D ’20)
Napier, M. Songs of the dead. (D ’20)
Nichols, R. M. B. Aurelia, and other poems. (O
’20)
Noguchi, Y. Japanese hokkus. (D ’20)
Noyes, A. Collected poems. (D ’20)
Noyes, A. Elfin artist. (O ’20)
Percy, W: A. In April once. (D ’20)
Phillpotts, E. As the wind blows. (S ’20)
Potter, M. C. Rhymes of a child’s world. (N ’20)
Powell, C: Poets in the nursery. (D ’20)
Prisoner of Pentonville. (Jl ’20)
Raskin, P. M. Songs and dreams. (O ’20)
Ridge, L. Sun-up. (F ’21)
Roberts, C. E. M. Poems. (Mr ’20)
Robinson, E. A. Lancelot. (Ag ’20)
Robinson, E. A. Three taverns. (N ’20)
Robinson, E. M. Piping and panning. (N ’20)
Ryan, A. Whisper of fire. (Ap ’20)
Sackville, M. Selected poems. (N ’20)
Sandburg, C. Smoke and steel. (N ’20)
Sanger, W: C., jr. Verse. (S ’20)
Sarett, L. Many many moons. (My ’20)
Sassoon, S. Picture-show. (Je ’20)
Schauffler, R. H. White comrade. (F ’21)
Seiffert, M. A. Woman of thirty. (Mr ’20)
Seymour, W: K., ed. Miscellany of British
poetry. (Ap ’20)
Sieveking, L. deG. Dressing gowns and glue. (Je
’20)
Sitwell, O. Argonaut and Juggernaut. (Ap ’20)
Some British ballads. (F ’21)
Spring Rice, C. A. Poems. (Ja ’21)
Squire, J: C. Birds. (D ’20)
Still, J: Poems in captivity. (My ’20)
Swinburne, A. C: Selections. (D ’20)
Swinnerton, H. Passenger. (N ’20)
Teasdale, S. Flame and shadow. (D ’20)
Thompson, J: R. Poems. (Je ’20)
Thorley, W. C:, tr. and ed. Fleurs-de-lys. (Je ’20)
Trine, G. S. Dreams and voices. (Ja ’21)
Troubetzkoy, A. As the wind blew. (D ’20)
Turner, W. J. Dark wind. (Jl ’20)
Untermeyer, L:, ed. Modern American poetry.
(My ’20)
Untermeyer, L:, ed. Modern British poetry. (S
’20)
Untermeyer, L: New Adam. (N ’20)
Van Dyke, T. Songs of seeking and finding. (D
’20)
Vansittart, R. G. Singing caravan. (Ap ’20)
Vernède, R. E. War poems. (N ’20)
Waley, A., comp. Japanese poetry. (N ’20)
Walsh, T: Don Folquet, and other poems. (O
’20)
Walsh, T:, ed. Hispanic anthology. (D ’20)
Walters, L. D’O. Anthology of recent poetry, (D
’20)
Welles, W. Hesitant heart. (My ’20)
Wells, C., comp. Book of humorous verse. (Ja
’21)
Widdemer, M. Haunted hour. (Ap ’20)
Wilkinson, M. O. Bluestone. (O ’20)
Wilson, C. C. Fir trees and fireflies. (F ’21)
Wilson, T. P. C. Waste paper philosophy. (F ’21)
Wood, C. Jehovah. (S ’20)
Woodberry, G: E: Roamer, and other poems. (Je
’20)
Young, F. B. Poems, 1916–1918. (S ’20)
Poems by a little girl. Conkling, H. (Je ’20)
Poems in captivity. Still, J: (My ’20)
Poetry
Aiken, C. P. Scepticisms. (Ag ’20)
Erskine, J: Kinds of poetry. (S ’20)
Gayley, C: M., and Kurtz, B: P. Methods and
materials of literary criticism. (S ’20)
Perry, B. Study of poetry. (Ag ’20)
Poetry of John Dryden. Van Doren, M. (Ja ’21)
Poetry of the people. Gayley, C: M., and Flaherty,
M. C:, comps. (S ’20)
Poets, English
Moore, S. Some soldier poets. (Ag ’20)
Poets in the nursery. Powell, C: (D ’20)
Points of friction. Repplier, A. (N ’20)
Poland
Boswell, A. B. Poland and the Poles. (Ap ’20)
Goodhart, A. L. Poland and the minority races.
(D ’20)
Waliszewski, K. Poland the unknown. (S ’20)
Police
Fosdick, R. B. American police systems. (Ja ’21)
Woods, A. Policeman and public. (Ap ’20)
Policeman and public. Woods A. (Ap ’20)
Polish fairy tales. Glinski, A. J. (F ’21)
Political science
Bigelow, M. M. Papers on the legal history of
government. (Ap ’20)
Jones, H: Principles of citizenship. (D ’20)
Laski, H. J. Political thought in England from
Locke to Bentham. (S ’20)
Peterson. S: Democracy and government. (Mr
’20)
Storey, M. Problems of today. (N ’20)
Political systems in transition. Fenwick, C: G. (D
’20)
Political thought in England from Locke to
Bentham. Laski, H. J. (S ’20)
Politics
McCabe, J. Taint in politics. (O ’20)
Pollyooly dances. Jepson, E. (Ag ’20)
Pool of stars. Meigs, C. (My ’20)
Poor dear Theodora! Irwin, F. (My ’20)
Poor man’s rock. Sinclair, B. W: (D ’20)
Poor relations. Mackenzie, C. (Mr ’20)
Poor white. Anderson, S. (D ’20)
Poor wise man. Rinehart, M. (D ’20)
Popular chemical dictionary. Kingzett, C: T: (Ag
’20)
Porcelain
Lewer, H. W: China collector. (My ’10)
Pork-production. Smith, W: W. (S ’20)
Port Allington stories. Vernède, R. E. (N ’20)
Port of New York. Rush, T. E: (Jl ’20)
Portraits
Fletcher, C: R. L. Historical portraits, 1700–
1850. (D ’20)
Portraits of the eighties. Hutchinson, H. G. (S ’20)
Portygee. Lincoln, J. C. (Je ’20)
Position of the laborer in a system of nationalism.
Furniss, E. S. (N ’20)
Potterism. Macaulay, R. (D ’20)
Pottery
Rhead, G: W. Earthenware collector. (My ’20)
Power of a god, and other one-act plays. Guild, T.
H. (My ’20)
Power of a lie. Bojer, J. (Jl ’20)
Power of prayer. Paterson. W: P., and Russell, D:,
eds. (F ’21)
Practical fly fishing. St John, L. (Je ’20)
Practical hints on playwriting. Platt, A. (N ’20)
Practical illustration. Whiting, J: D. (Ja ’21)
Practical views on psychic phenomena. Wright, G:
E. (Ag ’20)
Practice and theory of Bolshevism. Eng title of
Bolshevism. Russell, B. A. W: (Ja ’21)
Prairie mother. Stringer, A. J: A. (N ’20)
Prairie-schooner princess. Maule, M. K. (N ’20)
Pratt, Mrs Harry Rogers. See Rothery, A. E.
Prayer
Crane, A. M. Ask and receive. (F ’21)
Paterson, W: P., and Russell, D:, eds. Power of
prayer. (F ’21)
Preaching
Donnelly, F. P. Art of interesting. (N ’20)
Fitch, A. P. Preaching and paganism. (F ’21)
Preaching and paganism. Fitch, A. P. (F ’21)
Precepts and judgments. Foch, F. (O ’20)
Prejudices. Mencken, H: L: (Ja ’21)
Present and past banking in Mexico. McCaleb, W.
F. (Ap ’20)
Present day Paris and the battlefields. Story, A. M.
S. (N ’20)
Presenting Jane McRae. Luther, M. L. (S ’20)
Presidents (United States)
Dunn, A. W. How presidents are made. (Je ’20)
Presidents and pies. Anderson, I. W. (Je ’20)
Preventive man. McFadden, G. V. (Jl ’20)
Prices
Academy of political science. Inflation and high
prices. (F ’21)
Friday, D: Profits, wages, and prices. (N ’20)
McPherson, L. G. Flow of value. (My ’20)
Murchison, C. T. Resale price maintenance. (My
’20)
Prime minister. Spender, H. (Ag ’20)
Primitive society. Lowie, R. H. (Ag ’20)
Principles of accounting. Hodge, A. C., and
McKinsey, J. O. (D ’20)
Principles of æsthetics. Parker, D. H: (D ’20)
Principles of citizenship. Jones, H: (D ’20)
Principles of education. Coursault, J. H. (D ’20)
Principles of electric spark ignition in internal
combustion engines. Morgan, J: D: (D ’20)
Principles of sociology. Ross, E: A. (S ’20)
Principles of sociology with educational
applications. Clow, F: R. (S ’20)
Principles of war. Foch, F. (O ’20)
Prisoner of Pentonville. (Jl ’20)
Prisoner of Trotsky’s. Kalpaschnikoff, A. (Ag ’20)
Prize stories 1919. O. Henry memorial award. (Jl
’20)
Problem of nervous breakdown. Ash, E. L. (Ag
’20)
Problem of the nervous child. Evans, E. (My ’20)
Problems in business law. Moore, J. H., and
Houston, C: A. (Ag ’20)
Problems in foreign exchange. Shugrue, M. J. (F
’21)
Problems of law. Wigmore, J: H: (D ’20)
Problems of today. Storey, M. (N ’20)
Proceedings of the international conference of
women physicians. (Ja ’21)
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!

ebookmass.com

You might also like