mirror of
https://github.com/php/php-src.git
synced 2024-12-15 04:45:03 +08:00
22 lines
334 B
Plaintext
22 lines
334 B
Plaintext
|
--TEST--
|
||
|
Testing trait_exists()
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
trait foo {
|
||
|
}
|
||
|
|
||
|
var_dump(trait_exists('foo'));
|
||
|
var_dump(trait_exists(1));
|
||
|
var_dump(trait_exists(NULL));
|
||
|
var_dump(trait_exists(new stdClass));
|
||
|
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
bool(true)
|
||
|
bool(false)
|
||
|
bool(false)
|
||
|
|
||
|
Warning: trait_exists() expects parameter 1 to be string, object given in %s on line %d
|
||
|
NULL
|