Practical PHP Programming:Alternative PHP uses
From IpbWiki
As you probably know, PHP is a recursive acronym for "PHP: Hypertext Preprocessor", so why should a product designed for the web ever stray from its original goal? Quite simple, because PHP is cool, and if I could use PHP to do everything, I'd certainly give it a try, if only for the challenge!
In this chapter we're going to be looking at other uses you can put PHP to in order to extend its usefulness. One key thing to remember is that you can use what you have learnt so far wherever else you use PHP, but you will find as you read on that there is a lot of specific information to absorb about individual uses.
Hopefully this chapter will inspire you to try to transfer your PHP skills to other areas - it is a big world out there!
The topics covered in this chapter are:
- How to use PHP to write shell scripts
- How the CLI SAPI differs from "normal" PHP
- Interacting with the dialog program to create command-line user interfaces
- Using GTK+ to create graphical user interfaces
- Using Glade to automatically generate GTK+ GUIs
- Making text-based games with PHP
- Making graphical games with PHP and SDL
- Creating your own miniature language with PHP
Chapter contents
- 20.1. Practical_PHP_Programming:What else can be done with PHP?
- 20.2. Practical_PHP_Programming:Command-line scripting
- 20.2.1. Practical_PHP_Programming:Command-line scripting
- 20.2.2. Practical_PHP_Programming:CLI SAPI differences
- 20.2.3. Practical_PHP_Programming:Your first CLI script
- 20.2.4. Practical_PHP_Programming:Advanced command-line parsing
- 20.2.5. Practical_PHP_Programming:Mixing PHP with other shell commands
- 20.2.6. Practical_PHP_Programming:Working with the CLI input and output streams
- 20.2.7. Practical_PHP_Programming:Sending code direct to PHP
- 20.2.8. Practical_PHP_Programming:Creating command-line GUIs with PHP
- 20.3. Practical_PHP_Programming:Graphical user interfaces
- 20.3.1. Practical_PHP_Programming:GUI toolkits
- 20.3.2. Practical_PHP_Programming:A basic GUI
- 20.3.3. Practical_PHP_Programming:Creating multiple windows
- 20.3.4. Practical_PHP_Programming:Handling popup menus
- 20.3.5. Practical_PHP_Programming:Advanced GUIs
- 20.3.6. Practical_PHP_Programming:Using custom parameters for signal handlers
- 20.3.7. Practical_PHP_Programming:GUI themes
- 20.3.8. Practical_PHP_Programming:Distributing your PHP-GTK apps
- 20.4. Practical_PHP_Programming:Making games
- 20.4.1. Practical_PHP_Programming:Text-based world planning
- 20.4.2. Practical_PHP_Programming:Text game v1
- 20.4.3. Practical_PHP_Programming:Making graphical games
- 20.4.4. Practical_PHP_Programming:Getting PHP SDL to work
- 20.4.5. Practical_PHP_Programming:First steps with PHP SDL
- 20.4.6. Practical_PHP_Programming:Moving our sprite
- 20.4.7. Practical_PHP_Programming:Clearing the screen
- 20.4.8. Practical_PHP_Programming:Last tweaks for our graphical game
- 20.5. Practical_PHP_Programming:Making your own language
- 20.5.1. Practical_PHP_Programming:Why make your own language?
- 20.5.2. Practical_PHP_Programming:The elements of a compiler
- 20.5.3. Practical_PHP_Programming:Analysis
- 20.5.4. Practical_PHP_Programming:Output
- 20.5.5. Practical_PHP_Programming:How the language will work
- 20.5.6. Practical_PHP_Programming:How to parse text into tokens
- 20.5.7. Practical_PHP_Programming:What is a token?
- 20.5.8. Practical_PHP_Programming:How parsing works
- 20.5.9. Practical_PHP_Programming:Execution
- 20.5.10. Practical_PHP_Programming:If you've made it this far...
- 20.5.11. Practical_PHP_Programming:Operator precedence
- 20.5.12. Practical_PHP_Programming:The finished compiler
- 20.5.13. Practical_PHP_Programming:Things to try for your own compiler
Next: Practical_PHP_Programming:What else can be done with PHP?
