Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69972 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74073 invoked from network); 30 Oct 2013 22:34:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Oct 2013 22:34:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.44 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.216.44 mail-qa0-f44.google.com Received: from [209.85.216.44] ([209.85.216.44:52087] helo=mail-qa0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2B/21-00845-76981725 for ; Wed, 30 Oct 2013 17:34:15 -0500 Received: by mail-qa0-f44.google.com with SMTP id cm18so4140356qab.10 for ; Wed, 30 Oct 2013 15:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Cr1xeejXGcts+j4Nm5fSdnUI1RKaG5OFnuYj3uY91cA=; b=auSxe2sf2uW8EEKBLH0edPzVQzC/HZmlzkpA5ncvI+SgQ4r0PlEWWfQ3LisWX1Mse6 xm3INaX9kpMr8ADeYsrrpNmfKytAvZWyhv1MbgxewWVSY6ENkeSSMUoPYshQAn0fH8v1 fnEkvh1RaHpgjwemgPK0n3JLr4UohVyent+A7xtB7hH80fcV+8xL7ZULh3KqgZhd+x5C SYYUJk3EOMwiO+ft094cKC4IYlcslt8N9A2YHkgbeQtUJd+ktOma+zFK5n0D5h1LD4ZA 4Qoa5+Zg+lkx2xiyDp+YkvHAvMvAHxqU8CwxkHP9hKZF2UsejO5uyrhTFKnH2hVfAl7r vwYQ== MIME-Version: 1.0 X-Received: by 10.49.0.208 with SMTP id 16mr8871qeg.25.1383172453031; Wed, 30 Oct 2013 15:34:13 -0700 (PDT) Sender: jakub.php@gmail.com Received: by 10.224.37.133 with HTTP; Wed, 30 Oct 2013 15:34:12 -0700 (PDT) In-Reply-To: References: Date: Wed, 30 Oct 2013 22:34:12 +0000 X-Google-Sender-Auth: ZZU9EZ247UbjnwNzzzMJSlCI40E Message-ID: To: Nikita Popov Cc: "nikic@php.net" , PHP internals list Content-Type: multipart/alternative; boundary=047d7b33d174b9e61704e9fceee8 Subject: Re: GMP serialization From: bukka@php.net (Jakub Zelenka) --047d7b33d174b9e61704e9fceee8 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Oct 30, 2013 at 9:46 PM, Nikita Popov wrote: > > As already pointed out on the php-cvs mailing list, this is not a > backwards compatibility break because it only changes implementation > details of a feature introduced in master (PHP 5.6). GMP numbers were never > serializable in any released version of PHP. Ability to serialize was added > as part of https://wiki.php.net/rfc/operator_overloading_gmp. > > Nikita > > Ok cool no prob Just tried some weird cases and think that there is an another problem. The self referencing of object don't work. The serialization data (var_hash) is not the same (you can't use unserialized references...). Try this: $n = gmp_init(42); $n->obj = $n; var_dump(unserialize(serialize($n))); (you will get really cool animation when you run it... :) ) My patch is not match better as I am getting segfault. :) I will probably have to do a bit more testing... :) Jakub --047d7b33d174b9e61704e9fceee8--