Note Submitter: alastair dot cooke at transport dot nsw dot gov dot au
----
<?php
echo phpversion();
class moose { function __toString() { return 'a moose'; } }
$foo = new moose();
echo " i have $foo \n" ;
echo $foo;
?>
will give you:
5.1.6
i have Object id #278
a moose
ie __toString does not happen when you interpolate things into a string...
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.