Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123301 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 7BDE21A009C for ; Fri, 10 May 2024 16:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1715358355; bh=VbiLJBbkh2PwsHXDWtq5f7YhuT1PDhEdOJ7jwgLbPzo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=FqIu+R51rKQXTboAH9gEy8aMJBkXB/34FGJrBqLf66+/M3lF9kpYorpXn41p4tnKG UiwTEqNdcbvfKzkwheaO3zvVqRKTZibnQSeWifwJm6ol11ozhfHHsFcteMVSWXuvO4 ja3zW/L4zMMrEkdGPv6+xAYSh7fa0F3S4+Uw1YQYAwUCbWnAsCfSXQ87p9z2gLnRSg jyJ4e9vEwPSFRMBVdrcR73tMJnmVPbgshWSoWrJbjjU2JI7BktFjItUYBGSpqUAi/7 CO3aiowf2XYPP9Zqz51W69jFJnVfDFalRSz39Hp9ZVdZfIiEblylD1S/yUaegoL4kT CUjMQ5twrggHw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 48D40180062 for ; Fri, 10 May 2024 16:25:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-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,DMARC_PASS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 10 May 2024 16:25:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1715358301; bh=lWAGMyobEgw74hfqBcimBocy6IpaPoXsU/T4YLZAz40=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=Bp54DYYGD91TVrNHc5NKpwqt8u0ZkKHInxnbRn2tSFp9c/1KjlEi98It45PemjQ6k dyOjsMUVsjDGsWBMFxW38lCvNjtUc2yuvkjLdY9Mf4IaEnL1uQ9kYuZncwx6i+rR15 /JOMrcusIu3qe1qA2zff/zp4DT7Se+YddfQMkXhn/yygiYRmEpEqo0orCowuuNiM1R NYH3GL892Odt4iVWcnC4NkJWndrZujzaVxob+56W9EPdpBFr5rJISSpZfnzLqwAy8L Duw50Keg2y8ArH3z/3M0jWg0WPmaOB9RLvssGw6j7CSBgPM4lAegpYfZBRWMTqP6aG rbuCzSB0WaWKA== Message-ID: <9dc36844-4625-430f-8ad9-b8bf86bd48ea@bastelstu.be> Date: Fri, 10 May 2024 18:24:58 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] Transform exit() from a language construct into a standard function To: Jorg Sowa , Derick Rethans Cc: =?UTF-8?Q?Fl=C3=A1vio_Heleno?= , Niels Dossche , internals@lists.php.net References: <0a30b095-149d-cb45-3f54-3d904774c139@php.net> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 5/9/24 16:17, Jorg Sowa wrote: >> I don't think there are any other "functions" like this. > > What about list(), isset(), print(), echo(), require(), include(), unset(), > empty()? We use them the same way as functions, but those are not real > functions. All of them require to be followed by an expression (or some other non-empty token), thus they do not act like constants the same way 'exit' and 'die' do: - unset, isset, empty, list must be followed by '('. - echo is a statement and needs to be terminated with ';'. - print is an expression and requires a single non-empty expression. - The include family is an expression and requires a single non-empty expression. Best regards Tim Düsterhus PS: Today I learned that echo and print are not aliases.