xref: /PHP-5.3/ext/standard/tests/strings/strval.phpt (revision e5697cc0)
1--TEST--
2strval() function
3--FILE--
4<?php
5$foo = 'bar';
6var_dump(strval($foo));
7define('FOO', 'BAR');
8var_dump(strval(FOO));
9var_dump(strval('foobar'));
10var_dump(strval(1));
11var_dump(strval(1.1));
12var_dump(strval(true));
13var_dump(strval(false));
14var_dump(strval(array('foo')));
15?>
16--EXPECT--
17string(3) "bar"
18string(3) "BAR"
19string(6) "foobar"
20string(1) "1"
21string(3) "1.1"
22string(1) "1"
23string(0) ""
24string(5) "Array"
25