Skip to main content

to_php_string

Function to_php_string 

Source
pub fn to_php_string(value: &Value) -> Result<Cow<'_, str>, Error>
Expand description

PHP’s string conversion of a value as string functions perform it (zval_get_string): null and false are "", true is "1", integers in decimal, floats at the precision setting (number::to_string), arrays "Array" (PHP also warns). A stdClass (an empty JSON object) has no string form: PHP’s Error.