PHP Beyond the web

PHP Beyond the web

Rob Aley
This is a sample of the book's content.Buy on Leanpub

Table of Contents

PHP Beyond the web

  • 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.
    • 1.8 PHP without a web server
    • 1.9 PHP versions - what’s yours?
    • 1.10 A few good reasons NOT to do it in PHP
    • 1.11 Thinking about security
  • 2. Understanding the CLI SAPI, and why you need to
    • 2.1 What’s different about the CLI SAPI?
    • 2.2 CLI SAPI installation
    • 2.3 PHP command line options
    • 2.4 Command line arguments for your script
    • 2.5 The many ways to call PHP scripts
    • 2.5.1 From a file
    • 2.5.2 From a string
    • 2.5.3 From STDIN :
    • 2.5.4 As a self executing script : Unix/Linux
    • 2.5.5 As a self executing script : Windows
    • 2.5.6 Windows php-win.exe
    • 2.6 “Click to Run” your PHP
    • 2.6.1 Clickable icons : Linux
    • 2.6.2 Clickable icons : Windows
    • 2.6.3 Clickable icons : Ubuntu Unity
    • 2.7 Quitting your script
  • 3. Development tools
    • 3.1 PHP REPLs
    • 3.2 Build systems
    • 3.3 Continuous Integration
    • 3.4 Debuggers
    • 3.5 Testing and Unit Testing
    • 3.6 Static code analysis
    • 3.7 Virtual development & testing environments
    • 3.8 Source/version control systems & code repositories
    • 3.9 IDEs and editors
    • 3.10 Documentation generators
    • 3.11 Profilers
    • 3.12 Other tools
  • 4. User facing software
    • 4.1 Command line interface basics
    • 4.2 Advanced command line input
    • 4.3 Using STDIN, STOUT & STDERR
    • 4.4 Partial GUI elements - dialogs
    • 4.5 Dialogs invoked from the shell
    • 4.6 Windows dialogs
    • 4.7 Static HTML output
    • 4.8 Complete graphical interfaces (GUIs)
    • 4.9 Understanding GUI and event-based programming
    • 4.10 wxPHP
    • 4.11 PHP-GTK
    • 4.12 Local web server & browser
    • 4.13 PHP’s Built-in testing server
    • 4.14 Web sockets & browser
    • 4.15 SiteFusion
    • 4.16 Winbinder
    • 4.17 Adobe AIR
    • 4.18 NW.js (formerly node-webkit)
    • 4.19 Atom Shell
    • 4.20 Titanium
    • 4.21 PHP-Qt
    • 4.22 PHP/TK
  • 5. System software
    • 5.1 Daemons in PHP
    • 5.2 Creating a daemon
    • 5.3 Network daemons using libevent
    • 5.4 File monitoring daemons using inotify
    • 5.4.1 Using the inotify PECL extension
    • 5.4.2 Using the inotifywait command
    • 5.4.3 Inotify limits
    • 5.5 Task dispatch & management systems
    • 5.6 Gearman and PHP
    • 5.7 Other task dispatch systems
  • 6. Interacting with other software
    • 6.1 Starting external processes from PHP, or “shelling out”
    • 6.2 Talking to other processes
    • 6.3 Semaphores
    • 6.4 Shared Memory
    • 6.5 PHP message queues
    • 6.6 Third party message queues
    • 6.7 APC cached variables
    • 6.8 Virtual files - tmpfs
    • 6.9 Standard streams
    • 6.10 Linux signals
    • 6.11 Task dispatch & management systems
  • 7. Talking to the system
    • 7.1 Filesystem interactions
    • 7.2 Data files & formats
    • 7.3 Dealing with large files
    • 7.4 Understanding filesystem interactions
    • 7.5 The PHP file status and realpath caches
    • 7.6 Working with cross platform & remote filesystems
    • 7.7 Accessing the Windows Registry
    • 7.8 Linux signals
    • 7.8.1 Sending Signals
    • 7.9 Linux timed-event signals
    • 7.10 Printing (to paper)
    • 7.11 Audio
    • 7.12 Databases - no change here
    • 7.13 Other hardware and system interactions
    • 7.14 Raspberry Pi : PHP and the RP
    • 7.15 Raspberry Pi : The basics of tri-state logic
    • 7.16 Raspberry Pi : Accessing the GPIO ports from PHP
    • 7.17 Raspberry Pi : Using the rest of the hardware
    • 7.18 Raspberry Pi : Further resources
  • 8. Performance & stability - profiling and improving
    • 8.1 The background on performance
    • 8.2 Specific issues for general purpose programming
    • 8.3 Profile, profile, profile!
    • 8.4 Manual profiling
    • 8.5 Profiling tools
    • 8.6 Low level profiling
    • 8.7 Profiling - the likely results
    • 8.8 Silver bullets
    • 8.9 Silver bullet #1 - Better hardware
    • 8.10 Silver bullet #2 - Newer PHP versions
    • 8.11 Silver bullet #3 - Opcode caching
    • 8.12 Silver bullet #4 - Compiling
    • 8.13 Silver bullet #5 - JIT compilers and alternative Virtual Machines
    • 8.14 The SPL - Standard PHP Library
    • 8.15 Garbage collection
    • 8.16 Multi-threading and concurrent programming in PHP
    • 8.17 Big data and PHP - MapReduce
    • 8.18 Data caching
    • 8.19 Know thy functions
    • 8.20 Outsourcing code to other languages
    • 8.21 Other performance tips and tricks
    • 8.22 Stability and performance of long running processes
    • 8.23 Avoid micro and premature optimisations
  • 9. Distribution and deployment issues
    • 9.1 Error handling and logging
    • 9.2 Installers and bundling files
    • 9.3 Embedded data files at the end of a PHP script
    • 9.4 Phar executable bundles
    • 9.5 Generic installers
    • 9.6 Controlling the (PHP) environment
    • 9.7 Extending your application with plug-ins
    • 9.8 Documentation
    • 9.9 Licensing & legal
    • 9.10 Deploying frameworks
  • 10. Where now? or, Thanks & feedback
    • 10.1 Giving feedback, and getting help and support
    • 10.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
PHP Beyond the web/overview

PHP Beyond the web

course_overview

Learn how to write CLI scripts, desktop software, network servers and more using the PHP you already know.

count_chapters
begin_reading
download
p_implied_book_part_name

PHP Beyond the web16 chapters

Begin ›
  1. Welcome

  2. 1. Introduction

  3. 2. Understanding the CLI SAPI, and why you need to

  4. 3. Development tools

  5. 4. User facing software

  6. 5. System software

  7. 6. Interacting with other software

  8. 7. Talking to the system

  9. 8. Performance & stability - profiling and improving

  10. 9. Distribution and deployment issues

  11. 10. Where now? or, Thanks & feedback

  12. Appendix A : Compiling and installing PHP and its extensions

  13. Appendix B : File & data format libraries for PHP

  14. Appendix C : Sources of help

  15. Appendix D : Interesting libraries, tools, articles and projects

  16. Appendix E : Integrated Development Environments for PHP