Re: RFC for Adding __toString to DateTime

From: Date: Mon, 03 Sep 2012 16:28:14 +0000
Subject: Re: RFC for Adding __toString to DateTime
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  Groups: php.internals 
Request: Send a blank email to internals+get-62756@lists.php.net to get a copy of this message
Just In Case, I implemented a solution in an extension of mine. I use a INI setting, ideas are on my github https://github.com/jpauli/Comuto/blob/master/comuto.c#L97 and https://github.com/jpauli/Comuto/blob/master/comuto.c#L175 Anyway, I'm really +1 for patching ext/date to add such a feature :) Julien.P On Mon, Sep 3, 2012 at 5:15 PM, Derick Rethans <derick@php.net> wrote: > On Mon, 3 Sep 2012, Benjamin Eberlei wrote: > >> as i said above, a global option will make this feature completly unusable >> for libraries. For Doctrine we would really like to have __toString() for >> datetime primary keys (identity map), but we need a reliable stable >> lossless format that can never change. > > Just wondering - would a userland inherited class not work for you? > > cheers, > Derick > > -- > http://derickrethans.nl | 6޳™¦Žï > + Â>ï{‘uhttp://xdebug.org > Like Xdebug? Consider a donation: http://xdebug.org/donate.php > twitter: @derickr and @xdebug > Posted with an email client that doesn't mangle email: alpine > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.internals (#62756) next »