<?php
namespace TestA\TestB\TestC;
spl_autoload_register(function ($class) {
$path = str_replace('\\__', '\\..', $class);
// Затем используем realpath(), чтобы добраться до нужного файла...
});
$class = new __\__\TestClass();
try{
try {
// Doing all the work
} catch (PDOException $e) {
if ($e->getCode() === '23000') {
$this->response->addError('this title already exists');
} else {
throw $e;
}
}
}catch (Exception $e) {
$this->response->addError('the critical error has occurred, unable to save entry');
$this->logger->writeThrowable($th);
$this->response->post = $this->request->getPost();
$this->showAdd();
return;
}
try {
try {
throw new Exception('hello world');
} catch (Exception $e) {
throw $e;
} finally {
echo " i work ";
}
echo ' not work ';
}catch(Exception $e){
}
$starter = new Starter();
$starter->prepare();
$this->iniConfig();
$this->rewriteHeaders();
$from = $request->getParameter('time_from', '00:00:00', 'filter_time');
$to = $request->getParameter('time_to', '23:59:59', 'filter_time');
$tasks = $tasks_model->getTasksByRange($from, $to);
set @curday := DAYNAME(CURDATE());
SELECT id, name, `time`, description FROM daily
WHERE
day = @curday
or day = 'all'
or (@curday in ('Sunday','Saturday') and day = 'weekend' )
or (@curday not in ('Sunday','Saturday') and day = 'workday' )