- Php
- 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
- Basics
- Compare
- Search
- Replace
- Format
- Regexp
- 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
Variable variables
Variables whose names do not follow naming constraints.
/**
* It is possible to create variables whose names ...
* do not follow the naming constraints.
*
* Variable variables are a very powerful tool, ...
* and should be used with extreme care.
*
* Their improper use can lead to some significant security issues.
*/
$name = '123';
$$name = '456';
echo $$name; // 456
echo ${'123'}; // 456
$debug = false; // Look Here
$_POST = array('debug' => 1);
extract($_POST);
var_dump($debug == true); // true - Security issue