[ create a new paste ] login | about

Link: http://codepad.org/wFUJBDsc    [ raw code | output | fork ]

PHP, pasted on Mar 15:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

$a = 'string 1';
$b = 'string 1';

${$a} = $b;

if (${$b})
    echo "1. They match\n";

//test #2

$a = 'string 1';
$b = 'string 0';

${$a} = $b;

if (${$b})
    echo "2. They match\n";


Output:
1
1. They match


Create a new paste based on this one


Comments: