Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112707 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 10729 invoked from network); 1 Jan 2021 21:43:11 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Jan 2021 21:43:11 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A19841804A8 for ; Fri, 1 Jan 2021 13:18:27 -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=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (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, 1 Jan 2021 13:18:27 -0800 (PST) Received: by mail-lf1-f48.google.com with SMTP id l11so50715265lfg.0 for ; Fri, 01 Jan 2021 13:18:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Bcb5HTFXFYMCbqQUdwwdnQ28mxC/0fD4A5V87OXfxCs=; b=oIRi4ocW/yWyUGl06enE1SQALVRXjUDhh3PWzy8et6PscNLN2ZKGDiFLm80CjORbL8 CJZ6kIx3DJL3pJEfYe7sF/RFXtvOqgKSrBjlEk8QKqqfJnR3JGn8TEyD29+rIcBvQLjv Vf+GYstJCfpFx670siQUIcRTuH8/wtRIgbHanUAoEB2mMVldgpNR0xN31xb+UU0Ys09V 04PoHZsqtCAZ8dalSpyP/9SckbD55/lDZOjkZ3Sscz+Z/PFyhncGKlbx5FMm5HxEeAO5 SGCyG9BfhmFq2dH9tkcpEVNvBrmPF4TvNMxZ2nsHTEMD7rGyKHyTSDgP6NWvhQ7OJEnc 3Dxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Bcb5HTFXFYMCbqQUdwwdnQ28mxC/0fD4A5V87OXfxCs=; b=tI6fvX8hyBxWEp1SFxVStctG7dZhIaGw4T2Na+s+Ejp20pltIjWUpVFFoMIds/vTvM 0zPhuRvPy08pte/9s8CpQR6/d71dZ1/rRIc/y+mvszFEyoVBsL8FtjsQ6toMLIS75wC4 96I6FzporqsGiGYTfWrBiztG6DNe5aj/7tqapL93RVh6hoBgqLRBmHsAFy94rxFke3qf P5tZwcgwXuN1l/cUeFNrs8wKwi7kzhLN2qNj6Ys6dJYMuAzPiEW6sWVZhkRdpP/uWkrc SdXDy7YDWeuRQo2HP98U9p1pS/Tf+1ulVFzWc0Rbtn6sU5PfYrCIEcEDN4Qyt1CJC9Pe 4o2A== X-Gm-Message-State: AOAM531w20CghwIZp7XCIxWwuwwiGwiRT30JxQmojoVwcOU4RAoZRcJG oD1dlXIN9xyz/AgHQTDf5Xerl/r7EyRTA6+JhIOZ7IaF X-Google-Smtp-Source: ABdhPJx4DpfFABh8OpDYr7zDuLP99GUa0VcyqIH2ybH+UUnCRu0aoL5A2nc/bPS6SQAebH/V8hKgC6lKDl9kreKaDPI= X-Received: by 2002:a2e:8e3b:: with SMTP id r27mr32012084ljk.196.1609535903113; Fri, 01 Jan 2021 13:18:23 -0800 (PST) MIME-Version: 1.0 Date: Fri, 1 Jan 2021 22:18:10 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="000000000000c2251e05b7dd4749" Subject: Does PHP ever stack allocate? From: olleharstedt@gmail.com (=?UTF-8?Q?Olle_H=C3=A4rstedt?=) --000000000000c2251e05b7dd4749 Content-Type: text/plain; charset="UTF-8" Or is everything reference counted with heap allocation? Since PHP has escape analysis, this could be used to use the stack instead, and kill the memory when the scope ends. If PHP uses the stack, can this be seen in the opcode? This stackoverflow thread does not really answer my question. https://stackoverflow.com/questions/24223249/stack-and-heap-in-php#:~:text=In%20static%20typed%20languages%20all,known%20until%20the%20run%20time . Olle --000000000000c2251e05b7dd4749--