Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92371 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79133 invoked from network); 16 Apr 2016 22:06:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2016 22:06:31 -0000 Authentication-Results: pb1.pair.com header.from=bastian.schneider@commerce-plus.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=bastian.schneider@commerce-plus.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain commerce-plus.com from 74.125.82.51 cause and error) X-PHP-List-Original-Sender: bastian.schneider@commerce-plus.com X-Host-Fingerprint: 74.125.82.51 mail-wm0-f51.google.com Received: from [74.125.82.51] ([74.125.82.51:38357] helo=mail-wm0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/45-32052-667B2175 for ; Sat, 16 Apr 2016 18:06:31 -0400 Received: by mail-wm0-f51.google.com with SMTP id u206so75894984wme.1 for ; Sat, 16 Apr 2016 15:06:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=commerce-plus-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=RHHLelDTiAcxGCpbLXpHPOf8GaPbBlaAZ2TKaFTQm5U=; b=hzYU1UFgjvQMWUxzKH5hB2uTN6etcAg1Dwi7RR+UeeGv9VHFN6osBaXCLwXfPpACfs YoDa0tKMEDa6MOwl5EM7iW1w1lcErR3y14ZtqB8c6ZeL7RLttL117zAVMlNPVB3Q5GAp eE3RysFK6NFhdl3dvwQ1yAldsj8aYPItlZ97f4QGCVuDLSF3yxVWSa31SucjoBkhCibP h2iH01BiaCs7ltIIkTUVdJ42u3bN2O7n3nCrz88snrF2WNn2y6lIIhTTX5ZvNPyAEw55 HIcN62iTa88wNP12pOuuvrwjVBDIath0wnG7OFQxb1lamMElxqxBzNhYq5w8i7cbexIP 7McQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=RHHLelDTiAcxGCpbLXpHPOf8GaPbBlaAZ2TKaFTQm5U=; b=hdYTyNbUKwr1zl3oq5j+A5QwPgLD90lSnqK6+r9BL6jCIbLw0/Elc8Rwui/Jm3UuAO 0vSeICIhRlK96AKkQvjrv4N05nKTv43s+n0AOHjHKLUhNgO48QBzpBOkiDuHqKRGxtgq Ap1gQfcrNwhd4l2ELOojAVF4Vq+2rIAciK6N04MCwEO0lM4rWvR4J3SygfL0HTblI04c xJOJ61sA4WYB8+izo38vnERbOgHmLlEqk6GXxreMoBV1PNbhig2iKIJXYx9vCE2NT3nG Qk0zLykhz88+0E0Uk5tey5cNPcNUMIgw5+Ck9vPs3f4CnN7pjjGlO/k4Ks8k6ZFJr/qA O51w== X-Gm-Message-State: AOPr4FVydyaVzKoj/oq6SZWdB9+tkKO/f1G2Vf23a2PYdvll7tgiEcftB793slk50YXCI7Pp X-Received: by 10.194.190.201 with SMTP id gs9mr31616570wjc.133.1460844387588; Sat, 16 Apr 2016 15:06:27 -0700 (PDT) Received: from [192.168.2.4] (ip5f5ab8dc.dynamic.kabel-deutschland.de. [95.90.184.220]) by smtp.googlemail.com with ESMTPSA id f204sm18616452wmf.22.2016.04.16.15.06.25 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 16 Apr 2016 15:06:26 -0700 (PDT) To: Lin Yo-An References: <570E99AC.3090804@fleshgrinder.com> <570EA5EB.8090501@fleshgrinder.com> <570EAB0D.6080706@gmail.com> <570EB67E.8010908@garfieldtech.com> <5B147E88-CC0A-4CBC-A49D-C7FE3BF557C0@zend.com> <6F.C3.12455.94C5F075@pb1.pair.com> <20160414094440.GF19347@phcomp.co.uk> <570FD94F.90703@fleshgrinder.com> <570FE8A9.4020809@gmail.com> <20.53.29891.17401175@pb1.pair.com> <57110BCD.5030009@garfieldtech.com> <571124C2.9040606@gmx.de> <57112F31.8070209@garfieldtech.com> Cc: "internals@lists.php.net" Message-ID: <5712B765.4010100@commerce-plus.com> Date: Sun, 17 Apr 2016 00:06:29 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Improving PHP's type system From: bastian.schneider@commerce-plus.com (Bastian Schneider) Just a quick thought. union Iterable { use array; use ArrayAccess; use Traversable; } function bla(Iterable $iterable) { foreach($iterable as $element) {} } Primitives like string, float, bool or int are not allowed in union. Only classes, interfaces and array. I doesn't see any benefit in combining string with int or int with float in one union. Do I overlook or missed anything?