public function toJSON($options = 0)
    {
        // Because of PHP Version 5.3, we cannot use JSON_UNESCAPED_SLASHES option
        // Instead we would use the str_replace command for now.
        if (version_compare(phpversion(), '5.4.0', '>=') === true) {
            return json_encode($this->toArray(), $options | 64);
        }
        return str_replace('\\/', '/', json_encode($this->toArray(), $options));
    }
public function toJSON($options = 0)
    {
        // Because of PHP Version 5.3, we cannot use JSON_UNESCAPED_SLASHES option
        // Instead we would use the str_replace command for now.
        if (version_compare(phpversion(), '5.4.0', '>=') === true) {
            return json_encode($this->toArray(), $options | 64);
        }
        return str_replace('\\/', '/', json_encode($this->toArray(), $options));
    }
public function toJSON ( $ options = 0 ) { // Because of PHP Version 5.3, we cannot use JSON_UNESCAPED_SLASHES option // Instead we would use the str_replace command for now. if ( version_compare ( phpversion ( ) , '5.4.0' , '>=' ) === true ) { return json_encode ( $ this -> toArray ( ) , $ options | 64 ) ; } return str_replace ( '\\/' , '/' , json_encode ( $ this -> toArray ( ) , $ options ) ) ; }
Returns object JSON representation

@param int $options http://php.net/manual/en/json.constants.php
@return string
Returns object JSON representation