Documentation

ValueToStringTrait

Provides functionality to express a value as string

Table of Contents

toolValueToString()  : string
Returns a string representation of the value.

Methods

toolValueToString()

Returns a string representation of the value.

protected toolValueToString(mixed $value) : string
  • null value: 'NULL'
  • boolean: 'TRUE', 'FALSE'
  • array: 'Array'
  • scalar: converted-value
  • resource: '(type resource #number)'
  • object with __toString(): result of __toString()
  • object DateTime: ISO 8601 date
  • object: '(className Object)'
  • anonymous function: same as object
Parameters
$value : mixed

the value to return as a string.

Return values
string

Search results