Created
October 31, 2009 14:49
-
-
Save commana/223098 to your computer and use it in GitHub Desktop.
eStudy Conventions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Example extends SuperExample implements I0, I1, I2 { | |
const MY_TRUE = 1; | |
private $a = 0; | |
public function foo($a, $b) { | |
for ($i = 0; $i < 10; $i++) {} | |
switch ($a) { | |
case 0: | |
$Other->doFoo(); | |
break; | |
default: | |
$Other->doBaz(); | |
} | |
} | |
private function bar($v) { | |
for ($i = 0; $i < 10; ++$i) { | |
$v->add($i); | |
} | |
} | |
private function strike() { | |
$a = 4; | |
foo(); | |
bar($x, $y); | |
if (true) { | |
return 1; | |
} else if (true) { | |
return 3; | |
} else { | |
return 2; | |
} | |
try { | |
echo $b; | |
} catch (Exception $e) { | |
echo "Fehler."; | |
} | |
while ($a) | |
; | |
} | |
protected function calc(array $array) { | |
foreach ($array as $key => $value) { | |
MyClass::foo($key, $value); | |
} | |
$a = -4 + -9; | |
$b = $a++ / --$number; | |
$c += 4; | |
$value = true && false; | |
$s = (string) $object; | |
$a = $condition ? TRUE : FALSE; | |
list($a, $b) = array(1, 2, 3); | |
$array = array(1 => 2, 2 => 3); | |
$array[$i]->foo(); | |
$array[] = 'first cell'; | |
} | |
private function oneLiners() { | |
do {} while (true); | |
try {} catch (Exception $e) {} | |
for (;;) {} | |
} | |
} | |
// Kein PHP-Tag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment