1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
|
<div>
<a data="x"
data="cdcd" <?php // comment ?>
titi=2>hello world</a>
<a data="x"
<?php if ($x): ?>
data="x"
<?php endif; ?>
titi="2">hello world</a>
</div>
<span class="d">toto</span>
<div>
<?php
if ($test == 5 &&
$test2 == 7) {
print("hello");
}
?>
<!-- test folding -->
</div>
<div>
<?php
$x = is_xy() ?
123 :
456;
?>
</div>
<div>
<?php
if ($x) {
$y = 2;
}
if ($x)
echo $x;
else
echo $x;
$this->setHeaders();
$meth = $wgRequest->getMethod();
switch ($meth) {
case "GET":
$this->methodGETs();
break;
case "POST":
$this->methodPOST();
break;
default:
$this->renderNothing();
}
if ( empty($id) ||
empty($name) ) {
$this->renderNothing( "organisation_name" );
return;
}
$res = $dbr->select('qrclient_organisations',
array('organisation_name'),
array('organisation_id' => $id,
1 => 2));
$questions = $this->query(
"SELECT post.id, title, " . self::$query_vote .
", question, date, " . $this->vote_query
);
?>
</div>
<div>
<script>
func(x,
hello()
,z,
y);
var a= 47,
b = 48,
c = 49
, x;
var a= 47
, b = 48
, c = 49
;
var a = require('titi')
, b = 48
, c = 49;
var x = "scd" +
"sxqsx" +
toto
+ "xs";
func("scd" +
"sxqsx" +
toto
+ "xs");
return "scd" +
"sxqsx" +
toto
+ "xs";
var x = aaa.bbb().ccc.
ddd
.eee();
x = z ?
1 :
2;
x = z
? 10
: 20;
fun(100 ||
200
|| 300);
x = 1 + 2+
3
+ 4;
</script>
<?php
func($aaa,
$bbb,
$ccc
, $ddd) {
}
$a->b($x->y()
->z("aaa" . "bbb"
. "ccc"))
->c();
$aa->f1()->f2()
->f2();
return $aa->f1()->f2()
->f2();
$a->x = $b->y
->z . "aaa"
. "bbbb";
?>
</div>
<div>
<?php
return "aa"
. $xx .
'dc';
echo('normal'
.'hello'
.'world' // 'hello' and 'world' lines are well indented
.afunction('misaligned') // as if the ')' was not taken into
.'hello' // account
.'world'
.another('misaligned' // Same context as lines before,
.'hello' // but without the ')' :
.'world') // same behaviour
.'and so on');
?>
</div>
related issues: #293
<div>
<!-- <?php if ($x): ?> -->
<!-- <?php endif; ?> -->
</div>
<div>
<?php
/*
* lorem lorem lorem lorem
* ipsum
*/
?>
</div>
<ul>
<li><?=$x?></li>
<li></li>
</ul>
<?php
function hello() {
print("world");
}
|