public static function exportVar($value)
    {
        $closures = self::collectClosures($value);
        $res = var_export($value, true);
        if (!empty($closures)) {
            $subs = [];
            foreach ($closures as $key => $closure) {
                $subs["'" . $key . "'"] = self::dumpClosure($closure);
            }
            $res = strtr($res, $subs);
        }

        return $res;
    }
public static function exportVar($value)
    {
        $closures = self::collectClosures($value);
        $res = var_export($value, true);
        if (!empty($closures)) {
            $subs = [];
            foreach ($closures as $key => $closure) {
                $subs["'" . $key . "'"] = self::dumpClosure($closure);
            }
            $res = strtr($res, $subs);
        }

        return $res;
    }
public static function exportVar ( $ value ) { $ closures = self :: collectClosures ( $ value ) ; $ res = var_export ( $ value , true ) ; if ( ! empty ( $ closures ) ) { $ subs = [ ] ; foreach ( $ closures as $ key => $ closure ) { $ subs [ "'" . $ key . "'" ] = self :: dumpClosure ( $ closure ) ; } $ res = strtr ( $ res , $ subs ) ; } return $ res ; }
Returns a parsable string representation of given value.
In contrast to var_dump outputs Closures as PHP code.
@param mixed $value
@return string
Returns a parsable string representation of given value . In contrast to var_dump outputs Closures as PHP code .