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
Authors have earned$10,052,337writing, 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
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
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
C++ Best Practices
Jason TurnerLevel up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
Digital-First Events
Joep Piscaer and Jana BorutaThe only resource you will ever need to launch your digital events program.
Algebra-Driven Design
Sandy MaguireA how-to field guide on building leak-free abstractions and algebraically designing real-world applications.
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.
R Programming for Data Science
Roger D. PengThis book brings the fundamentals of R programming to you, using the same material developed as part of the industry-leading Johns Hopkins Data Science Specialization. The skills taught in this book will lay the foundation for you to begin your journey learning data science. Printed copies of this book are available through Lulu.
Continuous Delivery Pipelines
Dave FarleyThis practical handbook provides a step-by-step guide for you to get the best continuous delivery pipeline for your software.
Cloud Strategy
Gregor Hohpe“Strategy is the difference between making a wish and making it come true.” A successful migration to the cloud can transform your organization, but it shouldn’t be driven by wishes. This book tells you how to develop a sound strategy guided by frameworks and decision models without being overly abstract nor getting lost in product details.
node-opcua by example
Etienne RossignonGet the best out of node-opcua through a set of documented examples by the author himself that will allow you to create stunning OPCUA Servers or Clients.
Technical leadership and the balance with agility
Simon BrownA developer-friendly, practical and pragmatic guide to lightweight software architecture, technical leadership and the balance with agility.
Everyday Rails - RSpecによるRailsテスト入門
Junichi Ito (伊藤淳一), AKIMOTO Toshiharu, 魚振江, and Aaron SumnerRSpecを使ってRailsアプリケーションに信頼性の高いテストを書く実践的なアドバイスを提供します。詳細で丁寧な説明は本書のオリジナルコンテンツです。また、説明には実際に動かせるサンプルアプリケーションも使用します。本書は2017年版にアップデートされ、RSpec 3.6やRails 5.1といった新しい環境に対応しています!さあ、自信をもってテストできるようになりましょう!
Top Bundles
- #1
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
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... - #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
Modern C++ by Nicolai Josuttis
2 Books
- #4
Django for Beginners/APIs/Professionals
3 Books
- #5
Modern Management Made Easy
3 Books
Read all three Modern Management Made Easy books. Learn to manage yourself, lead and serve others, and lead the organization. - #6
Cisco CCNA 200-301 Complet
4 Books
Ce lot comprend les quatre volumes du guide préparation à l'examen de certification Cisco CCNA 200-301. - #7
Mastering Containers
2 Books
Docker and Kubernetes are taking the world by storm! These books will get you up-to-speed fast! Docker Deep Dive is over 400 pages long, and covers all objectives on the Docker Certified Associate exam.The Kubernetes Book includes everything you need to get up and running with Kubernetes! - #8
The Python Craftsman
3 Books
The Python Craftsman series comprises The Python Apprentice, The Python Journeyman, and The Python Master. The first book is primarily suitable for for programmers with some experience of programming in another language. If you don't have any experience with programming this book may be a bit daunting. You'll be learning not just a programming... - #9
CCDE Practical Studies (All labs)
3 Books
CCDE lab - #10
Linux Administration Complet
4 Books
Ce lot comprend les quatre volumes du Guide Linux Administration :Linux Administration, Volume 1, Administration fondamentale : Guide pratique de préparation aux examens de certification LPIC 1, Linux Essentials, RHCSA et LFCS. Administration fondamentale. Introduction à Linux. Le Shell. Traitement du texte. Arborescence de fichiers. Sécurité...