Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103736 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 65874 invoked from network); 14 Jan 2019 18:42:27 -0000 Received: from unknown (HELO mail-it1-f181.google.com) (209.85.166.181) by pb1.pair.com with SMTP; 14 Jan 2019 18:42:27 -0000 Received: by mail-it1-f181.google.com with SMTP id g85so13516804ita.3 for ; Mon, 14 Jan 2019 07:18:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nvb+u3ULE3ZUDVx+eYlaoi1gSNxAONk4l2Qer+hL4E4=; b=boWhFV4RJCNf27fmMB5eqwq+/QWJMdAHajdEO7yqW6Nv4Eg26QD0jLvvUlue0PnCpj Fjwd3//pQleEQmf5mhyWjHGdwj5MJTA0+/EP6TzaZCKDr4tZM6OYDF2U+c0d2y1Co/BY tnpcg5/iKZTsfplujf0dXZudsaEr4hWlOB7CXGTZk5NKfWnWMmXZrtP5OjzjsKPKc7rz 9Q9Vwt8yWkVw8x1xhsrkxWUHkyL2X6crJACvsmOlgiSKXKl/e6MxTm1SYtYv8FEGuSfv 4G1DVF0sqr2I7KzyWTIjRWyGfufd1QzXWhJhSKmomVJPW83PaAd/4Yu3rqS8ed+vNBew HM1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nvb+u3ULE3ZUDVx+eYlaoi1gSNxAONk4l2Qer+hL4E4=; b=dDL7oJwGnCn6UbGIRY6v9s5jQ4tyfxxNl9g5wykMFAbo8g0EdPTn0JdaLbVhhLGEAz +wZ7lkPk2aL7Q+keYlMM0YlA4XBuqd0NSl7eOpC6FBHR2nCmO/9TFAN+33y9oWbInwxY tBnKjF5E1vnrv5h5gIsi4QphetrzG2gngP1gC6UO+/9RyFii4rDwLSvIRbOP3zLin1HP WhTsiNWXGRoHe/8Lc+DkQDuC5V1fsYMSdkqglI9mH6iFKVwGiP6aruBvq6EdmDEaJ2ar AMXEcPKNe3CRBIME7Jv6OX2uIDRWdyM/IM1hBO1I5njJLIFlJT947FDkcukqIUBZlD7d 9fzg== X-Gm-Message-State: AJcUukfSWHEyC2u5mxEk6H2dXspKfKuoAXRJye4aAMi5HT4gaV7ewK3y M4X777yVIAbqmjvKnlviolZtqidoFmt952ndtvY= X-Google-Smtp-Source: ALg8bN4nOhIkb+omddCjBHiHI7ff4g/HXxzLM4ZbJJBRHuVVn4m31h/j+TtD/rs0sGQ8JJjy23+3Ng0hnhV1O6RcmOs= X-Received: by 2002:a24:d441:: with SMTP id x62mr8200686itg.141.1547479084325; Mon, 14 Jan 2019 07:18:04 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 14 Jan 2019 16:17:52 +0100 Message-ID: To: Benjamin Morel Cc: Nikita Popov , Rowan Collins , Craig Duncan , Internals Content-Type: multipart/alternative; boundary="0000000000001e62dd057f6c8d9f" Subject: Re: [PHP-DEV] Making stdClass iterable From: ocramius@gmail.com (Marco Pivetta) --0000000000001e62dd057f6c8d9f Content-Type: text/plain; charset="UTF-8" On Mon, Jan 14, 2019 at 4:09 PM Benjamin Morel wrote: > > We should never have added stdClass. > > Why not deprecate it then, instead of extending it and giving it more > legitimacy? > This would remove some of the "2 ways of doing the same thing", such as > json_decode(). > > Ben > This. `stdClass` can't die due to a lot of backwards compatibility in existing code (wordpress loves it), but in any code I've written over the past 5 years, the first thing I'd do with it is get rid of it as fast as possible. Making it more powerful will just make the problem bigger. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --0000000000001e62dd057f6c8d9f--