KN
Size: a a a
KN
k
try {
$result = fn();
} catch (Throwable) {
// не удалось
}
[$result, $error] = fn();
if ($error) {
return [null, $error]
}
val result, ^ = fn()
try {
$this->tryThis();
} catch (YouShouldDoThisInstead $e) {
$this->doThis();
} catch (OrYouShouldDoThat $e) {
$this->doThat();
}
SP
MM
АС
AC
k
АГ
try {
$result = fn();
} catch (Throwable) {
// не удалось
}
[$result, $error] = fn();
if ($error) {
return [null, $error]
}
val result, ^ = fn()
try {
$this->tryThis();
} catch (YouShouldDoThisInstead $e) {
$this->doThis();
} catch (OrYouShouldDoThat $e) {
$this->doThat();
}
АГ
MM
SP
function whatShouldGoNext() {
if($this->firstThingCompleted) {
throw new GoToSecondStep();
}
throw new GoToFirstStep();
}
АС
AC
KN
function whatShouldGoNext() {
if($this->firstThingCompleted) {
throw new GoToSecondStep();
}
throw new GoToFirstStep();
}
SP
function whatShouldGoNext() {
if($this->firstThingCompleted) {
throw new GoToSecondStep();
}
throw new GoToFirstStep();
}
АГ
АС
SP
KN