- BASICS
- Quotes
- Constants
- Control Structures
- Reference
- Number Systems
- VARIABLES
- Definition
- Variable Variable
- Exists
- Type Casting
- OPERATORS
- Aritmetic
- Bitwise
- String
-
Comparison
- Logical
- FUNCTION
- Definition
- Anonymous
- Reference
- Variable Arguments
- ARRAY
- Basics
- Operations
- Create
- Search
- Modify
- Sort
- Storage
- STRING
- String Basics
- String Compare
- String Search
- String Replace
- String Format
- String Regexp
- String Parse
- Formating
- Json
- STREAMS
- File Open
- Read File
- Read Csv
- File Contents
- Context
- Ob_start
- OOP
- Object Instantiation
- Class Constructor
- Interfaces, Abstract
- Resource Visibility
- Class Constants
- Namespaces
- HTTP
- Headers
- File Uploads
- Cookies
- Sessions
Identity
True if only operands are of the same data type and the same value.
/**
* Identical operator
*/
$x1 = 'xn--google.com';
$x2 = 'google.com';
var_dump(stripos($x1, 'xn--') === 0); // true - Correct
var_dump(stripos($x2, 'xn--') == 0); // true - Incorrect
Questions and answers
stripos('ab', 'a') === 0
- a) TRUE
- b) FALSE, strings are not equal
stripos('bc', 'a') == 0
- a) TRUE
- b) FALSE, strings are not equal
Which one return a parse error?
- a) if (10 = $a) {}
- b) if (10 == $a) {}
Which returns true?
- a) 'apple' > 'Apple'
- b) 'Apple' > 'apple'
What's the ASCII values of "a" and "A"?
- a) 97 and 65
- b) 65 and 97