TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
548 B
30 lines
548 B
--TEST--
|
|
strval() function
|
|
--SKIPIF--
|
|
<?php
|
|
echo 'skip Test output differs under AOT compilation';
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$foo = 'bar';
|
|
var_dump(strval($foo));
|
|
define('FOO', 'BAR');
|
|
var_dump(strval(FOO));
|
|
var_dump(strval('foobar'));
|
|
var_dump(strval(1));
|
|
var_dump(strval(1.1));
|
|
var_dump(strval(true));
|
|
var_dump(strval(false));
|
|
var_dump(strval(array('foo')));
|
|
?>
|
|
--EXPECTF--
|
|
string(3) "bar"
|
|
string(3) "BAR"
|
|
string(6) "foobar"
|
|
string(1) "1"
|
|
string(3) "1.1"
|
|
string(1) "1"
|
|
string(0) ""
|
|
|
|
Warning: Array to string conversion in %s on line %d
|
|
string(5) "Array"
|
|
|