Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105958 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 16293 invoked from network); 17 Jun 2019 15:44:29 -0000 Received: from unknown (HELO mail-oi1-f177.google.com) (209.85.167.177) by pb1.pair.com with SMTP; 17 Jun 2019 15:44:29 -0000 Received: by mail-oi1-f177.google.com with SMTP id s184so6895285oie.9 for ; Mon, 17 Jun 2019 05:58:38 -0700 (PDT) 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=tO8aOV5gpMNMTWLjDJt2EmXQ/dpKjPZOGcLGwpQUrLg=; b=Zi0/2fvqPvAFp+1EeRG9IHfXKUHvoQYUsoVjVhss5QbfO9KBcm7gjmAp6YunxZHSr3 fT6j9IbvzyXFKTJik70nP6o6UcxgD56pMdLl+Doff/C4NpZxo1KHangdMUH2trXw+z2q DXhnveeurB9r6+97T9L0TfsyKnBPc+qYYkAs8NYw8mRKcmc8emvqJQ9EkYUHRJxUP2uK qCq5qdFRf67wArtXtO1vqZD5hnfwXLGyOYkRkYYdTQrdxv82GsG44apGls2kHCWvDGyB sU4F9eP+IGE0RcX+6BdzmP9m9TJmWwjFm8rLLgB4FxipjUDBgo6ngxoGOEmQZCn/l9FA ulCA== 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=tO8aOV5gpMNMTWLjDJt2EmXQ/dpKjPZOGcLGwpQUrLg=; b=lajiZZ3PiO43PaMJ2fnqSRVQzGewHBkatKtFrEkKhLa7ecSfcio3lovmsHkRdlqKgB qDCUpy2cNHv5eXG369l5OPFVvL9u5AyQvyiNzC/szDt5ws++uvD0is5O3O1LUtXYkcix /xRhs2YAdjPoYOF75SXH6UL5ToYIugP6B7OUgoadPCL8/0an1kj6UWQdFXXO4DIulSY6 mlyq9ruSfERxQtP4P7HFuyVhrJWSdMr82d6zmwoPeEfHaMVjpX+jg1lvO1yIjs8ZdNzq bZG3Aczv4kE/9sXgtMi+9BwrUdmsQgoub0SHJsyUWYoib1blotROfbKAS5DZqr0qJo0Y NZug== X-Gm-Message-State: APjAAAUVcWBTobJieIohEhfscv0VO8WQS+R5Rt8+KipvF61szr9JvpfE x6sEcgmnUE1e482q/i96rGS9ZT27eEsh4BiWvbT5NyHULEo= X-Google-Smtp-Source: APXvYqwD6DoXBr7LvSzhqN/2yp6wp6KMAJQ8EEC7oLqDTN/zFba02ggul1ggR3Kl5/2Us6AlxHYdpPa9x81Lj5vIQDw= X-Received: by 2002:aca:c64d:: with SMTP id w74mr10385334oif.137.1560776317591; Mon, 17 Jun 2019 05:58:37 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 17 Jun 2019 14:58:26 +0200 Message-ID: To: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000fbe630058b848dbd" Subject: Preloading experiments with Symfony From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000fbe630058b848dbd Content-Type: text/plain; charset="UTF-8" Hello, I experimented with preload on a small Symfony app. I have two segfaults on my patch to make it work, reported here: https://bugs.php.net/bug.php?id=78175 I also opened https://bugs.php.net/bug.php?id=78169 but were asked to raise the point on the list: When opcache.preload is used, requiring twice a file that declares a preloaded class will not yield any error, while when preloading is not used, one will get a cannot redeclare error. On the other side, when require_once is used, a preloaded class file is not considered "already loaded", which means the require happens during execution. Would it make sense to change both these behaviors to make them more in line with normal engine behavior? i.e. "require_once" on a file that was already preloaded wouldn't require it again, and "require" on a preloaded file that contains a class declaration would yield a "cannot redeclare" fatal error? This would be more expected to me. Would it be possible? Thanks, Nicolas --000000000000fbe630058b848dbd--