Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108090 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 93974 invoked from network); 10 Jan 2020 17:06:05 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Jan 2020 17:06:05 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9FEEF1804C2 for ; Fri, 10 Jan 2020 07:12:00 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 10 Jan 2020 07:12:00 -0800 (PST) Received: by mail-ot1-f44.google.com with SMTP id p8so2224974oth.10 for ; Fri, 10 Jan 2020 07:12:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5DtNnSIzm+8pzk98KgK6YT+brARZISQ8VgdbrrM1exk=; b=YnjmWYohoTwt6pZMMOzBiKMCwFp9ZSNj11jc/80aDbgMkuDr0NRbWHxG36P1K9e7zz qlCu+leXwflBM1QmGPIhnOWutEgUJCHxjoCXgRKXoOZhoGoeolIbfIvoZL9Jr0Jd6RAn 9ijUbXoP8wrmLfwu+agzdDzMTLN07IUBBVrywCkfhOW6N5FP3aod84ebhSQE++XwsXBi teBMHRInDAkPnNh/oNDFaGRk4iPFzD2INi0UwzW6fKhQWhrVf/jfayr5UmximNuEe+Hq FdFz4PzQ7jdK4T32JAtW7PmQajcci1oiC/ERQg9O7NmMGT67+Yeo8Wbx8gOU9KDFbxf0 zUZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5DtNnSIzm+8pzk98KgK6YT+brARZISQ8VgdbrrM1exk=; b=SPenUkKafi4VlN3N+WTvgJWS9om5jNxKmmw+U+bo39y8380oTG1YyTE78GMxlV2473 9PzWy+Gc5ZX9YR4ysU8uNZ4PGkCiJhjZvks5yebo0XfqzwP0SlinXCqnqdRCpG64XB7M urf+O0tDmuD3YHtSGoHPiqI0OgK7CSNbzEOPDtE3XBumz+8bFxYVjUxok9ACVxPDhPIN PojxsAcMpqomsondWUlWKDnA1DLlvzgrMgEiUSf56zN5Oi5kbcbc5AEi20xBlRnZJ5Wm sCKjWikRyCyaHF8Y7BJZbr8hZXlbL+DmACk8R7MjbLfzEy92qdWdoqXfP7PpaO7piG8M 3ewA== X-Gm-Message-State: APjAAAV+7vppgvPH5ukEUjm0a+ZX7gRHIJGimsjCIdRC5cWS5r1xzi52 uI4CxC2cQ4d05e9Iw/yFqI/RBdwGyhJrtU9zxG0= X-Google-Smtp-Source: APXvYqzfg+TpqNsQ8gvp7fQWjY/eBh5G7PMVwEUk9/Oz/xQ34jk4tkhIuUBtipIhZ4Zrv2VAUznuxmatRa7nNxVQSmc= X-Received: by 2002:a9d:7f16:: with SMTP id j22mr2913061otq.256.1578669119474; Fri, 10 Jan 2020 07:11:59 -0800 (PST) MIME-Version: 1.0 References: <5e0d723f.1c69fb81.e2ae8.24e2SMTPIN_ADDED_MISSING@mx.google.com> <74F2DBFC-E63C-428C-A37F-2D0CEE15AD0F@newclarity.net> <53556dfb-44ce-f902-204c-9a7da9484a61@gmail.com> <65567C7C-CF0F-4562-8943-F1F302134B07@newclarity.net> <6f20bda1-eff6-631d-915f-d6bb149ee666@gmail.com> <93BA4B49-9D9A-4A41-83B3-8EC2564A70BF@newclarity.net> <106024FC-F36B-4E4E-9383-6430025A8D60@newclarity.net> In-Reply-To: <106024FC-F36B-4E4E-9383-6430025A8D60@newclarity.net> Date: Fri, 10 Jan 2020 15:11:47 +0000 Message-ID: To: Mike Schinkel Cc: Rowan Tommins , PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Initializing constants once, with code? From: robehickman@gmail.com (Robert Hickman) > > I stand by my comment that this has *some* of the same problems as a > > separate "build" script, such as the need to be configured correctly, > > I find repeating of this as overstating the concern simply because any programming language feature would need to be used correctly. So this also feels like a distinction without a difference. > > > the difficulty of debugging errors in this special code, > > Depends? If this where to use XDEBUG just like regular PHP there would be zero difference. > > > and the need to invoke the extra processing manually for things like command-line scripts. > > Since PHP is different from a pre-compiled language like C or Go, it compiles "on-demand." So I would see zero need for a build step. > > I would also see PHP could first run the compile-time code once, and then run the runtime code for every execution. On-demand. And XDEBUG could be used for both. > > For CLI, it might always run the runtime code and then the compile time code. Unless there is a standard location set of compiled opcode in .ini file, and/or unless PHP provided ways to generate OpCode artifacts to be loaded at runtime. > > -Mike > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > There would be no definite build step in the sense of needing to run a compiler, as this 'compile time code' would run once during preloading on web code, and as sugested above, could be ran every time for command line scripts, but cacheing the opcodes in a file and automatically detecting changes and recompiling this as python does, could be a worthwhile optimisation.