Help for this page

Select Code to Download


  1. or download this
    $var = 'foo';
    $foo = 'bar';
    print $var;  # Will print "foo"
    print $$var; # Will print "bar"
    
  2. or download this
    $foo = 'foo';
    print "$food";   # Will print nothing (no scalar $food is defined)
    print "${foo}d"; # Will print 'food' as expected