Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101885 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94416 invoked from network); 18 Feb 2018 01:18:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2018 01:18:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=andreas@dqxtech.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=andreas@dqxtech.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain dqxtech.net from 209.85.215.49 cause and error) X-PHP-List-Original-Sender: andreas@dqxtech.net X-Host-Fingerprint: 209.85.215.49 mail-lf0-f49.google.com Received: from [209.85.215.49] ([209.85.215.49:40522] helo=mail-lf0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/F5-26725-F64D88A5 for ; Sat, 17 Feb 2018 20:18:39 -0500 Received: by mail-lf0-f49.google.com with SMTP id 37so8699862lfs.7 for ; Sat, 17 Feb 2018 17:18:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dqxtech-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=pXCURms9Z26fL6kSsK2x1stRbjO7gG60OkU340bXGVw=; b=ICZhyRMgjVocwo6yJRn5Dt3xtLS61inUyfpL+KCicSF5SXQjUK/6Hso4c8PlXeuLH2 TRED6Shxv+qqCTqsaGpJzNwaUVbSOFSpKEY1Js3UPCOaX5OARB8up0otR/uaNlrvTbYS ygHmxIX/kSeT7i/UrEjl1nH6x4hOPjvgW4gJK1qnDWidXlz/xhpg7+9b/0it5sHDmG0a FNZZLKc1CUm4zUV3gZ3ptx8os5AlYg+HJ97kUNetHHEKwLYqeBYXUhK+xyAwOatKFVps QUV333FXLsNP7ITlJbQ6GBTQErPquE0UAKHYUm/V4Wq6OAx1OXdCcyefm4wXs2XWfW1u +QCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=pXCURms9Z26fL6kSsK2x1stRbjO7gG60OkU340bXGVw=; b=GQPPIhswoSGPdylD+8q0RNFnuKZOiF5yP34BHwF4bobdMzM8XwW9Bs44wPlccTTqkN 88IODq1bxJgTm45CRMqKcvjy2e/iJO6Fm+cYPoSieRAme4eBl9LamAvZ7up0rIHtE+ca +LaC+VwZlX4Kqo6RGdMf2jYNX7iybraP7suCbLejFVaTp2XxztagJPBlFhFxq/kk2d+N XZEz4wWew32DW+9xP0smG7K71mv7C9fZb5JL4GG3ntDEFl2ahnl58kBAW1UHZShsulie /nf+fePO8z7Xir9bLVR+ejFZCMMBkIzHpyORo+jEfCwphQSgvw+goF3caHw7uDDJTPVq 1lSA== X-Gm-Message-State: APf1xPA1+pvqCanb0cc+qchkhcPl9iROiFNV6xBQNlNjVeSebGQ1Qafc micxoRHYAWVPuwAiLtGxQEPDLYfO X-Google-Smtp-Source: AH8x225CAnp9OzEnMS4RYd3VZUacmZlTgntadqHiUc5QFPvURJDgeYCRyAhfn/x0rKMf4pci6SA41g== X-Received: by 10.25.181.8 with SMTP id e8mr263966lff.94.1518916715477; Sat, 17 Feb 2018 17:18:35 -0800 (PST) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com. [209.85.215.51]) by smtp.googlemail.com with ESMTPSA id n36sm2931533lfi.74.2018.02.17.17.18.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Feb 2018 17:18:34 -0800 (PST) Received: by mail-lf0-f51.google.com with SMTP id t204so6054274lff.9 for ; Sat, 17 Feb 2018 17:18:34 -0800 (PST) X-Received: by 10.46.20.67 with SMTP id 3mr4006668lju.104.1518916714103; Sat, 17 Feb 2018 17:18:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.225.78 with HTTP; Sat, 17 Feb 2018 17:18:13 -0800 (PST) In-Reply-To: References: Date: Sun, 18 Feb 2018 02:18:13 +0100 X-Gmail-Original-Message-ID: Message-ID: To: David Rodrigues Cc: PHP Internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] var_export() array format From: andreas@dqxtech.net (Andreas Hennings) On 18 February 2018 at 02:04, David Rodrigues wrote: > I just think that is not responsability of PHP to care about output format > at core level (although we have the json pretty output support...). Why not? E.g. JSON_PRETTY_PRINT is something I use a lot, often in situations where I don't or cannot use a 3rd party package. E.g. - if I abuse 3v4l.org as a php console - in a one-off single-file cli script - in a debugging session, or any temporary code. - if my involvement with the project is not deep enough to justify adding a dependency > > Maybe you can found some solution with packages. See the last section of my initial message: >> >> Why not a userland implementation? >> E.g. https://packagist.org/packages/riimu/kit-phpencoder >> >> var_export() is often used in experimental code or when just playing >> around, situations where developers usually prefer to avoid adding a >> 3rd party dependency. >> Also there is no way to add a 3rd party dependency on e.g. 3v4l.org. >> And a custom one-off implementation is not what developers should >> spend their time on (although I did it a few times already). If we already have a native function that generates PHP code, then we should expect it to produce usable output..