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 :
- 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 firstname.lastname@example.org (for questions about the content) or email@example.com (for questions about buying the book & customer service).
- About the author
- 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
- 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
- Symfony2 bundles
Appendix B : File & data format libraries for PHP
- Office documents
- Compression, archiving & encryption
- Multimedia & video
- Programming, technical and data interchange
Appendix C : Sources of help
- The PHP manual
- Official mailing lists
- Stack Overflow
- Other books
- 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
- Natural language
- Graphics and imaging
- Event driven PHP
- PHP internals
- Website/service APIs
- Security related
Appendix E : Integrated Development Environments for PHP
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.
El Manual del ManagerKeyvan Akbary, Félix López, and Álvaro Salazar
¿Has deseado alguna vez el haber tenido una buena introducción al rol del Engineering Manager? En este libro aprenderás lo necesario para ejercer el rol de una manera efectiva: Expectativas y Responsabilidades del Rol, 1-1s, Ayudar a Crecer, Objetivos, Planes de Carrera, Cultura, Feedback, Contratación, Cultura de Producto y mucho más.
Functional Design and ArchitectureAlexander Granin
Software Design in Functional Programming, Design Patterns and Practices, Methodologies and Application Architectures. How to build real software in Haskell with less efforts and low risks. The first complete source of knowledge.
Ansible for KubernetesJeff Geerling
Ansible is a powerful infrastructure automation tool. Kubernetes is a powerful application deployment platform. Learn how to use these tools to automate massively-scalable, highly-available infrastructure.
Ansible for DevOpsJeff Geerling
Ansible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
Practical FP in Scala: A hands-on approachGabriel Volpe
A practical book aimed for those familiar with functional programming in Scala who are yet not confident about architecting an application from scratch.
Together, we will develop a purely functional application using the best libraries in the Cats ecosystem, while learning about design patterns and best practices.
Tame your Work FlowSteve Tendon and Daniel Doiron
Do you need a high performance enterprise governance approach improving management, execution and delivery while dealing with multiple projects/products, events, stakeholders and teams? Giving you better bottom line results, faster time to market, less work, better predictability, happier employees, and delighted clients? Then learn about TameFlow!
C++ Best PracticesJason Turner
Level up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
Cloud StrategyGregor Hohpe
“Strategy is the difference between making a wish and making it come true.” A successful migration to the cloud shouldn’t be driven by wishes, but guided by a sound strategy, frameworks, and decision models. This book tells you how—without becoming superficial nor getting lost in technology and product details.
Machine Learning EngineeringAndriy Burkov
"If you intend to use machine learning to solve business problems at scale, I'm delighted you got your hands on this book."
—Cassie Kozyrkov, Chief Decision Scientist at Google
"Foundational work about the reality of building machine learning models in production."
—Karolis Urbonas, Head of Machine Learning and Science at Amazon
Composing SoftwareEric Elliott
All software design is composition: the act of breaking complex problems down into smaller problems and composing those solutions. Most developers have a limited understanding of compositional techniques. It's time for that to change.
11 BooksThe Quality Software Bundle is for managers, would-be managers, and any of us who find themselves being managed and confused. This comprehensive bundle covers the entire span of software development approaches, from hacking through waterfall, cascade, prototyping, Iterative enhancement, reusable code, off-the-shelf, to Agile teams. The bundle...
The Node.js Bundle
3 BooksThis bundle combines three bestselling Leanpub Node.js books into a package that gives you everything you need to get started with developing Node.js applications at an unbeatable price.
The Tester's Library
8 BooksThe Tester's Library consists of eight five-star books that every software tester should read and re-read. As bound books, this collection would cost over $200. Even as e-books, their price would exceed $80, but in this bundle, their cost is only $49.99. Here are the books, and why they should be in your library: Perfect Software and Other...
11 BooksIn this bundle, you will find 10 different agile books. They are about different aspects of being agile. - finding a job - doing coding dojo's - Retrospectives - Personal kanban - a non-typical coaching book and even a book that gives you an insight in the lives of some agile people.
WTFlop 6M + HU - Beta Bundle
Marionette.js A to Z
Complete Scala Bundle
3 BooksScala is a general-purpose programming language and it's getting extremely popular these days. Some say that learning Scala could be a challenging task. My experience, however, suggests that this is actually a myth that has very little to do with reality. With the right approach, learning Scala can be easy, fun and rewarding.The first book from...
Build A Better Backbone App
3 BooksThe best way to learn new development skills is through experience, but that takes time you don't have.Get the best of both worlds with this bundle: you'll learn how to produce modern web applications by learning from experienced developers like Derick Bailey and David Sulc. BackboneJS is one of the favorite tools on the web today, but it...
People Skills—Soft but Difficult
7 BooksPerhaps you've been told that "lack of people skills" has been holding you back. No wonder: you may have had hundreds of hours of technical training, but little or no "people skills" guidance.You've heard it said that people skills are "soft," whereas technical skills are "hard." For you, though, technical skills are "easy," but people skills...
SurviveJS - Webpack + React
2 BooksGet both SurviveJS - Webpack and SurviveJS - React for a single price!