blob: 53d97071b0e79f8dec8b792e694be9ed2d804bf0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
--TEST--
Test Php::Value casting operators (object to string)
--DESCRIPTION--
Converting a php object to a string
--SKIPIF--
<?php if (!extension_loaded("extension_for_tests")) print "skip"; ?>
--FILEEOF--
<?php
function native_value_casting($value) {
echo (string)$value, PHP_EOL;
}
class TestClass
{
public function __toString() {return "I am TestClass";}
}
TestVariables\value_cast2str(new TestClass());
//native_value_casting(new TestClass());
TestVariables\value_cast2str("some string");
--EXPECT--
I am TestClass
some string
|