Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104789 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96814 invoked from network); 18 Mar 2019 23:24:39 -0000 Received: from unknown (HELO mail-qt1-f196.google.com) (209.85.160.196) by pb1.pair.com with SMTP; 18 Mar 2019 23:24:39 -0000 Received: by mail-qt1-f196.google.com with SMTP id k14so13847953qtb.0 for ; Mon, 18 Mar 2019 13:16:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mindplay-dk.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=NbVg0hcuRHaloWSr+r0Q1XM5YtSyV5fCZbdU9vbodcE=; b=FLeCdDlX38qcr/r2u8u8Hk350rvLWxL57OJr+5c7AzomfHZPngsKEBrxPQneBObXeR 70a9RIAGjnjXDPIVVQyAWSqTesPOtPm9GEVfuXbAgWGWVlGBSxTCA80xei7msb5b88zz ODzpDx0hTcJaeRpU1qA1gY+PvPmQ9+ws9VPB57mGzLh5ZodlrkWBV5WjDprzT98kxvyU sRlVVVLXC9R5q+CodgI+cqT9+vb8qRsFYAILxbzcFdu7UckGOS7RBJycxsLUVtErkCzS 5NjPd/GbnUmAFUek2/kz+iYP788hN5PDeG4sOKopXNkd9koqq9PSq4S6WFObxxigj9yZ F1OQ== 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=NbVg0hcuRHaloWSr+r0Q1XM5YtSyV5fCZbdU9vbodcE=; b=cxVZBK4VMPjGkhYiW5ncSPSBiKt24KqsU4WQBX0VVbiJBHxJEuFpkNX+jSu4UAuW7W VQrXES7XFBON0AYuIz5yf5kvNANf3pjF6060MtptrRYvIbdQ5VEJXQynfmTjrUm5PvWm JeWFGbJL3TlSi08kUrIMQG7UmhejZ2n8B/fUQSCHEEEPel1HpD2V70kVfPHBowD1J90q ZREd6Pto/exYqRfWvTbHVpGdGOxkqIrDF1tKd6cURm3m+q8vdIbe/1K/kqPkJTo1a65c cncj8y0b2A5VKoI9jcwpzMKEWr+Y0RcoQaw7xYuwwLx2HDRGj4XgpxplElP89cr1ltdm 9A6g== X-Gm-Message-State: APjAAAWf0D0QtwdQEwGAH5QUnZGDWu/Iu4HcjxBlP91J+TfzcD15RhO5 2kmH5bXXRzYRdoiT+OliuGKcQUgz99+rUiRmKA98Arkt X-Google-Smtp-Source: APXvYqwY+Yim4X1P/bwLnWgkjUbHTPMlSE1lOAJA7HIxdKadIv1nfESvgXgFME1c3nBJklEs2BS0lGaKaUA7dhnLUXM= X-Received: by 2002:ac8:2668:: with SMTP id v37mr15398887qtv.263.1552940166385; Mon, 18 Mar 2019 13:16:06 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 18 Mar 2019 21:15:56 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="000000000000f9a9460584640e60" Subject: unload/reload classes? From: rasmus@mindplay.dk (Rasmus Schultz) --000000000000f9a9460584640e60 Content-Type: text/plain; charset="UTF-8" Hello internals, How hard would be to add an unload (or reload) feature for classes/interfaces? I'm wondering with regards to running PHP as a deamon (with Swoole or ReactPHP, etc.) could it be made possible to hot-reload e.g. for controllers and view-models? Of course, the other option is to launch worker sub-processes under some sort of host process, and then restart the workers after a change - this adds communication overhead between the host/worker processes though, and a layer of complexity. Another option is if a reverse proxy (NGINX maybe) could restart the actual application daemon, but that means you have a dependency on a specific reverse proxy. So I know there are other options, but I'm looking for the simplest and cleanest way to do this, and I'd prefer to stay within the language. Other dynamic languages (where daemonizing is "normal", like Ruby, JS and Python) have this feature and it is often used to hot-reload controllers/views in web-apps. Any thoughts? --000000000000f9a9460584640e60--