Programming PHP 2nd Edition Covers PHP 5 Rasmus Lerdorf 2024 scribd download
Programming PHP 2nd Edition Covers PHP 5 Rasmus Lerdorf 2024 scribd download
com
https://ebookname.com/product/programming-php-2nd-edition-
covers-php-5-rasmus-lerdorf/
OR CLICK BUTTON
DOWLOAD EBOOK
https://ebookname.com/product/php-architect-s-zend-
php-5-certification-study-guide-1st-ed-edition-davey-shafik/
ebookname.com
https://ebookname.com/product/learning-php-5-1st-edition-david-sklar/
ebookname.com
https://ebookname.com/product/multi-tier-application-programming-with-
php-1st-edition-david-wall/
ebookname.com
https://ebookname.com/product/ben-graham-was-a-quant-raising-the-iq-
of-the-intelligent-investor-wiley-finance-1st-edition-steven-p-
greiner/
ebookname.com
Environmental Disasters Natural Recovery and Human
Responses 1st Edition Roger Del Moral
https://ebookname.com/product/environmental-disasters-natural-
recovery-and-human-responses-1st-edition-roger-del-moral/
ebookname.com
https://ebookname.com/product/how-to-write-essays-and-
dissertations-2nd-edition-edition-nigel-fabb/
ebookname.com
https://ebookname.com/product/older-people-in-emergencies-
considerations-for-action-and-policy-development-1st-edition-david-
hutton/
ebookname.com
Harriet Tubman James A. Mcgowan
https://ebookname.com/product/harriet-tubman-james-a-mcgowan/
ebookname.com
Programming PHP
Other resources from O’Reilly
Related titles Managing and Using MySQL Web Database Applications
MySQL Cookbook™ with PHP and MySQL
PHP Cookbook™ Learning PHP 5
PHP Pocket Reference Upgrading to PHP 5
Programming PHP
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (safari.oreilly.com). For more information, contact our
corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com.
Editors: Tatiana Apandi and Allison Randal Cover Designer: Ellie Volckhausen
Production Editor: Matt Hutchinson Interior Designer: David Futato
Production Services: GEX, Inc. llustrators: Robert Romano, Jessamyn Read,
and Lesley Borash
Printing History:
March 2002: First Edition.
April 2006: Second Edition.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. Programming PHP, the image of a cuckoo, and related trade dress are trademarks
of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a
trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors
assume no responsibility for errors or omissions, or for damages resulting from the use of the
information contained herein.
ISBN-10: 0-596-00681-0
ISBN-13: 978-0-596-00681-5
[M] [10/07]
Table of Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
1. Introduction to PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What Does PHP Do? 1
A Brief History of PHP 2
Installing PHP 7
A Walk Through PHP 9
2. Language Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Lexical Structure 18
Data Types 25
Variables 32
Expressions and Operators 36
Flow-Control Statements 49
Including Code 57
Embedding PHP in Web Pages 59
3. Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Calling a Function 63
Defining a Function 64
Variable Scope 66
Function Parameters 68
Return Values 71
Variable Functions 72
Anonymous Functions 73
v
4. Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Quoting String Constants 74
Printing Strings 78
Accessing Individual Characters 82
Cleaning Strings 82
Encoding and Escaping 83
Comparing Strings 89
Manipulating and Searching Strings 91
Regular Expressions 97
POSIX-Style Regular Expressions 101
Perl-Compatible Regular Expressions 106
5. Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Indexed Versus Associative Arrays 119
Identifying Elements of an Array 120
Storing Data in Arrays 120
Multidimensional Arrays 123
Extracting Multiple Values 123
Converting Between Arrays and Variables 127
Traversing Arrays 128
Sorting 133
Acting on Entire Arrays 138
Using Arrays 140
6. Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Terminology 144
Creating an Object 144
Accessing Properties and Methods 145
Declaring a Class 146
Introspection 153
Serialization 159
vi | Table of Contents
8. Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Using PHP to Access a Database 196
Relational Databases and SQL 198
PEAR DB Basics 199
Advanced Database Techniques 205
Sample Application 211
9. Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Embedding an Image in a Page 225
The GD Extension 226
Basic Graphics Concepts 227
Creating and Drawing Images 228
Images with Text 232
Dynamically Generated Buttons 236
Scaling Images 239
Color Handling 240
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
Today, PHP is the most widely used programming language on the Web, with over
40 percent of all web applications written in PHP. It is installed on over 22 million
domain servers (source: Netcraft), as shown in Figure F-1. The number of develop-
ers using PHP has now reached over 2.5 million. The community developing PHP is
very impressive, with over 450 CVS committers who wrote a total of 1 million lines
of code. The PHP community is one of the most dynamic, with thousands of people
sharing code, evangelizing about PHP, supporting each other, and creating many
projects such as Wikipedia, Mambo, PHP-Nuke, FUDforum, SugarCRM, and
Horde, just to mention a few.
IBM, Oracle
Endorse PHP
PHP 5.0
Yahoo! • XML, SOAP, OOP 20M
Standardizes • Zend Studio
on PHP
PHP 4 15M
Released
• 1M Internet domains
• Zend Engine
• Zend Founded
Zeek Suraski, 10M
Andi Gutmans
Rasmus develop
Lerdolf PHP 3
develops
PHP/Fl 5M
PHP
internet
domains
1995 1997 1999 2000 2002 2004 2005
Its simplicity is what made PHP so successful. Simplicity equals less code. Develop-
ers and companies have been developing projects with PHP in a fraction of the time
it would take another language.
ix
x | Foreword
Now more than ever, the Web is a major vehicle for corporate and personal commu-
nications. Web sites carry satellite images of Earth in its entirety, search for life in
outer space, and house personal photo albums, business shopping carts, and prod-
uct lists. Many of those web sites are driven by PHP, an open source scripting lan-
guage primarily designed for generating HTML content.
Since its inception in 1994, PHP has swept the Web and continues its phenomenal
growth with recent endorsements by IBM and ORACLE corporations (to name a
few). Also, the millions of web sites powered by PHP are testament to its popularity
and ease of use. It lies in the sweet spot between Perl/CGI, Active Server Pages (ASP),
and HTML. Everyday people can learn PHP and can build powerful dynamic web
sites with it. Marc Andreessen, chairman of Opsware Inc. and founder of Netscape
Communications, recently described PHP as having replaced Java as the ideal pro-
gramming language for the Web.
The core PHP language (Version 5+) features powerful string- and array-handling
facilities, as well as greatly improved support for object-oriented programming. With
the use of standard and optional extension modules, a PHP application can interact
with a database such as MySQL or Oracle, draw graphs, create PDF files, and parse
XML files. You can write your own PHP extension modules in C—for example, to
provide a PHP interface to the functions in an existing code library. You can even run
PHP on Windows, which lets you control other Windows applications such as Word
and Excel with COM or interact with databases using ODBC.
This book is a guide to the PHP language. When you finish it, you will know how
the PHP language works, how to use the many powerful extensions that come stan-
dard with PHP, and how to design and build your own PHP web applications.
xi
xii | Preface
Preface | xiii
xiv | Preface
Safari® Enabled
When you see a Safari® Enabled icon on the cover of your favorite tech-
nology book, that means the book is available online through the
O’Reilly Network Safari Bookshelf.
Safari offers a solution that’s better than e-books. It’s a virtual library that lets you
easily search thousands of top tech books, cut and paste code samples, download
chapters, and find quick answers when you need the most accurate, current informa-
tion. Try it for free at http://safari.oreilly.com.
Acknowledgments
Rasmus Lerdorf
I would like to acknowledge the large and wonderfully boisterous PHP community,
without which there would be no PHP today.
Preface | xv
Peter MacIntyre
I would first like to praise the Lord of Hosts who gives me the strength to face each
day. He created electricity through which I make my livelihood; thanks and praise to
Him for this totally unique and fascinating portion of His creation.
Closer to home, I would like to thank Rasmus for the initial (and continuing) efforts
behind this great language called PHP. I have been using PHP exclusively for many
years now and love its simplicity and logic more each day.
To Kevin, my main coauthor in this edition, thanks for the efforts and desire to stick
with this project to the end. You took on a big task with the “harder” chapters, and
with the help of Wez Furlong and Chris Shiflett we finally pulled it off!
To Allison Randal and Tatiana Apandi at O’Reilly, great patience and professional-
ism came from you both on this project. Thanks for giving me this opportunity and
for working with us from start to finish.
I would also like to thank my friends Mike Burns and Ian Morse, who performed the
almost thankless job of doing the technical editing on this book. My hat goes off to
you both—thanks a lot!
And finally to all those at O’Reilly who so often go unmentioned—I don’t know all
your names, but I know what you have to do to make a book like this finally make it
to the bookshelves. The editing, graphics work, layout, planning, marketing, and so
on all has to be done, and I appreciate your work toward this end.
Dedication
I would like to dedicate my portions of this book to my wonderful wife, Dawn Etta
Riley. She has been supportive of me in my personal endeavors, and although some
of them don’t pay off, she still supports my efforts of the ones that do. I love you,
Dawn, and look forward to the teenage-free years with you. To our children, too, I
would like to dedicate this effort: Daniel Tomas Walker, Charity Margaret Marie
MacIntyre, Michael Peter Walker, and Simon Peter MacIntyre (just to get their
names in print).
xvi | Preface
PHP is a simple yet powerful language designed for creating HTML content. This
chapter covers essential background on the PHP language. It describes the nature
and history of PHP; which platforms it runs on; and how to download, install, and
configure it. This chapter ends by showing you PHP in action, with a quick walk-
through of several PHP programs that illustrate common tasks, such as processing
form data, interacting with a database, and creating graphics.
Announcing the Personal Home Page Tools (PHP Tools) version 1.0.
The only requirement for these tools to work is that you have
the ability to execute your own cgi programs. Ask your system
administrator if you are not sure what this means.
The tools are in the public domain distributed under the GNU
Public License. Yes, that means they are free!
--
Rasmus Lerdorf
rasmus@io.org
http://www.io.org/~rasmus
Note that the URL and email address shown in this message are long gone. The lan-
guage of this announcement reflects the concerns that people had at the time, such
as password-protecting pages, easily creating forms, and accessing form data on sub-
sequent pages. The announcement also illustrates PHP’s initial positioning as a
framework for a number of useful tools.
The announcement talks only about the tools that came with PHP, but behind the
scenes the goal was to create a framework to make it easy to extend PHP and add
more tools. The business logic for these add-ons was written in C—a simple parser
picked tags out of the HTML and called the various C functions. It was never my
plan to create a scripting language.
So, what happened?
I started working on a rather large project for the University of Toronto that needed
a tool to pull together data from various places and present a nice web-based admin-
istration interface. Of course, I decided that PHP would be ideal for the task, but for
performance reasons, the various small tools of PHP 1 had to be brought together
better and integrated into the web server.
Initially, I made some hacks to the NCSA web server, to patch it to support the core
PHP functionality. The problem with this approach was that as a user, you had to
It is most likely the fastest and simplest tool available for creating
database-enabled web sites.
It will work with any UNIX-based web server on every UNIX flavour out
there. The package is completely free of charge for all uses including
commercial.
Feature List:
. Access Logging
Log every hit to your pages in either a dbm or an mSQL database.
Having hit information in a database format makes later analysis easier.
. Access Restriction
Password protect your pages, or restrict access based on the refering URL
plus many other options.
. mSQL Support
Embed mSQL queries right in your HTML source files
. Postgres95 Support
Embed Postgres95 queries right in your HTML source files
. DBM Support
DB,DBM,NDBM and GDBM are all supported
. RFC-1867 File Upload Support
Create file upload forms
. Variables, Arrays, Associative Arrays
. User-Defined Functions with static variables + recursion
. Conditionals and While loops
Writing conditional dynamic web pages could not be easier than with
the PHP/FI conditionals and looping support
. Extended Regular Expressions
Powerful string manipulation support through full regexp support
. Raw HTTP Header Control
Lets you send customized HTTP headers to the browser for advanced
features such as cookies.
. Dynamic GIF Image Creation
Thomas Boutell's GD library is supported through an easy-to-use set of
tags.
--
Rasmus Lerdorf
rasmus@vex.net
This was the first time the term “scripting language” was used. PHP 1’s simplistic
tag-replacement code was replaced with a parser that could handle a more sophisti-
cated embedded tag language. By today’s standards, the tag language wasn’t particu-
larly sophisticated, but compared to PHP 1 it certainly was.
The main reason for this change was that few people who used PHP 1 were actually
interested in using the C-based framework for creating add-ons. Most users were
much more interested in being able to embed logic directly in their web pages for cre-
ating conditional HTML, custom tags, and other such features. PHP 1 users were
constantly requesting the ability to add the hit-tracking footer or send different
HTML blocks conditionally. This led to the creation of an if tag. Once you have if,
you need else as well and from there, it’s a slippery slope to the point where,
whether you want to or not, you end up writing an entire scripting language.
By mid-1997, PHP Version 2 had grown quite a bit and had attracted a lot of users,
but there were still some stability problems with the underlying parsing engine. The
project was also still mostly a one-man effort, with a few contributions here and
there. At this point, Zeev Suraski and Andi Gutmans in Tel Aviv volunteered to
rewrite the underlying parsing engine, and we agreed to make their rewrite the base
for PHP Version 3. Other people also volunteered to work on other parts of PHP,
and the project changed from a one-person effort with a few contributors to a true
open source project with many developers around the world.
Here is the PHP 3.0 announcement from June 1998:
June 6, 1998 -- The PHP Development Team announced the release of PHP 3.0,
the latest release of the server-side scripting solution already in use on
over 70,000 World Wide Web sites.
PHP 3.0 also supports a wide range of databases, including Oracle, Sybase, Solid,
MySQ, mSQL, and PostgreSQL, as well as ODBC data sources.
"At Circle Net we have found PHP to be the most robust platform for
rapid web-based application development available today," said Troy
Cobb, Chief Technology Officer at Circle Net, Inc. "Our use of PHP
has cut our development time in half, and more than doubled our client
satisfaction. PHP has enabled us to provide database-driven dynamic
solutions which perform at phenomenal speeds."
PHP 3.0 is available for free download in source form and binaries for
several platforms at http://www.php.net/.
After the release of PHP 3, usage really started to take off. Version 4 was prompted
by a number of developers who were interested in making some fundamental
changes to the architecture of PHP. These changes included abstracting the layer
between the language and the web server, adding a thread-safety mechanism, and
adding a more advanced, two-stage parse/execute tag-parsing system. This new
parser, primarily written by Zeev and Andi, was named the Zend engine. After a lot
of work by a lot of developers, PHP 4.0 was released on May 22, 2000.
Since that release, there have been a few minor releases of PHP 4, with the latest ver-
sion as of this writing being 4.3.11. As this book goes to press, PHP Version 5 has
been released for some time. There have already been a few minor ‘dot’ releases, and
the stability of this current version is quite high. As you will see in this book, there
have been some major advances made in this version of PHP. XML, object orienta-
tion, and SQLite are among the major updates. Many other minor changes, function
additions, and feature enhancements have also been incorporated.
Installing PHP
PHP is available for many operating systems and platforms. The most common
setup, however, is to use PHP as a module for the Apache web server on a Unix
machine. This section briefly describes how to install Apache with PHP. If you’re
interested in running PHP on Windows, see Chapter 15, which explains many of
your options for that operating system.
To install Apache with PHP, you’ll need a Unix machine with an ANSI-compliant C
compiler, and around 10 MB of available disk space for source and object files.
You’ll also need Internet access to fetch the source code for PHP and Apache.
Start by downloading the source distributions of PHP and Apache. The latest files are
always available from the web sites for the respective tools. Since there are so many
options on installation, we are showing here the generic installation instructions for a
Linux server as shown on the PHP web site at http://ca3.php.net/manual/en/install.
unix.php. You will have to replace the xxx signifier in the following steps with the
version of the software that you choose to install.
Although Apache has a Version 2.x you may find that it is more adept
at serving PHP with Version 1.3.xx, so generally we will be using the
1.3.xx version throughout this book.
1. gunzip apache_xxx.tar.gz
2. tar -xvf apache_xxx.tar
Installing PHP | 7
Such, then, are the causes and remedies for smoke, and consequently of soot, for smoke, or
rather opaque smoke, consists, as we have seen, of merely the gases of combustion with
minute particles of carbon diffused throughout them; and as smoke is the result of the
imperfect burning of our coals, it follows that chimney-sweepers are but a consequence of
our ignorance, and that, as we grow wiser in the art of economising our fuel, we shall be
gradually displacing this branch of labourers—the means of preventing smoke being simply
the mode of displacing the chimney-sweepers—and this is another of the many facts to teach
us that not only are we doubling our population in forty years, but we are likewise learning
every year how to do our work with a less number of workers, either by inventing some piece
of mechanism that will enable one “hand” to do as much as one hundred, or else doing away
with some branch of labour altogether. Here lies the great difficulty of the time. A new
element—science, with its offspring, steam—has been introduced into our society within the
last century, decreasing labour at a time when the number of our labourers has been
increasing at a rate unexampled in history; and the problem is, how to reconcile the new
social element with the old social institutions, doing as little injury as possible to the
community.
Suppose, for instance, the “smoke nuisance” entirely prevented, and that Professor Faraday’s
prophecy as to the great reduction of the smoke from coal fires in houses were fulfilled, and
that the expectations of the sanguine and intense Committee, who tell us that they have
“received the most gratifying assurances of the confident hope entertained by several of the
highest scientific authorities, that the black smoke proceeding from fires in private dwellings
and all other places may be eventually entirely prevented,”—suppose that these expectations,
I say, be realized (and there appears to be little doubt of the matter), what is to become of
the 1000 to 1500 “sweeps” who live, as it were, upon this very smoke? Surely the whole
community should not suffer for them, it will be said. True; but unfortunately the same
argument is being applied to each particular section of the labouring class,—and the
labourers make up by far the greater part of the community. If we are daily displacing a
thousand labourers by the annihilation of this process, and another thousand by the
improvement of that, what is to be the fate of those we put on one side? and where shall we
find employment for the hundred thousand new “hands” that are daily coming into existence
among us? This is the great problem for earnest thoughtful men to work out!
But we have to deal here with the chimney-sweepers as they are, and not as they may be in
a more scientific age. And, first, as to the quantity of soot annually deposited at present in
the London chimneys.
The quantity of soot produced in the metropolis every year may be ascertained in the
following manner:—
The larger houses are swept in some instances once a month, but generally once in three
months, and yield on an average six bushels of soot per year. A moderate-sized house,
belonging to the “middle class,” is usually swept four times a year, and gives about five
bushels of soot per annum; while houses occupied by the working and poorer classes are
seldom swept more than twice, and sometimes only once, in the twelvemonth, and yield
about two bushels of soot annually.
The larger houses—the residences of noblemen and the more wealthy gentry—may, then, be
said to produce an average of six bushels of soot annually; the houses of the more
prosperous tradesmen, about five bushels; while those of the humbler classes appear to yield
only two bushels of soot per annum. There are, according to the last returns, in round
numbers, 300,000 inhabited houses at present in the metropolis, and these, from the
“reports” of the income and property tax, may be said to consist, as regards the average
rentals, of the proportions given in the next page.
The value of the Soot collected throughout London is the next subject to engage our
attention. Many sweepers have represented it as a very curious fact, and one for which they
could advance no sufficient reason, that the price of a bushel of soot was regulated by the
price of the quartern loaf, so that you had only to know that the quartern loaf was 5d. to
know that such was the price of a bushel of soot. This, however, is hardly the case at
present; the price of the quartern loaf (not regarding the “seconds,” or inferior bread), is
now, at the end of December, 1851, 5d. to 6d. according to quality. The price of soot per
bushel is but 5d., and sometimes but 4½d., but 5d. may be taken as an average.
Now 1,000,000 bushels of soot, at 5d., will be found to yield 20,833l. 6s. 8d. per annum. But
the whole of this quantity is not collected by the chimney-sweepers, for many of the poorer
persons seldom have their chimneys swept; and by the table given in another place, it will be
seen that not more than 800,000 bushels are obtained in the course of the year by the
London “sweeps.” Hence we may say, that there are 800,000 bushels of soot annually
collected from the London chimneys, and that this is worth not less than 16,500l. per annum.
The next question is, how many people are employed in collecting this quantity of refuse
matter, and how do they collect it, and what do they get, individually and collectively, for so
doing?
To begin with the number of master and journeymen sweepers employed in removing these
800,000 bushels of soot from our chimneys: according to the Census returns, the number of
“sweeps” in the metropolis in the years 1841 and 1831 were as follows:—
Increase in
Chimney-sweepers. 1841. 1831.
ten years.
Males, 20 years and upwards 619 421 198
„ under 20 years 370 no returns.
Females, 20 years & upwards 44 „
1033
But these returns, such as they are, include both employers and employed, in one confused
mass. To disentangle the economical knot, we must endeavour to separate the number of
master sweepers from the journeymen. According to the Post-Office Directory the master
sweepers amount to no more than 32, and thus there would be one more than 1000 for the
number of the metropolitan journeymen sweepers; these statements, however, appear to be
very wide of the truth.
In 1816 it was represented to the House of Commons, that there were within the bills of
mortality, 200 masters, all—except the “great gentlemen,” as one witness described them,
who were about 20 in number—themselves working at the business, and that they had 150
journeymen and upwards of 500 apprentices, so that there must then have been 850 working
sweepers altogether, young and old.
These numbers, it must be borne in mind, were comprised in the limits of the bills of
mortality 34 years ago. The parishes in the old bills of mortality were 148; there are now in
the metropolis proper 176, and, as a whole, the area is much more densely covered with
dwelling-houses. Taking but the last ten years, 1841 to 1851, the inhabited houses have
increased from 262,737 to 307,722, or, in round numbers, 45,000.
Now in 1811 the number of inhabited houses in the metropolis was 146,019, and in 1821 it
was 164,948; hence in 1816 we may assume the inhabited houses to have been about
155,000; and since this number required 850 working sweepers to cleanse the London
chimneys, it is but a rule of three sum to find how many would have been required for the
same purpose in 1841, when the inhabited houses had increased to 262,737; this, according
to Cocker, is about 1400; so that we must come to the conclusion either that the number of
working sweepers had not kept pace with the increase of houses, or that the returns of the
census were as defective in this respect as we have found them to be concerning the street-
sellers, dustmen, and scavagers. Were we to pursue the same mode of calculation, we should
find that if 850 sweepers were required to cleanse the chimneys of 155,000 houses, there
should be 1687 such labourers in London now that the houses are 307,722 in number.
But it will be seen that in 1816 more than one-half (or 500 out of 850) of the working
chimney-sweepers were apprentices, and in 1841 the chimney-sweepers under 20 years of
age, if we are to believe the census, constituted more than one-third of the whole body (or
370 out of 1033). Now as the use of climbing boys was prohibited in 1842, of course this
large proportion of the trade has been rendered useless; so that, estimating the master and
journeymen sweepers at 250 in 1816, it would appear that about 500 would be required to
sweep the chimneys of the metropolis at present. To these, of course, must be added the
extra number of journeymen necessary for managing the machines. And considering the
journeymen to have increased threefold since the abolition of the climbing boys, we must add
300 to the above number, which will make the sum total of the individuals employed in this
trade to amount to very nearly 800.
By inquiries throughout the several districts of the metropolis, I find that there are altogether
350 master sweepers at present in London; 106 of these are large masters, who seldom go
out on a round, but work to order, having a regular custom among the more wealthy classes;
while the other 244 consist of 92 small masters and 152 “single-handed” masters, who travel
on various rounds, both in London and the suburbs, seeking custom. Of the whole number,
19 reside within the City boundaries; from 90 to 100 live on the Surrey side, and 235 on the
Middlesex side of the Thames (without the City boundaries). A large master employs from 2
to 10 men, and 2 boys; and a small one only 2 men or sometimes 1 man and a boy, while a
single-handed master employs no men nor boys at all, but does all the work himself.
The 198 masters employ among them 12 foremen, 399 journeymen, and 62 boys, or 473
hands, and adding to them the single-handed master-men who work at the business
themselves, we have 823 working men in all; so that, on the whole, there are not less than
between 800 and 900 persons employed in cleansing the London chimneys of their soot.
The next point that presents itself in due order to the mind is, as to the mode of working
among the chimney-sweepers; that is to say, how are the 800,000 bushels of soot collected
from the 300,000 houses by these 820 working sweepers? But this involves a short history of
the trade.
Of the Sweepers of Old, and the Climbing Boys.
Formerly the chimneys used to be cleansed by the house servants, for a person could easily
stand erect in the huge old-fashioned constructions, and thrust up a broom as far as his
strength would permit. Sometimes, however, straw was kindled at the mouth of the chimney,
and in that way the soot was consumed or brought down to the ground by the action of the
fire. But that there were also regular chimney-sweepers in the latter part of the sixteenth
century is unquestionable; for in the days of the First James and Charles, poor Piedmontese,
and more especially Savoyards, resorted to England for the express purpose. How long they
laboured in this vocation is unknown. The Savoyards, indeed, were then the general
showmen and sweeps of Europe, and so they are still in some of the cities of Italy and
France.
As regards the first introduction of English children into chimneys—the establishment of the
use of climbing boys—nothing appears, according to the representations made to Parliament
on several occasions, to be known; and little attention seems to have been paid to the
condition of these infants—some were but little better—until about 1780, when the
benevolent Jonas Hanway, who is said, but not uncontradictedly, to have been the first
person who regularly used an umbrella in the streets of London, called public attention to the
matter. In 1788 Mr. Hanway and others brought a bill into Parliament for the better protection
of the climbing boys, requiring, among other provisions, all master sweepers to be licensed,
and the names and ages of all their apprentices registered. The House of Lords, however,
rejected this bill, and the 28th George III., c. 48, was passed in preference. The chief
alterations sought to be effected by the new Act were, that no sweeper should have more
than six apprentices, and that no boy should be apprenticed at a tenderer age than eight
years. Previously there were no restrictions in either of those respects.
These provisions were, however, very generally violated. By one of those “flaws” or
omissions, so very common and so little creditable to our legislation, it was found that there
was no prohibition to a sweeper’s employing his own children at what age he pleased; and
“some,” or “several,” for I find both words used, employed their sons, and occasionally their
daughters, in chimney climbing at the ages of six, five, and even between four and five
years! The children of others, too, were continually being apprenticed at illegal ages, for no
inquiry was made into the lad’s age beyond the statement of his parents, or, in the case of
parish apprentices, beyond the (in those days) not more trustworthy word of the overseers.
Thus boys of six were apprenticed—for apprenticeship was almost universal—as boys of
eight, by their parents; while parish officers and magistrates consigned the workhouse
orphans, as a thing of course, to the starvation and tyranny which they must have known
were very often in store for them when apprenticed to sweepers.
The following evidence was adduced before Parliament on the subject of infant labour in this
trade:—
Mr. John Cook, a master sweeper, then of Great Windmill-street and Kentish-town, the first
who persevered in the use of the machine years before its use was compulsory, stated that it
was common for parents in the business to employ their own children, under the age of
seven, in climbing; and that as far as he knew, he himself was only between six and seven
when he “came to it;” and that almost all master sweepers had got it in their bills that they
kept “small boys for register-stoves, and such like as that.”
Mr. T. Allen, another master sweeper, was between four and five when articled to an uncle.
THE LONDON SWEEP
[From a Daguerreotype by Beard.]
To accidents they were frequently liable in the pursuit of their callings, and sometimes these
accidents were the being jammed or fixed, or, as it was called in the trade, “stuck,” in narrow
and heated flues, sometimes for hours, and until death.
Among these hapless lads were indeed many deaths from accidents, cruelty, privation, and
exhaustion, but it does not appear that the number was ever ascertained. There were also
many narrow escapes from dreadful deaths. I give instances of each:—
“On Monday morning, the 29th of March, 1813, a chimney-sweeper of the name of Griggs,
attended to sweep a small chimney in the brewhouse of Messrs. Calvert and Co., in Upper
Thames-street; he was accompanied by one of his boys, a lad of about eight years of age, of
the name of Thomas Pitt. The fire had been lighted as early as two o’clock the same
morning, and was burning on the arrival of Griggs and his little boy at eight; the fire-place
was small, and an iron pipe projected from the grate some little distance, into the flue; this
the master was acquainted with (having swept the chimneys in the brewhouse for some
years) and therefore had a tile or two taken from the roof, in order that the boy might
descend the chimney. He had no sooner extinguished the fire than he suffered the lad to go
down; and the consequence, as might be expected, was his almost immediate death, in a
state, no doubt, of inexpressible agony. The flue was of the narrowest description, and must
have retained heat sufficient to have prevented the child’s return to the top, even supposing
he had not approached the pipe belonging to the grate, which must have been nearly red-
hot; this, however, was not clearly ascertained on the inquest, though the appearance of the
body would induce an opinion that he had been unavoidably pressed against the pipe. Soon
after his descent, the master, who remained on the top, was apprehensive that something
had happened, and therefore desired him to come up; the answer of the boy was, ‘I cannot
come up, master; I must die here.’ An alarm was given in the brewhouse, immediately, that
he had stuck in the chimney, and a bricklayer who was at work near the spot attended, and
after knocking down part of the brickwork of the chimney, just above the fire-place, made a
hole sufficiently large to draw him through. A surgeon attended, but all attempts to restore
life were ineffectual. On inspecting the body, various burns appeared; the fleshy part of the
legs, and a great part of the feet more particularly, were injured; those parts, too, by which
climbing boys most effectually ascend or descend chimneys, viz., the elbows and knees,
seemed burnt to the bone; from which it must be evident that the unhappy sufferer made
some attempts to return as soon as the horrors of his situation became apparent.”
“In the improvement made some years since by the Bank of England, in Lothbury, a chimney,
belonging to a Mr. Mildrum, a baker, was taken down, but before he began to bake, in order
to see that the rest of the flue was clear, a boy was sent up, and after remaining some time,
and not answering to the call of his master, another boy was ordered to descend from the top
of the flue and to meet him half-way; but this being found impracticable, they opened the
brickwork in the lower part of the flue, and found the first-mentioned boy dead. In the mean
time the boy in the upper part of the flue called out for relief, saying, he was completely
jammed in the rubbish and was unable to extricate himself. Upon this a bricklayer was
employed with the utmost expedition, but he succeeded only in obtaining a lifeless body. The
bodies were sent to St. Margaret’s Church, Lothbury, and a coroner’s inquest, which sat upon
them, returned the verdict—Accidental Death.”
“In the beginning of the year 1808, a chimney-sweeper’s boy being employed to sweep a
chimney in Marsh-street, Walthamstow, in the house of Mr. Jeffery, carpenter, unfortunately,
in his attempt to get down, stuck in the flue and was unable to extricate himself. Mr. Jeffery,
being within hearing of the boy, immediately procured assistance. As the chimney was low,
and the top of it easily accessible from without, the boy was taken out in about ten minutes,
the chimney-pot and several rows of bricks having been previously removed; if he had
remained in that dreadful situation many minutes longer, he must have died. His master was
sent for, and he arrived soon after the boy had been released; he abused him for the
accident, and, after striking him, sent him with a bag of soot to sweep another chimney. The
child appeared so very weak when taken out that he could scarcely stand, and yet this
wretched being, who had been up ever since three o’clock, had before been sent by his
master to Wanstead, which with his walk to Marsh-street made about five miles.”
“In May, 1817, a boy employed in sweeping a chimney in Sheffield got wedged fast in one of
the flues, and remained in that situation near two hours before he could be extricated, which
was at length accomplished by pulling down part of the chimney.”
On one occasion a child remained above two hours in some danger in a chimney, rather than
venture down and encounter his master’s anger. The man was held to bail, which he could
not procure.
As in the cases I have described (at Messrs. Calvert’s, and in Lothbury), the verdict was
usually “Accidental Death,” or something equivalent.
It was otherwise, however, where wilful cruelty was proven.
The following case was a subject of frequent comment at the time:—
“On Friday, 31st May, 1816, William Moles and Sarah his wife, were tried at the Old Bailey for
the wilful murder of John Hewley, alias Haseley, a boy about six years of age, in the month of
April last, by cruelly beating him. Under the direction of the learned judge, they were
acquitted of the crime of murder, but the husband was detained to take his trial as for a
misdemeanor, of which he was convicted upon the fullest evidence, and sentenced to two
years’ imprisonment. The facts, as proved in this case, are too shocking in detail to relate:
the substance of them is, that he was forced up the chimney on the shoulder of a bigger boy,
and afterwards violently pulled down again by the leg and dashed upon a marble hearth; his
leg was thus broken, and death ensued in a few hours, and on his body and knees were
found scars arising from wounds of a much older date.”
This long-continued system of cruelties, of violations of public and private duties, bore and
ripened its natural fruits. The climbing boys grew up to be unhealthy, vicious, ignorant, and
idle men, for during their apprenticeships their labour was over early in the day, and they
often passed away their leisure in gambling in the streets with one another and other
children of their stamp, as they frequently had halfpence given to them. They played also at
“chuck and toss” with the journeymen, and of course were stripped of every farthing. Thus
they became indolent and fond of excitement. When a lad ceased to be an apprentice,
although he might be but 16, he was too big to climb, and even if he got employment as a
journeyman, his remuneration was wretched, only 2s. a week, with his board and lodging.
There were, however, far fewer complaints of being insufficiently fed than might have been
expected, but the sleeping places were execrable: “They sleep in different places,” it was
stated, “sometimes in sheds, and sometimes in places which we call barracks (large rooms),
or in the cellar (where the soot was kept); some never sleep upon anything that can be
called a bed; some do.”
Mr. T. Allen, a master sweep for 22 years, gave the Committee the following account of the
men’s earnings and (what may be called) the General Perquisites of the trade under the
exploded system:—
“If a man be 25 years of age, he has no more than 2s. a week; he is not clothed, only fed
and lodged in the same manner as the boys. The 2s. a week is not sufficient to find him
clothes and other necessaries, certainly not; it is hardly enough to find him with shoe-leather,
for they walk over a deal of ground in going about the streets. The journeyman is able to live
upon those wages, for he gets halfpence given him: supposing he is 16 or 20 years of age,
he gets the boys’ pence from them and keeps it; and if he happens to get a job for which he
receives a 1s., he gets 6d. of that, and his master the other 6d. The boys’ pence are what
the boys get after they have been doing their master’s work; they get a 1d. or so, and the
journeyman takes it from them, and ‘licks’ them if they do not give it up.” [These “jobs,” after
the master’s work had been done, were chance jobs, as when a journeyman on his round
was called on by a stranger, and unexpectedly, to sweep a chimney. Sometimes, by
arrangement of the journeyman and the lad, the proceeds never reached the master’s
pocket. Sometimes, but rarely, such jobs were the journeyman’s rightful perquisite.] “Men,”
proceeds Mr. Allen, “who are 22 and 23 years of age will play with the young boys and win
their money. That is, they get half the money from them by force, and the rest by fraud.
They are driven to this course from the low wages which the masters give them, because
they have no other means to get anything for themselves, not even the few necessaries
which they may want; for even what they want to wash with they must get themselves. As to
what becomes of the money the boys get on May-day, when they are in want of clothes, the
master will buy them, as check shirts or handkerchiefs. These masters get a share of the
money which the boys collect on May-day. The boys have about 1s. or 1s. 6d.; the
journeyman has also his share; then the master takes the remainder, which is to buy the
boys’ clothes and other necessaries, as they say. I cannot exactly tell what the average
amount is that a boy will get on the May-day; the most that my boy ever got was 5s. But I
think that the boys get more than that; I should think they get as much as 9s. or 10s. apiece.
The Christmas-boxes are generally, I believe, divided among themselves (among the boys);
but I cannot say rightly. It is spent in buying silk handkerchiefs, or Sunday shoes, I believe;
but I am not perfectly sure.”
Of the condition and lot of the operatives who were too big to go up chimneys, Mr. J. Fisher,
a master-sweeper, gave the following account:—“They get into a roving way, and go about
from one master to another, and they often come to no good end at last. They sometimes go
into the country, and after staying there some time, they come back again; I took a boy of
that sort very lately and kept him like my own, and let him go to school; he asked me one
Sunday to let him go to school, and I was glad to let him go, and I gave him leave; he
accordingly went, and I have seen nothing of him since; before he went he asked me if I
would let him come home to see my child buried; I told him to ask his school-master, but he
did not come back again. I cannot tell what has become of him; he was to have served me
for twelve months. I did not take him from the parish; he came to me. He said his parents
were dead. The effect of the roving habit of the large boys when they become too large to
climb, is, that they get one with another and learn bad habits from one another; they never
will stop long in any one place. They frequently go into the country and get various places;
perhaps they stop a month at each; some try to get masters themselves, and some will get
into bad company, which very often happens. Then they turn thieves, they get lazy, they
won’t work, and people do not like to employ them lest they should take anything out of their
houses. The generality of them never settle in any steady business. They generally turn loose
characters, and people will not employ them lest they should take anything out of the house.”
The criminal annals of the kingdom bear out the foregoing account. Some of these boys,
indeed, when they attained man’s estate, became, in a great measure, through their skill in
climbing, expert and enterprising burglars, breaking into places where few men would have
cared to venture. One of the most daring feats ever attempted and accomplished was the
escape from Newgate by a sweeper about 15 years ago. He climbed by the aid of his knees
and elbows a height of nearly 80 feet, though the walls, in the corner of the prison-yard,
where this was done, were nearly of an even surface; the slightest slip could not have failed
to have precipitated the sweeper to the bottom. He was then under sentence of death for
highway robbery.
“His name was Whitehead, and he done a more wonderfuller thing nor that,” remarked an
informant, who had been his master. “We was sweeping the bilers in a sugar-house, and he
went from the biler up the flue of the chimney, it was nearly as high as the Monument, that
chimney; I should say it was 30 or 40 feet higher nor the sugar-house. He got out at the top,
and slid down the bare brickwork on the outside, on to the roof of the house, got through an
attic window in the roof, and managed to get off without any one knowing what became of
him. That was the most wonderfullest thing I ever knowed in my life. I don’t know how he
escaped from being killed, but he was always an oudacious feller. It was nearly three months
after afore we found him in the country. I don’t know where they sent him to after he was
brought back to Newgate, but I hear they made him a turnkey in a prison somewhere, and
that he’s doing very well now.” The feat at the sugar-house could be only to escape from his
apprenticeship.
In the course of the whole Parliamentary evidence the sweepers, reared under the old
climbing system, are spoken of as a “short-lived” race, but no statistics could be given. Some
died old men in middle age, in the workhouses. Many were mere vagrants at the time of their
death.
I took the statement of a man who had been what he called a “climbing” in his childhood,
but as he is now a master-sweeper, and has indeed gone through all grades of the business,
I shall give it in my account of the present condition of the sweepers.
Climbing is still occasionally resorted to, especially when repairs are required, “but the
climbing boys,” I was told, “are now men.” These are slight dwarfish men, whose services are
often in considerable request, and cannot at all times be commanded, as there are only
about twenty of them in London, so effectually has climbing been suppressed. These little
men, I was told, did pretty well, not unfrequently getting 2s. or 2s. 6d. for a single job.
As regards the labour question, during the existence of the climbing boys, we find in the
Report the following results:—
The nominal wages to the journeymen were 2s. a week, with board and lodging. The
apprentices received no wages, their masters being only required to feed, lodge, and clothe
them.
The actual wages were the same as the nominal, with the addition of 1s. as perquisites in
money. There were other perquisites in liquor or broken meat.
In the Reports are no accounts of the duration of labour throughout the year, nor can I
obtain from master-sweepers, who were in the business during the old mode, any sufficient
data upon which to found any calculations. The employment, however, seems to have been
generally continuous, running through the year, though in the course of the twelvemonth one
master would have four and another six different journeymen, but only one at a time. The
vagrant propensities of the class is a means of accounting for this.
The nominal wages of those journeymen who resided in their own apartments were generally
14s. a week, and their actual about 2s. 6d. extra in the form of perquisites. Others resided
“on the premises,” having the care of the boys, with board and lodgings and 5s. a week in
money nominally, and 7s. 6d. actually, the perquisites being worth 2s. 6d.
Concerning the general or average wages of the whole trade, I can only present the following
computation.
Mr. Tooke, in his evidence before the House of Commons, stated that the Committee, of
which he was a member, had ascertained that one boy on an average swept about four
chimneys daily, at prices varying from 6d. to 1s. 6d., or a medium return of about 10d. per
chimney, exclusive of the soot, then worth 8d. or 9d. a bushel. “It appears,” he said, “from a
datum I have here, that those chimney-sweepers who keep six boys (the greatest number
allowed by law) gain, on an average, nearly 270l.; five boys, 225l.; four boys, 180l.; three
boys, 135l.; two boys, 90l.; and one boy 45l. (yearly), exclusive of the soot, which is, I
should suppose, upon an average, from half a bushel to a bushel every time the chimney is
swept.”
“Out of the profits you mention,” he was then asked, “the master has to maintain the
boys?”—“Yes,” was the answer, “and when the expenses of house and cellar rent, and the
wages of journeymen, and the maintenance of apprentices, are taken into the account, the
number of master chimney-sweepers is not only more than the trade will support, but
exceeds, by above one-third, what the public exigency requires. The Committee also
ascertained that the 200 master chimney-sweepers in the metropolis were supposed to have
in their employment 150 journeymen and 500 boys.”
The matter may be reduced to a tabular form, expressing the amount in money—for it is not
asserted that the masters generally gained on the charge for their journeymen’s board and
lodging—as follows:—
The society for the supersedence of the labour of climbing boys promoted the adoption of the
machines by all the means in their power, presenting the new instrument gratuitously to
several master sweepers who were too poor to purchase it. Experiments were made and duly
published as to the effectual manner in which the chimneys at Guildhall, the Mansion House,
the then new Custom House, Dulwich College, and in other public edifices, had been
cleansed by the machine. But these statements seem to have produced little effect. People
thought, perhaps, that the mechanical means which might very well cleanse the chimneys of
large public buildings—and it was said that the chimneys of the Custom House were built
with a view to the use of the machine—might not be so serviceable for the same purposes in
small private dwellings. Experiments continued to be made, often in the presence of
architects, of the more respectable sweepers, and of ladies and gentlemen who took a
philanthropic interest in the question, between the years 1803 and 1817, but with little
influence upon the general public, for in 1817 Mr. Smart supposed that there were but 50 or
60 machines in general use in the metropolis, and those, it appeared from the evidence of
several master sweepers, were used chiefly in gentlemen’s houses, many of those gentlemen
having to be authoritative with their servants, who, if not controlled, always preferred the
services of the climbing boys. Most servants had perquisites from the master sweepers, in the
largest and most profitable ways of business, and they seemed to fear the loss of those
perquisites if any change took place.
The opposition in Parliament, and in the general indifference of the people, to the efforts of
“the friends of the climbing boy” to supersede his painful labours by the use of machinery,
was formidable enough, but that of the servants appears to have been more formidable still.
Mr. Smart showed this in his explanations to the Committee. The whole result of his
experience was that servants set their faces against the introduction of the machine,
grumbling if there were not even the appearance of dirt on the furniture after its use. “The
first winter I went out with this machine,” said Mr. Smart, “I went to Mr. Burke’s in Token-
house Yard, who was a friend of mine, with a man to sweep the chimneys, and after waiting
above an hour in a cold morning, the housekeeper came down quite in a rage, that we
should presume to ring the bell or knock at the door; and when we got admittance, she
swore she wished the machine and the inventor at the devil; she did not know me. We swept
all the chimneys, and when we had done I asked her what objection she had to it now; she
said, a very serious one, that if there was a thing by which a servant could get any
emolument, some d——d invention was sure to take it away from them, for that she received
perquisites.”
This avowal of Mr. Burke’s housekeeper, as brusque as it was honest, is typical of the feelings
of the whole class of servants.
The opposition in Parliament, as I have intimated, continued. One noble lord informed the
House of Peers that he had been indisposed of late and had sought the aid of calomel, the
curative influence of which had pervaded every portion of his frame; and that it as far
surpassed the less searching powers of other medicines, as the brush of the climbing boy in
cleansing every nook and corner of the chimney, surpassed all the power of the machinery,
which left the soot unpurged from those nooks and corners.
The House of Commons, however, had expressed its conviction that as long as master
chimney-sweepers were permitted to employ climbing boys, the natural result of that
permission would be the continuance of those miseries which the Legislature had sought, but
which it had failed, to put an end to; and they therefore recommended that the use of
climbing boys should be prohibited altogether; and that the age at which the apprenticeship
should commence should be extended from eight to fourteen, putting this trade upon the
same footing as others which took apprentices at that age.
This resolution became law in 1829. The employment of climbing boys in any manner in the
interior of chimneys was prohibited under penalties of fine and imprisonment; and it was
enacted that the new measure should be carried into effect in three years, so giving the
master sweepers that period of time to complete their arrangements. During the course of
the experiments and inquiry, the sweepers, as a body, seem to have thrown no obstacles, or
very few and slight obstacles, in the way of the “Committee to promote the Superseding of
the Labour of Climbing Boys;” while the most respectable of the class, or the majority of the
respectable, aided the efforts of the Committee.
This manifestation of public feeling probably modified the opposition of the sweepers, and
unquestionably influenced the votes of members of Parliament. The change in the operations
of the chimney-sweeping business took place in 1832, as quietly and unnoticedly as if it were
no change at all.
The machine now in use differs little from that invented by Mr. Smart, the first introduced,
but lighter materials are now used in its manufacture. It has not been found necessary,
however, to complicate its use with the jack-chain and pulley, and bullet with a brush
attached, and the iron shutters or registers in the roof or cockloft, of which Mr. Tooke spoke.
The machine is formed of a series of hollow rods, made of a supple cane, bending and not
breaking in any sinuosity of the flues. This cane is made of the same material as gentlemen’s
walking-sticks. The first machines were made of wood, and were liable to be broken; and to
enable the sweeps on such occasions to recover the broken part, a strong line ran from
bottom to top through the centre of the sticks, which were bored for the purpose, and strung
on this cord. The cane machine, however, speedily and effectually superseded these
imperfect instruments; and there are now none of them to be met with. To the top tube of
the machine is attached the “brush,” called technically “the head,” of elastic whalebone
spikes, which “give” and bend, in accordance with the up or down motion communicated by
the man working the machine, so sweeping what was described to me as “both ways,” up
and down.
Some of these rods, which fit into one another by means of brass screws, are 4 feet 6 inches
long, and diminish in diameter to suit their adjustment. Some rods are but 3 feet 6 inches
long, and 4 feet is the full average length; while the average price at the machine maker’s is
2s. 6d. a rod, if bought separately. The head costs 10s., on an average, if bought separately.
It is seldom that a machine is required to number beyond 17 rods (extending 68 feet), and
the better class of sweepers are generally provided with 17 rods. The cost of the entire
machine, for every kind of chimney-work, when purchased new, as a whole, is, when of good
quality, from 30s. to 5l., according to the number of rods, duplicate rods, &c. Mr. Smart
stated, in 1817, that the average price of one of his machines was then 2l. 3s.
The sweepers who labour chiefly in the poorer localities—and several told me how indifferent
many people in those parts were as to their chimneys being swept at all—rarely use a
machine to extend beyond 40 feet, or one composed of 10 or 11 rods; but some of the
inferior class of sweepers buy of those in a superior way of trade worn machines, at from a
third to a half of the prime cost. These machines they trim up themselves. One portion of the
work, however, they cannot repair or renew—the broken or worn-out brass screws of the
rods, which they call the “ferules.” These, when new, are 1s. each. There were, when the
machine-work was novel, I was informed, street-artizans who went about repairing these
screws or ferules; but their work did not please the chimney-sweepers, and this street-trade
did not last above a year or two.
The rods of the machine, when carefully attended to, last a long time. One man told me that
he was still working some rods which he had worked since 1842 (nine years), with occasional
renewal of the ferules. The head is either injured or worn down in about two years; if not
well made at first, in a year. The diameter of this head or brush is, on the average, 18 inches.
One of my informants had himself swept a chimney of 80 feet, and one of his fellow-workers
had said that he once swept a chimney of 120 feet high; in both cases by means of the
machine. My informant, however, thought such a feat as the 120-feet sweep was hardly
possible, as only one man’s strength can be applied to the machine; and he was of opinion
that no man’s muscular powers would be sufficient to work a machine at a height of 120 feet.
The labour is sometimes very severe; “enough,” one strongly-built man told me, “to make
your arms, head, and heart ache.”
The old-fashioned chimneys are generally 12 by 14 inches in their dimensions in the interior;
and for the thorough sweeping of such chimneys—the opinion of all the sweepers I saw
according on the subject—a head (it is rarely called brush in the trade) of 18 inches diameter
is insufficient, yet they are seldom used larger. One intelligent master sweeper, speaking from
his own knowledge, told me that in the neighbourhood where he worked numbers of houses
had been built since the introduction of the machines, and the chimneys were only 9 inches
square, as regards the interior; the smaller flues are sometimes but 7. These 9-inch
chimneys, he told me, were frequent in “scamped” houses, houses got up at the lowest
possible rate by speculating builders. This was done because the brickwork of the chimneys
costs more than the other portions of the masonry, and so the smaller the dimensions of the
chimneys the less the cost of the edifice. The machines are sometimes as much crippled in
this circumscribed space as they are found of insufficient dimensions in the old-fashioned
chimneys; and so the “scamped” chimney, unless by a master having many “heads,” is not so
cleanly swept as it might be. Chimneys not built in this manner are now usually 9 inches by
14.
In cleansing a chimney with the machine the sweep stands by, or rather in, the fire-place,
having first attached a sort of curtain to the mantle to confine the soot to one spot, the
operator standing inside this curtain. He first introduces the “head,” attached to its proper
rod, into the chimney, “driving” it forward, then screws on the next rod, and so on, until the
head has been driven to the top of the chimney. The soot which has fallen upon the hearth,
within the curtain, is collected into a sack or sacks, and is carried away on the men’s backs,
and occasionally in carts. The whalebone spikes of the head are made to extend in every
direction, so that when it is moved no part of the chimney, if the surface be even, escapes
contact with these spikes, if the work be carefully done, as indeed it generally is; for the
cleaner the chimney is swept of course the greater amount of soot adds to the profit of the
sweeper. One man told me that he thought he had seen in some old big chimneys, a long
time unswept, more soot brought down by the machine than, under similar circumstances as
to the time the chimney had remained uncleansed, would have been done by the climbing
boy.
All the master sweepers I saw concurred in the opinion that the machine was not in all
respects so effective a sweeper as the climbing boy, as it does not reach the recesses, nooks,
crannies, or holes in the chimney, where the soot remains little disturbed by the present
process. This want is felt the most in the cleansing of the old-fashioned chimneys, especially
in the country.
Mr. Cook, in 1817, stated to the Committee that the cleansing of a chimney by a boy or by a
machine occupied the same space of time; but I find the general opinion of the sweepers
now to be that it is only the small and straight chimneys which can be swept with as great
celerity by a machine as by a climber; in all others the lad was quicker by about 5 minutes in
30, or in that proportion.
I heard sweepers represent that the passing of the Act of Parliament not only deprived them
in many instances of the unexpired term of a boy’s apprenticeship in his services as a climber,
but “threw open the business to any one.” The business, however, it seems, was always
“open to any one.” There was no art nor mystery in it, as regarded the functions of the
master; any one could send a boy up a chimney, and collect and carry away the soot he
brought down, quite as readily and far more easily than he can work a machine.
Nevertheless, men under the old system could hardly (and some say they were forbidden to)
embark in this trade unless they had been apprenticed to it; for they were at a loss how to
possess themselves of climbing boys, and how to make a connection. When the machines
were introduced, however, a good many persons who were able to “raise the price” of one
started in the line on their own account. These men have been called by the old hands
“leeks” or “green ’uns,” to distinguish them from the regularly-trained men, who pride
themselves not a little on the fact of their having served seven or eight years, “duly and
truly,” as they never fail to express it. This increase of fresh hands tended to lower the
earnings of the class; and some masters, who were described to me as formerly very
“comfortable,” and some, comparatively speaking, rich, were considerably reduced by it. The
number of “leeks” in 1832 I heard stated, with the exaggeration to which I have been
accustomed when uninformed men, ignorant of the relative value of numbers, have
expressed their opinions, as 1000!
The several classes in the chimney-sweeping trade may be arranged as follows:—
The Master Chimney-Sweepers, called sometimes “Governors” by the journeymen, are
divisible into three kinds:—
The “large” or “high masters,” who employ from 2 to 10 men and 2 boys, and keep
sometimes 2 horses and a cart, not particularly for the conveyance of the soot, but to go into
the country to a gentleman’s house to fulfil orders.
The “small” or “low masters,” who employ, on an average, two men, and sometimes but one
man and a boy, without either horse or cart.
The “single-handed master-men,” who employ neither men nor boys, but do all the work
themselves.
Of these three classes of masters there are two subdivisions.
The “leeks” or “green-uns,” that is to say, those who have not regularly served their time to
the trade.
The “knullers” or “queriers,” that is to say, those who solicit custom in an irregular manner, by
knocking at the doors of houses and such like.
Of the competition of capitalists in this trade there are, I am told, no instances. “We have our
own stations,” one master sweeper said, “and if I contract to sweep a genelman’s house,
here in Pancras, for 25s. a year, or 10s., or anythink, my nearest neighbour, as has men and
machines fit, is in Marrybun; and it wouldn’t pay to send his men a mile and a half, or on to
two mile, and work at what I can—let alone less. No, sir, I’ve known bisness nigh 20 year,
and there’s nothink in the way of that underworking. The poor creeturs as keeps theirselves
with a machine, and nothing to give them a lift beyond it, they’d undertake work at any
figure, but nobody employs or can trust to them, but on chance.” The contracts, I am told,
for a year’s chimney-sweeping in any mansion are on the same terms with one master as
with another.
As regards the Journeymen Chimney-Sweepers there are also three kinds:—
The “foreman” or “first journeyman” sweeper, who accompanies the men to their work,
superintends their labours, and receives the money, when paid immediately after sweeping.
The “journeyman” sweeper, whose duty it is to work the machine, and (where no under-
journeyman, or boy, is kept) to carry the machine and take home the soot.
The “under-journeyman” or “boy,” who has to carry the machine, take home the soot, and
work the machine up the lower-class flues.
There are, besides these, some 20 climbing men, who ascend such flues as the machines
cannot cleanse effectually, and, it must, I regret to say, be added, some 20 to 30 climbing
boys, mostly under eleven years of age, who are still used for the same purpose “on the sly.”
Many of the masters, indeed, lament the change to machine-sweeping, saying that their
children, who are now useless, would, in “the good old times,” have been worth a pound a
week to them. It is in the suburbs that these climbing children are mostly employed.
The hours of labour are from the earliest morning till about midday, and sometimes later.
There are no Houses of Call, trade societies, or regulations among these operatives, but there
are low public-houses to which they resort, and where they can always be heard of.
When a chimney-sweeper is out of work he merely inquires of others in the same line of
business, who, if they know of any one that wants a journeyman, direct their brother
sweeper to call and see the master; but though the chimney-sweepers have no trade
societies, some of the better class belong to sick, and others to burial, funds. The lower class
of sweepers, however, seem to have no resource in sickness, or in their utmost need, but the
parish. There are sweepers, I am told, in every workhouse in London.
There are three modes of payment common among the sweepers:—
1, in money;
2, partly in money and partly in kind; and
3, by perquisites.
The great majority of the masters pay the men they employ from 2s. to 3s., and a few 4s.
and 6s. per week, together with their board and lodging. It may seem that 3s. per week is a
small sum, but it was remarked to me that there are few working men who, after supporting
themselves, are able to save that sum weekly, while the sweepers have many perquisites of
one sort or other, which sometimes bring them in 1s., 2s., 3s., 4s., and occasionally 5s. or
6s., a week additional—a sufficient sum to pay for clothes and washing. The journeymen,
when lodged in the house of the master, are single men, and if constantly employed might,
perhaps, do well, but they are often unemployed, especially in the summer, when there are
not so many fires kept burning. As soon as one of them gets married, or what among them is
synonymous, “takes up with a woman,” which they commonly do when they are able to
purchase some sort of a machine, they set up for themselves, and thus a great number of
the men get to be masters on their own account, without being able to employ any extra
hands. These are generally reckoned among the “knullers;” they do but little business at first,
for the masters long established in a neighbourhood, who are known to the people, and have
some standing, are almost always preferred to those who are strangers or mere beginners.
It was very common, but perhaps more common in country towns than in London, for the
journeymen, as well as apprentices, in this and many other trades to live at the master’s
table. But the board and lodging supplied, in lieu of money-wages, to the journeymen
sweepers, seems to be one of the few existing instances of such a practice in London. Among
slop-working tailors and shoemakers, some unfortunate workmen are boarded and lodged by
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.
ebookname.com