PHP Beyond the web (The Book - Single copy)
PHP Beyond the web
Shell scripts, desktop software, system daemons and more ... without learning a new language
About the Book
PHP is no longer just a great scripting language for websites, it's now a powerful general-purpose programming language. Expand your use of PHP into your back-end systems, server software, data processing services, desktop interfaces and more.
This book will show you how to take your knowledge of PHP development for the web and utilise it with a much wider range of software systems. Learn how to create :
- Interactive shell scripts
- System daemons
- Desktop software
- Network servers
and more. We also cover related topics including :
- Performance
- Deployment
- Licensing
- System interaction
as well as covering software tools for development and outlining other great sources of technical information and help.
NEW CONTENT : Learn the basics of interfacing with electronics using PHP & the Raspberry Pi.
Enjoy the benefits of doing all of the above in PHP :
- Save money by redeploying existing skills, not learning new ones
- Save time and increase productivity by using a high-level language
- Make money by providing your clients a full-stack service (not just web sites)
I've just finished reading the book and I can say it's one of the best PHP books I've ever read.
- Chris Piechowicz, Zend Certified Engineer (@ChrisPiechowicz)
After years of preaching how easy and powerful PHP can be as a general purpose programming language, I finally found a resource that packs all the facts!
- Jefferson González, maintainer of the wxPHP project (wxphp.org)
This book will introduce you to the tools, techniques and background necessary to program just about anything you can think of, using the PHP you already know. It will also take you through some of the tools used by serious software developers and engineers, and introduce further sources of information and online resources that will help you get serious about developing real software in PHP.
- Read it completely risk-free with the 45 day money back guarantee
- All three formats (PDF, EPUB, MOBI) are included in the price
- No DRM nonsense. Easily read it on all of your devices, when you want.
Jump down to the full list of contents or have a browse through the book sample to see all of the topics covered in the book; from the CLI-SAPI to GUI toolkits, PHP performance to software installers.
If you still have any questions before you buy, e-mail author@phpbeyondtheweb.com (for questions about the content) or hello@leanpub.com (for questions about buying the book & customer service).
Table of Contents
-
Welcome
- About the author
- Acknowledgements
-
1. Introduction
- 1.1 “Use PHP? We’re not building a website, you know!”.
- 1.2 Are you new to PHP?
- 1.3 Reader prerequisites. Or, what this book isn’t
- 1.4 An important note for Windows and Mac users
- 1.5 About the sample code
- 1.6 External resources
- 1.7 English. The Real English.
-
2. Getting away from the Web - the basics
- 2.1 PHP without a web server
- 2.2 PHP versions - what’s yours?
- 2.3 A few good reasons NOT to do it in PHP
- 2.4 Thinking about security
-
3. Understanding the CLI SAPI, and why you need to
- 3.1 What’s different about the CLI SAPI?
- 3.2 CLI SAPI installation
- 3.3 PHP command line options
- 3.4 Command line arguments for your script
-
3.5 The many ways to call PHP scripts
- 3.5.1 From a file
- 3.5.2 From a string
- 3.5.3 From STDIN :
- 3.5.4 As a self executing script : Unix/Linux
- 3.5.5 As a self executing script : Windows
- 3.5.6 Windows php-win.exe
-
3.6 “Click to Run” your PHP
- 3.6.1 Clickable icons : Linux
- 3.6.2 Clickable icons : Windows
- 3.6.3 Clickable icons : Ubuntu Unity
- 3.7 Quitting your script
-
4. Development tools
- 4.1 PHP REPLs
- 4.2 Build systems
- 4.3 Continuous Integration
- 4.4 Debuggers
- 4.5 Testing and Unit Testing
- 4.6 Static code analysis
- 4.7 Virtual development & testing environments
- 4.8 Source/version control systems & code repositories
- 4.9 IDEs and editors
- 4.10 Documentation generators
- 4.11 Profilers
- 4.12 Other tools
-
5. User facing software
- 5.1 Command line interface basics
- 5.2 Advanced command line input
- 5.3 Using STDIN, STOUT & STDERR
- 5.4 Partial GUI elements - dialogs
- 5.5 Dialogs invoked from the shell
- 5.6 Windows dialogs
- 5.7 Static HTML output
- 5.8 Complete graphical interfaces (GUIs)
- 5.9 Understanding GUI and event-based programming
- 5.10 wxPHP
- 5.11 PHP-GTK
- 5.12 Local web server & browser
- 5.13 PHP’s Built-in testing server
- 5.14 Web sockets & browser
- 5.15 SiteFusion
- 5.16 Winbinder
- 5.17 Adobe AIR
- 5.18 NW.js (formerly node-webkit)
- 5.19 Atom Shell
- 5.20 Titanium
- 5.21 PHP-Qt
- 5.22 PHP/TK
-
6. System software
- 6.1 Daemons in PHP
- 6.2 Creating a daemon
- 6.3 Network daemons using libevent
-
6.4 File monitoring daemons using inotify
- 6.4.1 Using the inotify PECL extension
-
6.4.2 Using the
inotifywait
command - 6.4.3 Inotify limits
- 6.5 Task dispatch & management systems
- 6.6 Gearman and PHP
- 6.7 Other task dispatch systems
-
7. Interacting with other software
- 7.1 Starting external processes from PHP, or “shelling out”
- 7.2 Talking to other processes
- 7.3 Semaphores
- 7.4 Shared Memory
- 7.5 PHP message queues
- 7.6 Third party message queues
- 7.7 APC cached variables
- 7.8 Virtual files - tmpfs
- 7.9 Standard streams
- 7.10 Linux signals
- 7.11 Task dispatch & management systems
-
8. Talking to the system
- 8.1 Filesystem interactions
- 8.2 Data files & formats
- 8.3 Dealing with large files
- 8.4 Understanding filesystem interactions
- 8.5 The PHP file status and realpath caches
- 8.6 Working with cross platform & remote filesystems
- 8.7 Accessing the Windows Registry
-
8.8 Linux signals
- 8.8.1 Sending Signals
- 8.9 Linux timed-event signals
- 8.10 Printing (to paper)
- 8.11 Audio
- 8.12 Databases - no change here
- 8.13 Other hardware and system interactions
- 8.14 Raspberry Pi : PHP and the RP
- 8.15 Raspberry Pi : The basics of tri-state logic
- 8.16 Raspberry Pi : Accessing the GPIO ports from PHP
- 8.17 Raspberry Pi : Using the rest of the hardware
- 8.18 Raspberry Pi : Further resources
-
9. Performance & stability - profiling and improving
- 9.1 The background on performance
- 9.2 Specific issues for general purpose programming
- 9.3 Profile, profile, profile!
- 9.4 Manual profiling
- 9.5 Profiling tools
- 9.6 Low level profiling
- 9.7 Profiling - the likely results
- 9.8 Silver bullets
- 9.9 Silver bullet #1 - Better hardware
- 9.10 Silver bullet #2 - Newer PHP versions
- 9.11 Silver bullet #3 - Opcode caching
- 9.12 Silver bullet #4 - Compiling
- 9.13 Silver bullet #5 - JIT compilers and alternative Virtual Machines
- 9.14 The SPL - Standard PHP Library
- 9.15 Garbage collection
- 9.16 Multi-threading and concurrent programming in PHP
- 9.17 Big data and PHP - MapReduce
- 9.18 Data caching
- 9.19 Know thy functions
- 9.20 Outsourcing code to other languages
- 9.21 Other performance tips and tricks
- 9.22 Stability and performance of long running processes
- 9.23 Avoid micro and premature optimisations
-
10. Distribution and deployment issues
- 10.1 Error handling and logging
- 10.2 Installers and bundling files
- 10.3 Embedded data files at the end of a PHP script
- 10.4 Phar executable bundles
- 10.5 Generic installers
- 10.6 Controlling the (PHP) environment
- 10.7 Extending your application with plug-ins
- 10.8 Documentation
- 10.9 Licensing & legal
- 10.10 Deploying frameworks
-
11. Where now? or, Thanks & feedback
- 11.1 Giving feedback, and getting help and support
- 11.2 Are you reading a “pirated” copy?
-
Appendix A : Compiling and installing PHP and its extensions
- Compiling and installing PHP itself
- Compiling and installing (extra) core extensions
- Installing multiple versions of PHP
- PEAR and PECL
- Composer
- Symfony2 bundles
-
Appendix B : File & data format libraries for PHP
- Office documents
- Compression, archiving & encryption
- Graphics
- Audio
- Multimedia & video
- Programming, technical and data interchange
- Misc
-
Appendix C : Sources of help
- The PHP manual
- Official mailing lists
- Stack Overflow
- Other books
- Newsgroups
- PHP Subredit
- PHP on Github
- PHP news sites
-
Appendix D : Interesting libraries, tools, articles and projects
- Alternative programming styles
- Machine learning, artificial intelligence and data analysis
- Databases
- Natural language
- Graphics and imaging
- Unicode
- Audio
- Event driven PHP
- PHP internals
- Website/service APIs
- Security related
- Javascript
- Servers
- Programming
- Financial
- Hardware
-
Appendix E : Integrated Development Environments for PHP
- Opensource
- Commercial
The Leanpub 60-day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Do Well. Do Good.
Authors have earned$11,721,492writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Top Books
Recipes for Decoupling
Matthias NobackWrite software that survives
CQRS by Example
Carlos Buenosvinos, Christian Soronellas, and Keyvan Akbary- Leverage your Software Architecture skills by learning everything about CQRS in detail with lots of examples
- Develop faster applications by applying CQRS and fostering Read Models and Projections
- Learn how to apply CQRS into a brownfield project from a pragmatic approach
OpenIntro Statistics
David Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntroA complete foundation for Statistics, also serving as a foundation for Data Science.
Leanpub revenue supports OpenIntro (US-based nonprofit) so we can provide free desk copies to teachers interested in using OpenIntro Statistics in the classroom and expand the project to support free textbooks in other subjects.
More resources: openintro.org.
Maîtriser Apache JMeter
Philippe Mouawad, Bruno Demion (Milamber), and Antonio Gomes RodriguesToute la puissance d'Apache JMeter expliquée par ses commiteurs et utilisateurs experts. De l'intégration continue en passant par le Cloud, vous découvrirez comment intégrer JMeter à vos processus "Agile" et Devops.
If you're looking for the newer english version of this book, go to Master JMeter : From load testing to DevOps
C++20 - The Complete Guide
Nicolai M. JosuttisAll new language and library features of C++20 (for those who know previous C++ versions).
The book presents all new language and library features of C++20. Learn how this impacts day-to-day programming, to benefit in practice, to combine new features, and to avoid all new traps.
Buy early, pay less, free updates.
Other books:
Jetpack Compose internals
Jorge CastilloJetpack Compose is the future of Android UI. Master how it works internally and become a more efficient developer with it. You'll also find it valuable if you are not an Android dev. This book provides all the details to understand how the Compose compiler & runtime work, and how to create a client library using them.
Ansible for DevOps
Jeff GeerlingAnsible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
Mastering STM32 - Second Edition
Carmine NovielloWith more than 1200 microcontrollers, STM32 is probably the most complete ARM Cortex-M platform on the market. This book aims to be the most complete guide around introducing the reader to this exciting MCU portfolio from ST Microelectronics and its official CubeHAL and STM32CubeIDE development environment.
Rector - The Power of Automated Refactoring
Matthias Noback and Tomas VotrubaLearn how to automatically and continuously upgrade and improve your PHP code base
The Hundred-Page Machine Learning Book
Andriy BurkovEverything you really need to know in Machine Learning in a hundred pages.
Top Bundles
- #2
CCIE Service Provider Ultimate Study Bundle
2 Books
Piotr Jablonski, Lukasz Bromirski, and Nick Russo have joined forces to deliver the only CCIE Service Provider training resource you'll ever need. This bundle contains a detailed and challenging collection of workbook labs, plus an extensively detailed technical reference guide. All of us have earned the CCIE Service Provider certification... - #3
Pattern-Oriented Memory Forensics and Malware Detection
2 Books
This training bundle for security engineers and researchers, malware and memory forensics analysts includes two accelerated training courses for Windows memory dump analysis using WinDbg. It is also useful for technical support and escalation engineers who analyze memory dumps from complex software environments and need to check for possible... - #4
Software Architecture
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #5
Static Analysis and Automated Refactoring
2 Books
As PHP developers we are living in the "Age of Static Analysis". We can use a tool like PHPStan to learn about potential bugs before we ship our code to production, and we can enforce our team's programming standards using custom PHPStan rules. Recipes for Decoupling by Matthias Noback teaches you in great detail how to do this, while also... - #9
All the Books of The Medical Futurist
6 Books
We put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy, digital health investments and how technology giants such as Amazon...