Answer the question
In order to leave comments, you need to log in
Why doesn't PHP pass a condition that returns 1 (TRUE)?
The result of the work
">>>>> {\"Id\":10,\"owner\":6,\"text\":\"mnogo_texta\",\"date\":\"2015-12-01 13:04:58\",\"status\":1,\"reply_to\":9,\"views\":0}
<<<<<< !!_!_!(((((1)))))_!__!_!
>>>>> [{\"Id\":14,\"owner\":5,\"text\":\"\mnogo_texta\",\"date\":\"2015-12-01
13:07:58\",\"status\":1,\"reply_to\":9,\"views\":0},{\"Id\":17,\"owner\":4,\"text\":\mnogo_texta\",\"date\":\"2015-12-01
14:12:58\",\"status\":1,\"reply_to\":9,\"views\":0}] <<<<<<
function surfPost(array $post) {
$c = '';
for ($i = 0, $j = 0, $keys = array_keys($post); $given = @$post[$keys[$j]], $i <= count($given); $i++) {
$c .= '>>>>> ' . json_encode(@$given) . ' <<<<<< ';
if (@$given[$i] && ($given = $given[$i]) || $j++ && !($i = 0)) {
$j = $j - 1;
$c .= '>>>>> ' . @$given['Id'] . ' <<<<<< ';
break;
} else {
$c .= (@$given[$i] && ($given = $given[$i]) || $j++ && !($i = 0)) ? '!!_!_!(((((' . 1 . ')))))_!__!_!' : '!!_!_!(((((' . 0 . ')))))_!__!_!';
}
}
return $c;
}
Answer the question
In order to leave comments, you need to log in
Who wrote this nonsense?
What is this:
Should do?
PS
Ok, the problem is clear. Stop writing such crooked code, then there will be no such problems.
Let's look carefully here:
<?php
$j = 0;
if ($j++) {
echo 1;
} else {
echo "Else:", $j;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question