[ create a new paste ] login | about

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

PHP, pasted on Feb 2:
<?php
$who = 'ben';
$there = 'csb';
$a = 'benilde';
echo "$who was in $there {$a}";

print "\ni went to the store.";
print "\nthe sauce cost \P10.25";
$cost ='$10.25';
print "\nthe sauce cost $cost";
print "\nthe sauce cost \P\061\060.\x32\x35";

//heredoc(print long strings)
print <<< end
\ndont forget there will be a quiz on blah blah.
study well and i', sure you'll pass blah blah.
end;

echo "\nfirst ", "second ", "third\n";

//array
$b = array('name' => 'fred', 'age' => 35, 'wife' => 'wilma');
print_r($b);

print ucfirst("how do you do\n");
print ucwords("the prince\n");
?>


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
ben was in csb benilde
i went to the store.
the sauce cost \P10.25
the sauce cost $10.25
the sauce cost \P10.25
dont forget there will be a quiz on blah blah.
study well and i', sure you'll pass blah blah.
first second third
Array
(
    [name] => fred
    [age] => 35
    [wife] => wilma
)
How do you do
The Prince


Create a new paste based on this one


Comments: