1--TEST-- 2DateTimeImmutable::modify() with invalid format 3--FILE-- 4<?php 5 6$datetime = new DateTimeImmutable; 7try { 8 var_dump($datetime->modify('')); 9} catch (DateMalformedStringException $e) { 10 echo $e::class, ': ', $e->getMessage(), "\n"; 11} 12 13?> 14--EXPECTF-- 15DateMalformedStringException: DateTimeImmutable::modify(): Failed to parse time string () at position 0 ( ): Empty string 16