try {
throw new \Exception('exception1');
} catch (\Exception $e1) {
try {
throw new \Exception('exception2', 0, $e1);
} catch (\Exception $e2) {
throw new \Exception('exception3', 0, $e2);
}
}
public static function getSubscribedEvents()
{
return [
KernelEvents::EXCEPTION => 'onKernelException',
];
}
public function onKernelException(GetResponseForExceptionEvent $event)
{
dump($event->getException());
}
foreach ($this->file as $k => $v) {
foreach ($this->file as $k => $v) {
echo "$k - $v - ";
var_dump($this->file[$k]);
}
if ($this->file = $v) {
}
Strings containing valid decimal integers, unless the number is preceded by a + sign, will be cast to the integer type. E.g. the key "8" will actually be stored under 8. On the other hand "08" will not be cast, as it isn't a valid decimal integer.
Чем это
сложнее этого?
PS У вас валидатор одноразовый, за раз больше одного раза не использовать