code: function parseValue(expr) {
    switch(expr.kind) {
      case 'array':
        if (expr.items.length === 0) {
          return [];
        }
        var isKeyed = expr.items.every((item) => item.key !== null)
        var items = expr.items.map(parseValue)
        if (isKeyed) {
          items = items.reduce((acc, val) => Object.assign({}, acc, val), {})
        }
        return items
      case 'entry':
        if (expr.key) {
          return { [parseKey(expr.key)]: parseValue(expr.value) }
        }
        return parseValue(expr.value)
      case 'string':
        return expr.value
      case 'number':
        return parseInt(expr.value, 10)
      case 'boolean':
        return expr.value
      default:
        throw new Error(`Unexpected PHP value: "${expr.kind}", details: ${JSON.stringify(expr)}`)
    }
  }
docs: Parse a PHP expression to JavaScript
  @param  {Object} expr The AST PHP expression.
  @return {*}           A JavaScript object or value.