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.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.
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) and EPUB (for phones, tablets and 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