PHP
PHP [1] is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
ASP
When you are looking for the PHP equivalents to ASP, ther are several sites giving solutions:
- PHP Everywhere PHP Equivalents for ASP Objects. The site has references to other language comparison such as JavaScript and VBScript and Class Syntax.
Mac OSX
The location of php.ini is in /private/etc. If it is not there then
sudo cp /private/etc/php.ini.default /private/etc/php.ini
Pear
Pear is the installation tool for PHP. To install pear please note that:
- Environment variable for PHP are available:
- PHP_BIN: Should be the full path tp PHP.exe, i.e. f:\wamp\bin\php\php5.3.0\php.exe
- Use the go-pear.phar, and be aware to go to the directory containing this file.
- Keep notice of the changes in the environment for pear.
See also:
- Pear.php.net, Installation manual.
Mac Pear
From: http://stackoverflow.com/questions/8333279/phpunit-warning-requirephpunit-autoload-php-failed-to-open-stream-no-such
I hit a similar issue on MAC OSX Lion.
I installed phpunit with the PEAR package manager, and when I try to run it I got the error as described by udo.
I was able to resolve it with the following simple steps:
- Get the latest php archive of pear
curl http://pear.php.net/go-pear.phar > go-pear.php
- Install the archive with
sudo php -q go-pear.php
During installation, it detects if the include_path in your php.ini does not contain the PEAR PHP directory.
You can choose to let it fix it for you automatically when given the option.
Comments
By Howard Lo
Cool thanks, I'd like to add something, after these steps I had to install phpunit again using the following commands:
sudo pear channel-discover pear.phpunit.de sudo pear channel-discover components.ez.no sudo pear channel-discover pear.symfony-project.com sudo pear install phpunit/PHPUnit
Sebastian Perez Feb 16 at 15:43
Mac Pear Alternative
On Mac OS 10.4 and earlier, the PEAR Package Manager is already installed in /usr/bin/pear.
To install your version of pear, get the latest version of pear into a writeable directory:
cd /Downloads curl http://pear.php.net/go-pear.phar > go-pear.php
To make it easier got to the directory here to install. For example:
cd /usr/local/bin php -d detect_unicode=0 /Downloads/go-pear.phar
Add the directories to the path in your .profile.
# Add some more custom software to PATH. PATH=/usr/local/pear/bin:$PATH export PATH
PHPUnit
PHPUnit is equivalent to JUnit. To install PHPUnit with pear use the commands:
- pear config-set auto_discover 1
- pear install pear.phpunit.de/PHPUnit
See also:
- phpunit.de, homepage of PHPUnit.
W3 Schools
The W3 Schools has a specific site for PHP. Nice to learn the language and also a reference how to use the language.
WAMP
WAMP stands for Windows Apache Mysql and PHP. It is often use because it is the most simple implementation of a web-server (Apache), a Database (MySQL) and a programming language (PHP) on the windows environment.
- Howto upgrade: WAMP.
Smarty
Smarty [2] is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. This implies that PHP code is application logic, and is separated from the presentation.
The Smarty design is based on the philosophy:
- clean separation of presentation from application code
- PHP backend, Smarty template frontend
- compliment PHP, not replace it
- fast development/deployment for programmers and designers
- quick and easy to maintain
- syntax easy to understand, no PHP knowledge required
- flexibility for custom development
- security: insulation from PHP
- free, open source
See also
- PHP.net, The PHP Site. Containing downloads, references and manuals.
- PHP English Manual by: Mehdi Achour, Friedhelm Betz, Antony Dovgal, Nuno Lopes, Hannes Magnusson, Georg Richter,Damien Seguy, Jakub Vrana and several others.
- PHP Language Reference with example code.
- PHP Control Structures, The if, else, while, do things...
- PEAR
- PHPLens PHP Everywhere.
- PHP2Net Tutorials
- phpunit.de, PHPUnit testing by Sebastian Bergman. An implementation of JUnit texting for PHP.
- PHP GTK, PHP-GTK [3] is a PHP extension that implements language bindings for GTK+. It provides an object-oriented interface to GTK+ classes and functions and greatly simplifies writing client side cross-platform GUI applications.
- WAMP, Apple OSX Apache Webserver and Windows Apache Webserver, or Apache, MySQL and PHP.
- Sonar, Quality management, metrics, static and dynamic software analysis, now also available for PHP.
Reference
- ↑ PHP.net The official PHP Website. The quote is from this website.
- ↑ Smarty Home Page, A template library for PHP.
- ↑ GTK+ (GIMP Toolkit) is a cross-platform widget toolkit for creating graphical user interfaces.