All posts by Pramod T P

What is PEAR in PHP

PEAR is short for “PHP Extension and Application Repository” and a framework and repository for reusable PHP components. .  Stig S. Bakken founded the PEAR project in 1999 to promote the re-use of code that performs common functions.The purpose of PEAR is to provide:

  • A structured library of open-source code for PHP users
  • A system for code distribution and package maintenance
  • A standard style for code written in PHP
  • PEAR’s mission is to provide reusable components, lead innovation in PHP, provide best practices for PHP development and educate developers.
  • Offers a command-line interface that can be used to automatically install “packages”.

PHP echo and print Statements

echo() and print() are language constructs in PHP, both are used to output strings. echo is marginally faster than print.

echo() can take multiple expressions whereas print cannot take multiple expressions.

Print return true or false based on success or failure whereas echo doesn’t return true or false.