Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: John-Paul Stewart Newsgroups: comp.lang.php Subject: Re: pass parameter to require/class/construct Date: Sat, 16 Jan 2021 11:06:37 -0500 Lines: 15 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-Trace: individual.net /94Grn5SNAjDFriYpalhYQ2sKWkC2wkSF4qlWYEN7X0ce+uv/X Cancel-Lock: sha1:j57ExYzU/UmgO3Ygueji1NS5V20= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 In-Reply-To: Content-Language: en-CA Xref: csiph.com comp.lang.php:18525 On 2021-01-16 3:43 a.m., alex wrote: > $ cat object.php > $obj = require 'class.php'; That's not the right syntax for require nor for creating an object. Those are two different steps. So the code should be: