Time\Duration::__construct

(PHP 8 >= 8.6.0)

Time\Duration::__construct — Private constructor to disallow direct instantiation

Descrizione

private function Time\Duration::__construct()

This private constructor prevents Time\Duration objects from being created with new. Use one of the factory methods instead, which make the unit of the given value explicit: Time\Duration::fromSeconds(), Time\Duration::fromNanoseconds(), Time\Duration::fromMicroseconds(), Time\Duration::fromMilliseconds(), Time\Duration::fromMinutes(), Time\Duration::fromHours(), or Time\Duration::fromIso8601DurationString().

Elenco dei parametri

Questa funzione non contiene parametri.

Errori/Eccezioni

Attempting to instantiate the class with new throws an Error.

Vedere anche:

+add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top