On Mon, Dec 15, 2003 at 01:48:39AM -0500, George Schlossnagle wrote:
> >>interface Stringable {
> >>public function toString();
> >>}
> >>
> >>And that way extensions and user code both can decide if they want to
> >>give special treatment to objects that implement Stringable.
> >
> >I thi
On Dec 15, 2003, at 1:37 AM, Jon Parise wrote:
On Mon, Dec 15, 2003 at 01:32:57AM -0500, George Schlossnagle wrote:
Nope. How is it different or nicer than doing
$defect->thrownException()->__toString()?
It saves you 4 characters?
If it doesn't do anything 'magical', why bother with the __? If y
On Mon, Dec 15, 2003 at 01:32:57AM -0500, George Schlossnagle wrote:
> >Nope. How is it different or nicer than doing
> >$defect->thrownException()->__toString()?
> >It saves you 4 characters?
>
> If it doesn't do anything 'magical', why bother with the __? If you
> always have to call it manu
On Mon, Dec 15, 2003 at 08:09:12AM +0200, Andi Gutmans wrote:
> >Hopefully, this still works (don't have a recent PHP5 build to try):
> >
> >print (string)$defect->thrownException();
> >
> >The explicit cast also addresses this case:
> >
> >print (string)$defect->thrownException() . "\n";
On Dec 15, 2003, at 1:09 AM, Andi Gutmans wrote:
At 08:35 PM 12/14/2003 -0500, Jon Parise wrote:
On Sun, Dec 14, 2003 at 03:41:10PM +0100, Sebastian Bergmann wrote:
> > It is supported by "print" and for internal extensions such as
> > SimpleXML which require this.
>
> How is it supported by "p
At 08:35 PM 12/14/2003 -0500, Jon Parise wrote:
On Sun, Dec 14, 2003 at 03:41:10PM +0100, Sebastian Bergmann wrote:
> > It is supported by "print" and for internal extensions such as
> > SimpleXML which require this.
>
> How is it supported by "print" when
>
> print $defect->thrownException(
Jon Parise wrote:
> Hopefully, this still works (don't have a recent PHP5 build to try):
>
> print (string)$defect->thrownException();
>
> The explicit cast also addresses this case:
>
> print (string)$defect->thrownException() . "\n";
bar;
}
}
$foo = new Foo;
print $foo;
Jani Taskinen wrote:
> Does this has to be in 'root'..? All the other win32
> stuff is in php-src/win32 ??
buildconf.bat is also in 'root'.
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Das Buch zu PHP 5: http://professionelle-softwareentwickl
On Sun, Dec 14, 2003 at 03:41:10PM +0100, Sebastian Bergmann wrote:
> > It is supported by "print" and for internal extensions such as
> > SimpleXML which require this.
>
> How is it supported by "print" when
>
> print $defect->thrownException()
>
> does not work but the object returned
On Sun, 14 Dec 2003, Sebastian Bergmann wrote:
> How is it supported by "print" when
>
> print $defect->thrownException()
>
> does not work but the object returned from thrownException() has a
> __toString() method?
That's part of my problem with __toString, there's a difference
between
Marcus Boerger wrote:
> should be fixed by last commit to TSRM.c
It is, thanks,
Sebastian
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/
--
PHP Internals - PHP Runtime
Hello Sebastian,
should be fixed by last commit to TSRM.c
Sunday, December 14, 2003, 4:31:39 PM, you wrote:
> _free_dbg(void * 0x00da43e0, int 1) line 1001 + 13 bytes
> free(void * 0x00da43e0) line 956 + 11 bytes
> cwd_globals_dtor(_virtual_cwd_globals * 0x00da43a8, void * * * 0x00da4268)
> line
Em Sun, 14 Dec 2003 15:41:10 +0100, Sebastian Bergmann escreveu:
> Andi Gutmans wrote:
>> It is supported by "print" and for internal extensions such as
>> SimpleXML which require this.
>
> How is it supported by "print" when
>
> print $defect->thrownException()
>
> does not work but th
_free_dbg(void * 0x00da43e0, int 1) line 1001 + 13 bytes
free(void * 0x00da43e0) line 956 + 11 bytes
cwd_globals_dtor(_virtual_cwd_globals * 0x00da43a8, void * * * 0x00da4268)
line 177 + 14 bytes
tsrm_shutdown() line 167 + 33 bytes
main(int 4, char * * 0x00da3ea8) line 1023 + 8 bytes
mainCRTStartup
Andi Gutmans wrote:
> It is supported by "print" and for internal extensions such as
> SimpleXML which require this.
How is it supported by "print" when
print $defect->thrownException()
does not work but the object returned from thrownException() has a
__toString() method?
--
Sebasti
Derick Rethans wrote:
> Actually, you should as __ is reserved for magic methods...
Until recently __toString() was a magic method.
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-
It is supported by "print" and for internal extensions such as SimpleXML
which require this.
Also in Java toString() isn't called automagically in every place so I
wouldn't call it useless.
Andi
At 08:56 AM 12/14/2003 +0100, Sebastian Bergmann wrote:
The following code from PHPUnit stopped wo
Hello Sebastian,
Sunday, December 14, 2003, 1:52:38 PM, you wrote:
> Marcus Boerger wrote:
>> We found out that calling __toString() automatically in any place in
>> the executor has unsolveable problems right now (ask Andi for details).
> So if __toString() is no longer automatically called w
On Sun, 14 Dec 2003, Sebastian Bergmann wrote:
> Marcus Boerger wrote:
> > We found out that calling __toString() automatically in any place in
> > the executor has unsolveable problems right now (ask Andi for details).
>
> So if __toString() is no longer automatically called what is its
> pur
Marcus Boerger wrote:
> We found out that calling __toString() automatically in any place in
> the executor has unsolveable problems right now (ask Andi for details).
So if __toString() is no longer automatically called what is its
purpose then?
I mean, if I have to explicitly call it via -
Hello Sebastian,
Sunday, December 14, 2003, 8:56:15 AM, you wrote:
> The following code from PHPUnit stopped working after the recent changes
> to __toString()
> protected function printDefectTrace(PHPUnit_Framework_TestFailure
> $defect) {
> print $defect->thrownException
Felipe Lopes wrote:
Hi there!
What you guys think about make array_reverse() a variable referenced
function. I mean something like:
function new_array_reverse(&$array){
$array = array_reverse($array);
}
-1 from me (supposed my vote counts ;), as this works pretty much
against functional
The following code from PHPUnit stopped working after the recent changes
to __toString()
protected function printDefectTrace(PHPUnit_Framework_TestFailure
$defect) {
print $defect->thrownException() . "\n";
print PHPUnit_Runner_BaseTestRunner::getFilteredStack(
23 matches
Mail list logo