>>5
He has already been helped so for him not to understand it still must mean he is a troll or a bloody idiot.
Name:
Anonymous2008-06-03 18:48
HAHAHAHA
YOU THINK YOURE THOUGH UH ?
I HAVE ONE WORD FOR YOU
THE FORCED INDENTATION OF THE CODE
GET IT ?
I DONT THINK SO
YOU DONT KNOW ABOUT MY OTHER CAR I GUESS ?
ITS A CDR
AND IS PRONOUNCED ``CUDDER''
OK YOU FUQIN ANGERED AN EXPERT PROGRAMMER
THIS IS /prog/
YOU ARE ALLOWED TO POST HERE ONLY IF YOU HAVE ACHIEVED SATORI
PROGRAMMING IS ALL ABOUT ``ABSTRACT BULLSHITE'' THAT YOU WILL NEVER COMPREHEND
I HAVE READ SICP
IF ITS NOT DONE YOU HAVE TO
TOO BAD RUBY ON RAILS IS SLOW AS FUCK
BBCODE AND ((SCHEME)) ARE THE ULTIMATE LANGUAGES
ALSO
WELCOME TO /prog/
EVERY THREAD WILL BE REPLIED TO
NO EXCEPTIONS
This was an example of advanced escaping (according to php).
It's just hard to wrap my head around what exactly the php-engine is doing. For me, there's two ways of looking at this:
(1) PHP reads through the entire file, reassembles the fragmented code, and then interprets it. So the example would reassembled into <?php if ($expression) {} else {} ?>. Afterwards, anything between the appropriate curly braces would be outputted.
(2) PHP reads and evaluates in parts. It reads/evaluates if($expression) and if it's true it then tries to go into the block { but hits the closing tag ?> and pauses, outputting everything until the opening tag <?php and ending with }. But it must read the else statement and the { and then pause again for the closing tag ?>. Normally it would output anything beyond this tag, but it doesn't. Why? How does it know to prevent the HTML code from being output in this case. If this were C, it would be a matter of whether to jump to a block of code or not. But with broken code, it can't know what the block is unless it's read through the entire file as in (1). This is why here we assume it reads through everything sequentially and evaluates only what's necessary. Is that even possible to do?
I guess it stores the HTML code in order. Which means there is another option.
(3) It must make an entire php file out of the combination as follows
if ($expression) { echo "whatever was here in the file" }
else { echo "whatever was here in the file" }
Thats all I can think of.
Name:
Anonymous2008-06-03 21:11
First, Use The Source Luke.
Second, PHP fails and ultimately everything gets converted to a string to be EVALd.
>>19
Because you blurted something out that you don't understand
and you're puzzled by this.
Name:
Anonymous2008-06-05 6:33
>>1
Anything wrapped in <?php and ?> is considered by the PHP interpreter to be code. Anything outside that is regarded as data that may be sent back to the web browser.
So, the program you posted is equivalent to:
<?php
if ($expression) {
print("<strong>This is true.</strong>");
} else {
print("<strong>This is false.</strong>");
}
?>
(Actually that will differ slightly in the whitespace output, but it's functionally the same when the HTML is interpreted by the browser.)
Name:
Anonymous2008-06-05 14:27
>>21
Anything wrapped in <?php and ?> is considered harmful.
#!/usr/bin/php -q
<?php
$faggots = array("!","~","@","#","$","%","^","&","*","(",")");
$x = intval($argv[1]);
while ($x>0) {
echo " I AM A HUGE FAGGOT PLEASE RAPE MY FACE";
while (rand(1,7)>1) {
$DURR = $faggots[rand(0,11)];
echo $DURR.$DURR.$DURR;}
$x--;
}
?>
Name:
Anonymous2008-06-08 18:32
>>42
I AM A HUGE FAGGOT PLEASE RAPE MY FACE@@@^^^(((~~~!!!***%%%@@@ I AM A HUGE FAGGOT PLEASE RAPE MY FACE^^^(((^^^
Name:
Anonymous2008-06-08 18:52
Why would anyone secretly issue ps x | grep firefox on my laptop while I was taking a leak? =/
Name:
*scnr*2008-06-08 18:56
asdasda
Name:
ANOTHER QUESTION2008-06-08 20:52
I'm having some trouble understanding the meaning of visibility.
<?php
class foobar {
private $key1 = "cat";
private $key2 = "apple";
protected $key3 = "book";
public $key4 = 42;
}
$obj = new foobar();
// Trying to print the keys results in a PHP fatal error
echo $obj->$key1;
// Trying to make a copy of the keys results in a PHP fatal error
$a = $obj->$key1;
// However, the following works fine
$a = (array) $obj;
print_r( $a );
array_values( $a );
foreach( $a as $val )
echo "$val\n";
$b = $a[0];
?>
What is the point of the errors, or visibility for that matter, if the results can be
accomplished just as easily in
some other fashion.
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy