<?php declare(strict_types = 1); if (! class_exists('undefined')) { class undefined {} } if (! defined('undefined')) { define('undefined', new undefined()); } class X { function foo( SomeType|undefined $object = undefined, bool|undefined $option = undefined, ) { return match($object) { undefined => new DefaultBehavior(), default => $object->someMethod() }; } }
You have javascript disabled. You will not be able to edit any code.