3v4l.org

run code in 300+ PHP versions simultaneously
<?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()); } } } }
Output for git.master, git.master_jit
Output for rfc.property-hooks
string(8) "DateTime" string(5) "false"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
47.95 ms | 406 KiB | 5 Q