Don’t miss it—Apress Access is only $99 for the holiday season! Subscribe now >>

Typed PHP

Stronger Types For Cleaner Code

Authors: Pitt, Christopher

Download source code
  • One-of-a-kind book on typed PHP, which is not covered elsewhere 
  • The author is an expert web developer, PHP programmer and writer
  • Solves a lot of common gripes about PHP
see more benefits

Buy this book

eBook 16,99 €
price for Spain (gross)
  • ISBN 978-1-4842-2114-3
  • Digitally watermarked, DRM-free
  • Included format: PDF, EPUB
  • ebooks can be used on all reading devices
  • Immediate eBook download after purchase
Softcover 23,91 €
price for Spain (gross)
  • ISBN 978-1-4842-2113-6
  • Free shipping for individuals worldwide
  • Usually dispatched within 3 to 5 business days.
  • The final prices may differ from the prices shown due to specifics of VAT rules
About this book

Discover how stronger types mean cleaner, more efficient, and optimized PHP applications. This unique book looks at typed PHP: PHP types, strings, regular expressions, and more from PHP 7 as found in standard PHP libraries, user libraries, extensions, and cross-compilers. You'll see how to create a set of reusable tools that unify and ease the scalar types of PHP.

PHP has a rich history and a dominant place on the web. It has achieved much despite language inconsistencies and difficulties. Bjarne Stroustrup once said: "There are only two kinds of languages: the ones people complain about and the ones nobody uses".

PHP is one of those languages that everybody uses, yet that's often seen as a good reason to ignore the bad parts and just get stuff done. We're all for getting stuff done, and to that end, the author has used Plain Ol' PHP for many years. It's always bugged him how procedural PHP is, in an ecosystem of OOP libraries and frameworks. So he decided to take a deeper look at building a stronger type system on top of PHP. That's the goal of this book.

What You'll Learn
  • Discover the fundamentals of PHP strings, regex, underscores, native function inconsistencies, and more
  • Examine the structure of PHP types including boxing, regex, namespace functions, composer autoload, null problem, optional values, and more
  • Work with extensions like vagrant + phansible, provisioning, vagrant commands, SPL types, scalar objects, zephir, and more
  • Design using scalar, SPL, zephir, structure types, resolving types, chaining, combining number types, PHPUnit, packaging, and more
  • Plan for the future using a case study example
Who This Book Is For
Experienced web developers and PHP programmers.

About the authors

Christopher Pitt is an expert web developer, PHP programmer/coder and writer, working at SilverStripe. He usually works on application architecture, though sometimes you'll find him building compilers or robots.

Table of contents (5 chapters)

Buy this book

eBook 16,99 €
price for Spain (gross)
  • ISBN 978-1-4842-2114-3
  • Digitally watermarked, DRM-free
  • Included format: PDF, EPUB
  • ebooks can be used on all reading devices
  • Immediate eBook download after purchase
Softcover 23,91 €
price for Spain (gross)
  • ISBN 978-1-4842-2113-6
  • Free shipping for individuals worldwide
  • Usually dispatched within 3 to 5 business days.
  • The final prices may differ from the prices shown due to specifics of VAT rules

Services for this book

Loading...

Bibliographic Information

Bibliographic Information
Book Title
Typed PHP
Book Subtitle
Stronger Types For Cleaner Code
Authors
Copyright
2016
Publisher
Apress
Copyright Holder
Christopher Pitt
Distribution Rights
Standard Apress distribution
eBook ISBN
978-1-4842-2114-3
DOI
10.1007/978-1-4842-2114-3
Softcover ISBN
978-1-4842-2113-6
Edition Number
1
Number of Pages
XVIII, 76
Number of Illustrations
1 b/w illustrations, 7 illustrations in colour
Topics