Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php convert to string

<?php
class StrValTest
{
    public function __toString()
    {
        return __CLASS__;
    }
}

// Prints 'StrValTest'
echo strval(new StrValTest);
?>
 
PREVIOUS NEXT
Tagged: #php #convert #string
ADD COMMENT
Topic
Name
2+1 =