PHP » GoLang |
login |
register |
about
|
GoLang DateTime::__construct
request it (519)
GoLang replacement for PHP's DateTime::__construct
[edit | history]
DateTime::__constructdate_create(PHP 5 >= 5.2.0, PHP 7) DateTime::__construct -- date_create — Returns new DateTime object DescriptionObject oriented style Procedural style Returns new DateTime object. Parameters
Return Values
Returns a new DateTime instance.
Procedural style returns Errors/ExceptionsEmits Exception in case of an error. Changelog
ExamplesExample #1 DateTime::__construct() example Object oriented style
<?php Procedural style
<?php The above examples will output: 2000-01-01 Example #2 Intricacies of DateTime::__construct()
<?php The above example will output something similar to: 2000-01-01 00:00:00-05:00 2000-01-01 00:00:00+12:00 2010-04-24 10:24:16-04:00 2010-04-25 02:24:16+12:00 2000-01-01 00:00:00+00:00 2000-03-01 00:00:00-05:00 See Also
|
more
Recently updated
more
Most requested
more
Last requests
|