<?php foreach ((new ReflectionClass('\DateTime'))->getMethods() as $method) { if ($method->getName() == 'modify') { $returnType = $method->getTentativeReturnType(); if ($returnType instanceof ReflectionUnionType) { foreach ($returnType->getTypes() as $type) { var_dump($type->getName()); } } } }
You have javascript disabled. You will not be able to edit any code.