Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116233 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 33095 invoked from network); 5 Oct 2021 18:33:53 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Oct 2021 18:33:53 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 72789180510 for ; Tue, 5 Oct 2021 12:18:22 -0700 (PDT) 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.0 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-vs1-f46.google.com (mail-vs1-f46.google.com [209.85.217.46]) (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 ; Tue, 5 Oct 2021 12:18:21 -0700 (PDT) Received: by mail-vs1-f46.google.com with SMTP id y141so384436vsy.5 for ; Tue, 05 Oct 2021 12:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tg2UrLnp15aDjbRvsI7oGbrssFojS2ft0dZ9z67yjSY=; b=XDMu5/EXtrVv1m+GLp/6xU8AyiBtqYMyTEfNgylT7z42MIj4fgJtLmXzYO+B0eyhhd +sSBF60BGAvctCC6xbljYuGXO2MkPdxT7ySI0Xg7A7V3fR5rPjWhxqcYXC9UDx3fxpC9 DuwHZGGwsdkUu9ox74lL9YJprWLoIHmG0Qvr3bjWAqnn5JgPzJcaXcvB4fZ8P2XOyGPm Eh8WRAs9yDn82IPv13jppsTbsaYgeH3cfNBiCMbcMI/kZWHgeOAV1iiFNNOmA5sA+2xf bVReyqNedvWp53C4T7xQqszpoajSPOHzohkXQxi05Ey0nv2W21+eWxwDvm3b+tUPIEG0 /CZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tg2UrLnp15aDjbRvsI7oGbrssFojS2ft0dZ9z67yjSY=; b=3dXlw65uIUAuhMttw8anyYWW/gVEjwICL9cw+195p2OY30EQFZ54NDepM8UGFrOhE5 EvLfWe1254W1f0HehVruVPYISzddJqGmCid59CHNIcsdnfJgKg6pj/7OQEriSO4Q2+l6 W1Rc6vPW/+VtIurSAO3UFhjoKX3aOaaIDSwTdjGPYyVwwRExGVDyY0vWmcV+8DoRM735 pmkuHkZrQsK225+LQVymYPejgdI196jtu3kZJUK+RcV1MZGp4DqOq3NNDKwSNv3YQJHn +YDbvChyqETLR5FKBYm2c0oasvUMwDV4Nd5qjAEL8egyhQCBAuOhacvTq8jogH2/gbPx /hOQ== X-Gm-Message-State: AOAM532fIjcbZ1p9qJtngi6P4OCYpqETp2MrmLETJlFe73K+FzMDBP7f adKpgLKS9mp37ni8wIAVf77zlSH14UtCTVKXH7xJhJ+XnDD5yQ== X-Google-Smtp-Source: ABdhPJyqZvMCgkgfWdSfSot3qMkIrDel8K8yhI/i4qHmFxjNRnEYowyulC5FDAOtp00phu/nHFLoRywsJSKC84r+pck= X-Received: by 2002:a67:1781:: with SMTP id 123mr20708162vsx.1.1633461497817; Tue, 05 Oct 2021 12:18:17 -0700 (PDT) MIME-Version: 1.0 References: <29103CC9-22A5-4507-A982-CFFC20450435@newclarity.net> In-Reply-To: <29103CC9-22A5-4507-A982-CFFC20450435@newclarity.net> Date: Tue, 5 Oct 2021 20:18:05 +0100 Message-ID: To: Mike Schinkel Cc: PHP Internals List Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Function list declaration syntax? From: Danack@basereality.com (Dan Ackroyd) On Tue, 5 Oct 2021 at 18:47, Mike Schinkel wrote: > Consider the `Type` class[3] in the `SebastianBergmann\Type` namespace. It contains 60 lines of function declaration to define 14 functions that all return `false`. PHP allows you to define functions on one line: function isCallable(): bool { return false; } function isFalse(): bool { return false; } function isGenericObject(): bool { return false; } If you don't like having functions take up lots of lines, it's easier to just not follow that PSR guide line on formatting, rather than modify the language. cheers Dan Ack