Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
10 Cards in this Set
- Front
- Back
php |
asfasdfasdfa |
|
define |
-function -used to define a constant at runtime - bool define ( string $name , mixed $value [, bool $case_insensitive = false ] ) -name- name of the constant -value - value of the constant(can also be arrayin php 7) -case_insensitive- false by default , if set false case of name and value will not be checked |
|
version_compare |
- Compares two "PHP-standardized" version number strings -mixed version_compare ( string $version1 , string $version2 [, string $operator ] ) -returns -1 if the first version is lower than the second, 0 if they are equal, and 1 if the second is lower. |
|
date_default_timezone_set |
-Sets the default timezone used by all date/time functions in a script bool date_default_timezone_set ( string $timezone_identifier ) |
|
use |
- |
|
require_once |
The require_once statement is identical to require except PHP will check if the file has already been included, and if so, not include (require) it again. |
|
new |
keyword To create an instance of a class, the new keyword must be used. $instance = new SimpleClass(); |
|
fopen() fclose() |
-fopen is used to open a file sntx- $variable=fopen("filename",mode) -mode can be r(ro,beg),r(rw,beg),w(wo,clear,new file),w+(rw,clear,new file),a(append,eof,new file),a+(ar,eof,new file),x(wo,new file,false if not exist),x+(rw,new file, false if not exist) -fclose to close file -eg $x=fopen("file.txt","a+") or exit("cant open"); $fclose($x); |
|
feof() fgets() fgetc() |
-feof() ->returns true if eof is reached -fgets()->returns a line from file,after call file pointer moves to next line -fgetc()->returns character from file, after call file -eg-> while(!feof($x)) {echo fgets($x);} |
|
cookie setcookie() setrawcookie() $_COOKIE isset() |
-cookie is a small file which server embeds on used pc to identify user ,whenever user request a page the cookie is also send with the request to the server ->setcookie()-used to set cookie, must be before <html> tag stx-setcookie(name,value,expire,path,domain) eg- setcookie("user","harsh",time()+60*60*24) this cookie is set for a day ->setcookie URLencodes cookie ,while setrawcookie() does not ->$_COOKIE is pre defined global variable used to retrieve cookie value- echo $_COOKIE["user"] ->isset()- returns true if the cookie is set isset($_COOKIE["user"]); ->cookie deleted after expiry |