Skip to content

Instantly share code, notes, and snippets.

@Emmathem
Created December 1, 2017 16:27
Show Gist options
  • Save Emmathem/eaabf083e2f613af7ad5b37dcbb8cbd5 to your computer and use it in GitHub Desktop.
Save Emmathem/eaabf083e2f613af7ad5b37dcbb8cbd5 to your computer and use it in GitHub Desktop.
task_a-no-coding
What is PEAR in PHP?
PHP Extension and Application Repository is a framework and application repo that contain reusuable PHP components. Is
a component that contain all sort of PHP library and code snippet
DIFFERENCE BETWEEN ECHO AND PRINT
Both ECHO and PRINT in PHP are used to output result
ECHO does not return a value, and can take many parameters(depending on PHP -v);
PRINT return value of 1 that why it's suitable to use while outputing an expression, it can only accept one argument
DIFFERENCE BETWEEN SESSION AND COOKIE
Session stores a value of the activeness of user on the server as long as the server is on
While Cookie stores the user's value on the user browser a specific period of time.
INCLUDE AND INCLUDE_ONCE; REQUIRE AND REQUIRE_ONCE
Both are used to include a file on a page but the execution procedure or process differs, INCLUDE and INCLUDE_ONCE does not stop the
execution of a particular but REQUIRE and REQUIRE_ONCE does, and it mostly used to initialize a DB connection. When REQUIRE or REQUIRE_ONCE
can not find either the path, or the name of the file to be required, it throws a FATAL ERROR causing the program to stop executing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment