Skip to content

Instantly share code, notes, and snippets.

@Shaked
Last active October 26, 2015 22:43
Show Gist options
  • Save Shaked/9c319768a046737c5ea6 to your computer and use it in GitHub Desktop.
Save Shaked/9c319768a046737c5ea6 to your computer and use it in GitHub Desktop.
<?php
//example 1
$string = 'a' .
'b' .
'c' .
'd';
//example 2
$string = "a" .
"b" .
"c" .
"d";
//example 3
$a = $b .
$c .
$d;
$a =
$b .
$c .
$d;
function a() {
$a =
$b .
$c .
$d;
}
$a =
$b =
$c .
$d;
$a = function($b) {
for ($a;$b;$c) {
doSomething();
}
$a = $b.
$c.
$d;
};
if ($x = 1) {
great();
}
$string = 'a' . 'b';
$string = 'a' .
'b' .
'c' .
'd';
$x = ($x = $a);
$x = ($x = $a);
$x = (
$x = $a
);
$x = $x = $a = $b;
$x = ($x = $a = $b);
if (
$x = 1
) {
great();
}
if (
$x = 1
) {
great();
}
$string =
'a' .
'b' .
'c' .
'd';
$x = 1;
$string = [
"x" => [
"t" => "1" . $x,
],
];
if ($x == 1) {
$string = 'a' .
'b' .
'c' .
'd';
if ($x = 1) {
doSomething();
}
doSomething($a = 1);
}
while ($row = $percent->fetchObject()) {
$answers[] = $row;
}
class Test {
public function abc($x) {
if (1 == $x) {
echo "${abc}";
}
}
}
Event::trigger("this",
function() {
while ($row = $percent->fetchObject()) {
$answers[] = $row;
}
}
);
echo '' .
implode(
",\n",
array_map(
function ($k, $v) {
return '`' . $k . '` = ' . $db->quote($v);
}, array_keys($row), $row
)
)
. '';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment