summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINADA Naoki <songofacandy@gmail.com>2010-11-03 03:19:28 +0900
committerINADA Naoki <songofacandy@gmail.com>2010-11-03 03:19:28 +0900
commitf325acb0ea8ca5e2382906d4e96d8657d8638a32 (patch)
tree2eb7ddec3279c472a207f4ae4ac9a81c996dfaf2
parentd1b6e65dd8927698ced5a3111baa4e81834850bc (diff)
parentbad69fd3977fca94d643a88d819badaca4839fd5 (diff)
downloadmsgpack-python-f325acb0ea8ca5e2382906d4e96d8657d8638a32.tar.gz
Merge branch 'master' of github.com:msgpack/msgpack
-rw-r--r--perl/Changes5
-rw-r--r--perl/lib/Data/MessagePack/PP.pm115
-rw-r--r--perl/lib/Data/MessagePack/Unpacker.pod26
-rw-r--r--perl/t/02_unpack.t5
-rw-r--r--perl/t/10_splitted_bytes.t4
-rw-r--r--perl/t/16_unpacker_for_larges.t20
-rw-r--r--perl/xs-src/unpack.c59
-rw-r--r--php/ChangeLog4
-rw-r--r--php/msgpack.c2
-rw-r--r--php/msgpack_class.c35
-rw-r--r--php/package.xml62
-rw-r--r--php/php-msgpack.spec1
-rw-r--r--php/php_msgpack.h2
-rw-r--r--php/tests/009.phpt28
-rw-r--r--php/tests/009b.phpt28
-rw-r--r--php/tests/024.phpt11
-rw-r--r--php/tests/024b.phpt11
-rw-r--r--php/tests/026.phpt52
-rw-r--r--php/tests/026b.phpt52
-rw-r--r--php/tests/028.phpt544
-rw-r--r--php/tests/028b.phpt544
-rw-r--r--php/tests/042.phpt2
-rw-r--r--php/tests/060.phpt12
-rw-r--r--php/tests/060b.phpt12
-rw-r--r--php/tests/061.phpt12
-rw-r--r--php/tests/061b.phpt12
-rw-r--r--php/tests/064.phpt315
-rw-r--r--php/tests/064b.phpt321
-rw-r--r--php/tests/065.phpt320
-rw-r--r--php/tests/065b.phpt326
-rw-r--r--php/tests/066.phpt70
-rw-r--r--php/tests/067.phpt74
-rw-r--r--php/tests/070.phpt12
-rw-r--r--php/tests/070b.phpt12
-rw-r--r--php/tests/071.phpt12
-rw-r--r--php/tests/071b.phpt12
-rw-r--r--php/tests/072.phpt12
-rw-r--r--php/tests/072b.phpt12
-rw-r--r--php/tests/073.phpt12
-rw-r--r--php/tests/073b.phpt12
40 files changed, 2355 insertions, 827 deletions
diff --git a/perl/Changes b/perl/Changes
index 486f1c3..d219b4a 100644
--- a/perl/Changes
+++ b/perl/Changes
@@ -1,3 +1,8 @@
+0.35
+
+ - address issue/20 (cho45): Data::MessagePack did not finish correctly
+ when was given devided packed data
+
0.34
- do not use the corrupt my_snprintf(%ll[du]) on win32(kazuho)
diff --git a/perl/lib/Data/MessagePack/PP.pm b/perl/lib/Data/MessagePack/PP.pm
index 5e64093..f179ad7 100644
--- a/perl/lib/Data/MessagePack/PP.pm
+++ b/perl/lib/Data/MessagePack/PP.pm
@@ -138,6 +138,7 @@ sub _unexpected {
Carp::confess("Unexpected " . sprintf(shift, @_) . " found");
}
+
#
# PACK
#
@@ -257,6 +258,10 @@ sub _pack {
our $_utf8 = 0;
my $p; # position variables for speed.
+sub _insufficient {
+ Carp::confess("Insufficient bytes (pos=$p, type=@_)");
+}
+
sub unpack :method {
$p = 0; # init
my $data = _unpack( $_[1] );
@@ -302,67 +307,51 @@ foreach my $pair(
$byte2value[ $pair->[0] ] = $pair->[1];
}
+sub _fetch_size {
+ my($value_ref, $byte, $x16, $x32, $x_fixbits) = @_;
+ if ( $byte == $x16 ) {
+ $p += 2;
+ $p <= length(${$value_ref}) or _insufficient('x/16');
+ return unpack 'n', substr( ${$value_ref}, $p - 2, 2 );
+ }
+ elsif ( $byte == $x32 ) {
+ $p += 4;
+ $p <= length(${$value_ref}) or _insufficient('x/32');
+ return unpack 'N', substr( ${$value_ref}, $p - 4, 4 );
+ }
+ else { # fix raw
+ return $byte & ~$x_fixbits;
+ }
+}
+
sub _unpack {
my ( $value ) = @_;
+ $p < length($value) or _insufficient('header byte');
# get a header byte
- my $byte = unpack "x$p C", $value; # "x$p" is faster than substr()
+ my $byte = ord( substr $value, $p, 1 );
$p++;
- Carp::croak("invalid data") unless defined $byte;
-
# +/- fixnum, nil, true, false
return $byte2value[$byte] if $typemap[$byte] & $T_DIRECT;
if ( $typemap[$byte] & $T_RAW ) {
- my $num;
- if ( $byte == 0xda ) {
- $num = CORE::unpack 'n', substr( $value, $p, 2 );
- $p += 2 + $num;
- }
- elsif ( $byte == 0xdb ) {
- $num = CORE::unpack 'N', substr( $value, $p, 4 );
- $p += 4 + $num;
- }
- else { # fix raw
- $num = $byte & ~0xa0;
- $p += $num;
- }
- my $s = substr( $value, $p - $num, $num );
+ my $size = _fetch_size(\$value, $byte, 0xda, 0xdb, 0xa0);
+ my $s = substr( $value, $p, $size );
+ length($s) == $size or _insufficient('raw');
+ $p += $size;
utf8::decode($s) if $_utf8;
return $s;
}
elsif ( $typemap[$byte] & $T_ARRAY ) {
- my $num;
- if ( $byte == 0xdc ) { # array 16
- $num = CORE::unpack 'n', substr( $value, $p, 2 );
- $p += 2;
- }
- elsif ( $byte == 0xdd ) { # array 32
- $num = CORE::unpack 'N', substr( $value, $p, 4 );
- $p += 4;
- }
- else { # fix array
- $num = $byte & ~0x90;
- }
+ my $size = _fetch_size(\$value, $byte, 0xdc, 0xdd, 0x90);
my @array;
- push @array, _unpack( $value ) while --$num >= 0;
+ push @array, _unpack( $value ) while --$size >= 0;
return \@array;
}
elsif ( $typemap[$byte] & $T_MAP ) {
- my $num;
- if ( $byte == 0xde ) { # map 16
- $num = CORE::unpack 'n', substr( $value, $p, 2 );
- $p += 2;
- }
- elsif ( $byte == 0xdf ) { # map 32
- $num = CORE::unpack 'N', substr( $value, $p, 4 );
- $p += 4;
- }
- else { # fix map
- $num = $byte & ~0x80;
- }
+ my $size = _fetch_size(\$value, $byte, 0xde, 0xdf, 0x80);
my %map;
- while ( --$num >= 0 ) {
+ while(--$size >= 0) {
no warnings; # for undef key case
my $key = _unpack( $value );
my $val = _unpack( $value );
@@ -372,41 +361,53 @@ sub _unpack {
}
elsif ( $byte == 0xcc ) { # uint8
- return CORE::unpack( 'C', substr( $value, $p++, 1 ) );
+ $p++;
+ $p <= length($value) or _insufficient('uint8');
+ return CORE::unpack( 'C', substr( $value, $p - 1, 1 ) );
}
elsif ( $byte == 0xcd ) { # uint16
$p += 2;
+ $p <= length($value) or _insufficient('uint16');
return unpack_uint16( $value, $p - 2 );
}
elsif ( $byte == 0xce ) { # unit32
$p += 4;
+ $p <= length($value) or _insufficient('uint32');
return unpack_uint32( $value, $p - 4 );
}
elsif ( $byte == 0xcf ) { # unit64
$p += 8;
+ $p <= length($value) or _insufficient('uint64');
return unpack_uint64( $value, $p - 8 );
}
elsif ( $byte == 0xd3 ) { # int64
$p += 8;
+ $p <= length($value) or _insufficient('int64');
return unpack_int64( $value, $p - 8 );
}
elsif ( $byte == 0xd2 ) { # int32
$p += 4;
+ $p <= length($value) or _insufficient('int32');
return unpack_int32( $value, $p - 4 );
}
elsif ( $byte == 0xd1 ) { # int16
$p += 2;
+ $p <= length($value) or _insufficient('int16');
return unpack_int16( $value, $p - 2 );
}
elsif ( $byte == 0xd0 ) { # int8
- return CORE::unpack 'c', substr( $value, $p++, 1 ); # c / C
+ $p++;
+ $p <= length($value) or _insufficient('int8');
+ return CORE::unpack 'c', substr( $value, $p - 1, 1 );
}
elsif ( $byte == 0xcb ) { # double
$p += 8;
+ $p <= length($value) or _insufficient('double');
return unpack_double( $value, $p - 8 );
}
elsif ( $byte == 0xca ) { # float
$p += 4;
+ $p <= length($value) or _insufficient('float');
return unpack_float( $value, $p - 4 );
}
else {
@@ -423,7 +424,11 @@ package
Data::MessagePack::PP::Unpacker;
sub new {
- bless { pos => 0, utf8 => 0 }, shift;
+ bless {
+ pos => 0,
+ utf8 => 0,
+ buff => '',
+ }, shift;
}
sub utf8 {
@@ -447,13 +452,16 @@ sub execute {
my $value = substr( $data, $offset, $limit ? $limit : length $data );
my $len = length $value;
- $self->{data} .= $value;
+ $self->{buff} .= $value;
local $self->{stack} = [];
+ #$p = 0;
+ #eval { Data::MessagePack::PP::_unpack($self->{buff}) };
+ #warn "[$p][$@]";
$p = 0;
- while ( length($self->{data}) > $p ) {
- _count( $self, $self->{data} ) or last;
+ while ( length($self->{buff}) > $p ) {
+ _count( $self, $self->{buff} ) or last;
while ( @{ $self->{stack} } > 0 && --$self->{stack}->[-1] == 0) {
pop @{ $self->{stack} };
@@ -472,6 +480,7 @@ sub execute {
sub _count {
my ( $self, $value ) = @_;
+ no warnings; # FIXME
my $byte = unpack( 'C', substr( $value, $p++, 1 ) ); # get header
Carp::croak('invalid data') unless defined $byte;
@@ -568,7 +577,7 @@ sub _count {
sub data {
my($self) = @_;
local $Data::MessagePack::PP::_utf8 = $self->{utf8};
- return Data::MessagePack->unpack( substr($self->{ data }, 0, $self->{pos}) );
+ return Data::MessagePack->unpack( substr($self->{buff}, 0, $self->{pos}) );
}
@@ -578,9 +587,9 @@ sub is_finished {
}
sub reset :method {
- $_[0]->{ data } = undef;
- $_[0]->{ pos } = 0;
- $_[0]->{ is_finished } = 0;
+ $_[0]->{buff} = '';
+ $_[0]->{pos} = 0;
+ $_[0]->{is_finished} = 0;
}
1;
diff --git a/perl/lib/Data/MessagePack/Unpacker.pod b/perl/lib/Data/MessagePack/Unpacker.pod
index 24dafd0..04cb0a4 100644
--- a/perl/lib/Data/MessagePack/Unpacker.pod
+++ b/perl/lib/Data/MessagePack/Unpacker.pod
@@ -6,11 +6,16 @@ Data::MessagePack::Unpacker - messagepack streaming deserializer
use Data::Dumper;
my $up = Data::MessagePack::Unpacker->new;
- my $ret = $up->execute($v, 0);
- if ($ret != length($v)) {
- fail "extra bytes";
+
+ open my $fh, $data or die $!;
+
+ my $offset = 0;
+ while( read($fh, my $buf, 1024) ) {
+ $offset = $up->execute($buf, $offset);
+ if($up->is_finished) {
+ print Dumper($up->data);
+ }
}
- return Dumper($up->data);
=head1 DESCRIPTION
@@ -22,7 +27,7 @@ This is a streaming deserializer for messagepack.
=item my $up = Data::MessagePack::Unpacker->new()
-creates a new instance of stream deserializer.
+creates a new instance of the stream deserializer.
=item $up->utf8([$bool])
@@ -37,14 +42,15 @@ The utf8 mode is disabled by default.
returns the utf8 mode flag of I<$up>.
-=item my $ret = $up->execute($data, $offset);
+=item $offset = $up->execute($data, $offset);
-=item my $ret = $up->execute_limit($data, $offset, $limit)
+=item $offset = $up->execute_limit($data, $offset, $limit)
- $up->execute(substr($data, 0, 3), 0);
- $up->execute($data, 3);
+parses unpacked I<$data> from I<$offset> to I<$limit>.
+returns a new offset of I<$data>, which is for the next <execute()>.
-$offset is the offset of $data.
+If I<$data> is insufficient, I<$offset> does not change, saving
+I<$data> in internal buffers.
=item my $bool = $up->is_finished();
diff --git a/perl/t/02_unpack.t b/perl/t/02_unpack.t
index 1087c40..9e471d1 100644
--- a/perl/t/02_unpack.t
+++ b/perl/t/02_unpack.t
@@ -12,7 +12,10 @@ sub unpackit {
sub pis ($$) {
is_deeply unpackit($_[0]), $_[1], 'dump ' . $_[0]
- or diag( explain(unpackit($_[0])) );
+ or do {
+ diag( 'got:', explain(unpackit($_[0])) );
+ diag( 'expected:', explain($_[1]) );
+ };
}
my @dat = do 't/data.pl' or die $@;
diff --git a/perl/t/10_splitted_bytes.t b/perl/t/10_splitted_bytes.t
index 15598f4..d94472d 100644
--- a/perl/t/10_splitted_bytes.t
+++ b/perl/t/10_splitted_bytes.t
@@ -20,8 +20,6 @@ my $input = [
my $packed = Data::MessagePack->pack($input);
foreach my $size(1 .. 16) {
- local $TODO = "Splitted byte streaming is not yet supported (bufer size: $size)";
-
my $up = Data::MessagePack::Unpacker->new();
open my $stream, '<:bytes :scalar', \$packed;
@@ -29,7 +27,7 @@ foreach my $size(1 .. 16) {
my $buff;
my $done = 0;
while( read($stream, $buff, $size) ) {
- #note "buff: ", join " ", map { unpack 'H2', $_ } split //, $buff;
+ note "buff: ", join " ", map { unpack 'H2', $_ } split //, $buff;
$done = $up->execute($buff);
}
diff --git a/perl/t/16_unpacker_for_larges.t b/perl/t/16_unpacker_for_larges.t
new file mode 100644
index 0000000..26894a2
--- /dev/null
+++ b/perl/t/16_unpacker_for_larges.t
@@ -0,0 +1,20 @@
+use strict;
+use Test::More;
+use Data::MessagePack;
+
+foreach my $data("abc", [ 'x' x 1024 ], [0xFFFF42]) {
+ my $packed = Data::MessagePack->pack($data);
+
+ my $unpacker = Data::MessagePack::Unpacker->new;
+ note "buff: ", join " ", map { unpack 'H2', $_ } split //, $packed;
+
+ foreach my $byte(split //, $packed) {
+ $unpacker->execute($byte);
+ }
+
+ ok $unpacker->is_finished, 'finished';
+ is_deeply $unpacker->data, $data, 'data';
+}
+
+done_testing;
+
diff --git a/perl/xs-src/unpack.c b/perl/xs-src/unpack.c
index db7e394..e3f62c6 100644
--- a/perl/xs-src/unpack.c
+++ b/perl/xs-src/unpack.c
@@ -9,11 +9,13 @@ typedef struct {
} my_cxt_t;
START_MY_CXT
+// context data for execute_template()
typedef struct {
bool finished;
- bool incremented;
bool utf8;
+ SV* buffer;
} unpack_user;
+#define UNPACK_USER_INIT { false, false, NULL }
#include "msgpack/unpack_define.h"
@@ -301,7 +303,7 @@ XS(xs_unpack) {
msgpack_unpack_t mp;
template_init(&mp);
- unpack_user const u = {false, false, false};
+ unpack_user const u = UNPACK_USER_INIT;
mp.user = u;
size_t from = 0;
@@ -326,14 +328,6 @@ XS(xs_unpack) {
/* ------------------------------ stream -- */
/* http://twitter.com/frsyuki/status/13249304748 */
-STATIC_INLINE void _reset(SV* const self) {
- dTHX;
- unpack_user const u = {false, false, false};
-
- UNPACKER(self, mp);
- template_init(mp);
- mp->user = u;
-}
XS(xs_unpacker_new) {
dXSARGS;
@@ -345,9 +339,14 @@ XS(xs_unpacker_new) {
msgpack_unpack_t *mp;
Newxz(mp, 1, msgpack_unpack_t);
+ template_init(mp);
+ unpack_user const u = UNPACK_USER_INIT;
+ mp->user = u;
+
+ mp->user.buffer = newSV(80);
+ sv_setpvs(mp->user.buffer, "");
sv_setref_pv(self, "Data::MessagePack::Unpacker", mp);
- _reset(self);
ST(0) = self;
XSRETURN(1);
@@ -378,21 +377,44 @@ _execute_impl(SV* const self, SV* const data, UV const offset, UV const limit) {
dTHX;
if(offset >= limit) {
- Perl_croak(aTHX_ "offset (%"UVuf") is bigger than data buffer size (%"UVuf")",
+ Perl_croak(aTHX_
+ "offset (%"UVuf") is bigger than data buffer size (%"UVuf")",
offset, limit);
}
UNPACKER(self, mp);
size_t from = offset;
- const char* const dptr = SvPV_nolen_const(data);
+ const char* dptr = SvPV_nolen_const(data);
+ STRLEN dlen = limit;
+
+ if(SvCUR(mp->user.buffer) != 0) {
+ sv_catpvn(mp->user.buffer, dptr, dlen);
+ dptr = SvPV_const(mp->user.buffer, dlen);
+ from = 0;
+ }
- int const ret = template_execute(mp, dptr, limit, &from);
+ int const ret = template_execute(mp, dptr, dlen, &from);
+ // ret < 0 : error
+ // ret == 0 : insufficient
+ // ret > 0 : success
if(ret < 0) {
- Perl_croak(aTHX_ "Data::MessagePack::Unpacker: parse error while executing");
+ Perl_croak(aTHX_
+ "Data::MessagePack::Unpacker: parse error while executing");
}
+
mp->user.finished = (ret > 0) ? true : false;
+ if(!mp->user.finished) {
+ template_init(mp); // reset the state
+ sv_setpvn(mp->user.buffer, dptr, dlen);
+ from = 0;
+ }
+ else {
+ sv_setpvs(mp->user.buffer, "");
+ }
+ //warn(">> (%d) dlen=%d, from=%d, rest=%d",
+ // (int)ret, (int)dlen, (int)from, dlen - from);
return from;
}
@@ -464,12 +486,12 @@ XS(xs_unpacker_reset) {
}
UNPACKER(ST(0), mp);
- bool const utf8 = mp->user.utf8; // save
SV* const data = template_data(mp);
SvREFCNT_dec(data);
- _reset(ST(0));
- mp->user.utf8 = utf8;
+
+ template_init(mp);
+ sv_setpvs(mp->user.buffer, "");
XSRETURN(0);
}
@@ -484,6 +506,7 @@ XS(xs_unpacker_destroy) {
SV* const data = template_data(mp);
SvREFCNT_dec(data);
+ SvREFCNT_dec(mp->user.buffer);
Safefree(mp);
XSRETURN(0);
diff --git a/php/ChangeLog b/php/ChangeLog
index 3cee3b6..3eb64e7 100644
--- a/php/ChangeLog
+++ b/php/ChangeLog
@@ -1,5 +1,9 @@
msgpack extension changelog
+Version 0.3.1
+-------------
+ * Fix class MessagePackUnpacker.
+
Version 0.3.0
-------------
* Change msgpack_unpack.c (used template)
diff --git a/php/msgpack.c b/php/msgpack.c
index 5d4f926..3b375ba 100644
--- a/php/msgpack.c
+++ b/php/msgpack.c
@@ -113,7 +113,7 @@ zend_module_entry msgpack_module_entry = {
NULL,
ZEND_MINFO(msgpack),
#if ZEND_MODULE_API_NO >= 20010901
- MSGPACK_VERSION,
+ MSGPACK_EXTENSION_VERSION,
#endif
STANDARD_MODULE_PROPERTIES
};
diff --git a/php/msgpack_class.c b/php/msgpack_class.c
index 5cfff8d..ce008d9 100644
--- a/php/msgpack_class.c
+++ b/php/msgpack_class.c
@@ -19,6 +19,7 @@ typedef struct {
msgpack_unpack_t mp;
php_unserialize_data_t var_hash;
long php_only;
+ zend_bool finished;
} php_msgpack_unpacker_t;
#if ZEND_MODULE_API_NO >= 20060613
@@ -348,6 +349,7 @@ static ZEND_METHOD(msgpack_unpacker, __construct)
unpacker->buffer.a = 0;
unpacker->retval = NULL;
unpacker->offset = 0;
+ unpacker->finished = 0;
template_init(&unpacker->mp);
@@ -460,6 +462,22 @@ static ZEND_METHOD(msgpack_unpacker, execute)
{
ALLOC_INIT_ZVAL(unpacker->retval);
}
+ else if (unpacker->finished)
+ {
+ zval_ptr_dtor(&unpacker->retval);
+
+ msgpack_unserialize_var_destroy(&unpacker->var_hash);
+
+
+ ALLOC_INIT_ZVAL(unpacker->retval);
+
+ template_init(&unpacker->mp);
+
+ msgpack_unserialize_var_init(&unpacker->var_hash);
+
+ (&unpacker->mp)->user.var_hash =
+ (php_unserialize_data_t *)&unpacker->var_hash;
+ }
(&unpacker->mp)->user.retval = (zval *)unpacker->retval;
MSGPACK_G(error_display) = 0;
@@ -483,6 +501,7 @@ static ZEND_METHOD(msgpack_unpacker, execute)
{
case MSGPACK_UNPACK_EXTRA_BYTES:
case MSGPACK_UNPACK_SUCCESS:
+ unpacker->finished = 1;
RETURN_TRUE;
default:
RETURN_FALSE;
@@ -493,7 +512,16 @@ static ZEND_METHOD(msgpack_unpacker, data)
{
MSGPACK_UNPACKER_OBJECT;
- RETURN_ZVAL(unpacker->retval, 1, 1);
+ if (unpacker->retval != NULL)
+ {
+ ZVAL_ZVAL(return_value, unpacker->retval, 1, 0);
+
+ MSGPACK_METHOD(msgpack_unpacker, reset, NULL, getThis());
+
+ return;
+ }
+
+ RETURN_FALSE;
}
static ZEND_METHOD(msgpack_unpacker, reset)
@@ -513,6 +541,7 @@ static ZEND_METHOD(msgpack_unpacker, reset)
unpacker->buffer.len = 0;
unpacker->buffer.a = 0;
unpacker->offset = 0;
+ unpacker->finished = 0;
if (buffer.len > 0)
{
@@ -530,12 +559,12 @@ static ZEND_METHOD(msgpack_unpacker, reset)
msgpack_unserialize_var_destroy(&unpacker->var_hash);
+ template_init(&unpacker->mp);
+
msgpack_unserialize_var_init(&unpacker->var_hash);
(&unpacker->mp)->user.var_hash =
(php_unserialize_data_t *)&unpacker->var_hash;
-
- msgpack_unserialize_init(&((&unpacker->mp)->user));
}
void msgpack_init_class()
diff --git a/php/package.xml b/php/package.xml
index 6172a4c..803aa97 100644
--- a/php/package.xml
+++ b/php/package.xml
@@ -10,11 +10,11 @@
<email>advect@gmail.com</email>
<active>yes</active>
</lead>
- <date>2010-09-28</date>
- <time>17:40:09</time>
+ <date>2010-10-26</date>
+ <time>13:44:47</time>
<version>
- <release>0.3.0</release>
- <api>0.3.0</api>
+ <release>0.3.1</release>
+ <api>0.3.1</api>
</version>
<stability>
<release>beta</release>
@@ -27,14 +27,14 @@
<file md5sum="12b9d8867e5fde4af426c134283e2082" name="LICENSE" role="doc" />
<file md5sum="8daeb22744f11b57da9d0966608e2fc1" name="README" role="doc" />
<file md5sum="52329b794aab67446540c4c2b5537076" name="config.m4" role="src" />
- <file md5sum="4f27f70df327b81e9392cdbb9ddcb03b" name="msgpack.c" role="src" />
- <file md5sum="f6c6a226db5fb12064e89626220fed62" name="msgpack_class.c" role="src" />
+ <file md5sum="dc485aa81a31fc9f42b2b42b3554b41b" name="msgpack.c" role="src" />
+ <file md5sum="2a27ea5a6c13c65802dcd715e00c4646" name="msgpack_class.c" role="src" />
<file md5sum="f58d228c0b7ace35fc85178f1aa2fb22" name="msgpack_class.h" role="src" />
<file md5sum="177fdfa077b5d23bc22553ad6e051ec2" name="msgpack_pack.c" role="src" />
<file md5sum="eae6797621ca53f8a7b0c2d9cb8a4d21" name="msgpack_pack.h" role="src" />
<file md5sum="1a832b3cbc1d41a2ec1a68584339c868" name="msgpack_unpack.c" role="src" />
<file md5sum="ed466f04f0608165701a5273a587de1c" name="msgpack_unpack.h" role="src" />
- <file md5sum="896b8986bbdfe2af7f6898efd2b82f90" name="php_msgpack.h" role="src" />
+ <file md5sum="61bcd8356b18d070efae7c490d00ded5" name="php_msgpack.h" role="src" />
<file md5sum="82079e9a298ecdda2122757ddfbf576e" name="msgpack/pack_define.h" role="src" />
<file md5sum="3f77e3df310b5c40a11ce7fee9cd6424" name="msgpack/pack_template.h" role="src" />
<file md5sum="09510085da29090ea0f3919c2e708f46" name="msgpack/unpack_define.h" role="src" />
@@ -49,8 +49,8 @@
<file md5sum="e0488f07f26c74d1c918634c39555d6e" name="tests/006.phpt" role="test" />
<file md5sum="9574605f18eef124b55ede353d255511" name="tests/007.phpt" role="test" />
<file md5sum="dc3584b04311da2a627c6a271a782d2c" name="tests/008.phpt" role="test" />
- <file md5sum="7804070722539804a91d0bd2c831d802" name="tests/009.phpt" role="test" />
- <file md5sum="2621e92078703654fc414fb084816c9d" name="tests/009b.phpt" role="test" />
+ <file md5sum="72fdd3007ec537174e1a0418c2e289d9" name="tests/009.phpt" role="test" />
+ <file md5sum="1fad34de86c39785c2928f93db79fee6" name="tests/009b.phpt" role="test" />
<file md5sum="ddb421cd083baaca3ce3a5263f731dcd" name="tests/010.phpt" role="test" />
<file md5sum="6a24b3b12778e2935722c97c95c9e393" name="tests/012.phpt" role="test" />
<file md5sum="377f261d48b4f7fc78689aae481ac952" name="tests/013.phpt" role="test" />
@@ -65,14 +65,14 @@
<file md5sum="40e429c52cbff763df7a7cdc27c2df2c" name="tests/021.phpt" role="test" />
<file md5sum="23a30dd1eca67eaaf5b640d2153c8c5f" name="tests/022.phpt" role="test" />
<file md5sum="2ccb3302060dbd9395879e215c9b2072" name="tests/023.phpt" role="test" />
- <file md5sum="ff8767e0976fcfee9c885d5a737d0f7c" name="tests/024.phpt" role="test" />
- <file md5sum="b2705eb1bbbe1c08e20f4b7217756248" name="tests/024b.phpt" role="test" />
+ <file md5sum="9c8a79da44818eb545aeec7e37e208b3" name="tests/024.phpt" role="test" />
+ <file md5sum="44e691093efc5f4dd93e512bf15df9f5" name="tests/024b.phpt" role="test" />
<file md5sum="5c2921e615f38d922cff04689aa61b7d" name="tests/025.phpt" role="test" />
- <file md5sum="7dd1ec82dfe82ee44f60ec520c7fd0e1" name="tests/026.phpt" role="test" />
- <file md5sum="225e04ca20c5db3becdb0f7577bcfd18" name="tests/026b.phpt" role="test" />
+ <file md5sum="1af2f7e41cee1553b2bdecbccf6dd574" name="tests/026.phpt" role="test" />
+ <file md5sum="0d4bbab97b4b6a288c5d140ab6ba5b4c" name="tests/026b.phpt" role="test" />
<file md5sum="445c65386d71ed17e1180a3fd6e608d7" name="tests/027.phpt" role="test" />
- <file md5sum="c10653ad3dcf8256d3c10fe717b2ad04" name="tests/028.phpt" role="test" />
- <file md5sum="b090a261b6539d4ba2d4275d0ba57c3f" name="tests/028b.phpt" role="test" />
+ <file md5sum="f9a2b53540d751f8d2e918758e964968" name="tests/028.phpt" role="test" />
+ <file md5sum="355cbc6cebfdd4dbd4c47ae1a8947826" name="tests/028b.phpt" role="test" />
<file md5sum="f380a42cf429a8fb72c50f9d38228109" name="tests/029.phpt" role="test" />
<file md5sum="7de90bedec2c170da12144bb3399dfe5" name="tests/030.phpt" role="test" />
<file md5sum="7ca67b854f69837658cc741ce42b8ed8" name="tests/031.phpt" role="test" />
@@ -82,22 +82,28 @@
<file md5sum="661553a8ccd9b83c95772dd9ad68d82b" name="tests/035.phpt" role="test" />
<file md5sum="2418498403672bfce1087c4b4d277d1d" name="tests/040.phpt" role="test" />
<file md5sum="011672f35987ed8e52b7c9afde98bb8d" name="tests/041.phpt" role="test" />
- <file md5sum="ac28799e22762ff27e331aa060a792ad" name="tests/042.phpt" role="test" />
+ <file md5sum="1073706e82b72a1c845d09273d95b256" name="tests/042.phpt" role="test" />
<file md5sum="57478f4e95bd000bf73a8331e9e19cba" name="tests/050.phpt" role="test" />
- <file md5sum="c34e0f1af0f9b79dc045d9839d36603c" name="tests/060.phpt" role="test" />
- <file md5sum="591715d0a8437e44e02af2ec55a82a34" name="tests/060b.phpt" role="test" />
- <file md5sum="e42dba2b4d02b74dad7f776a44c8e2fe" name="tests/061.phpt" role="test" />
- <file md5sum="75ca37fe17423cddac6ddde324d6b1ec" name="tests/061b.phpt" role="test" />
+ <file md5sum="3067fa10e2d27c2823b648d0452c8c46" name="tests/060.phpt" role="test" />
+ <file md5sum="b42eb220260d4fe1e840d314b53a1add" name="tests/060b.phpt" role="test" />
+ <file md5sum="c1e8716a879b568185e7eb38ee7dc76c" name="tests/061.phpt" role="test" />
+ <file md5sum="0d9597d63ca6fcb5040e0994049766b1" name="tests/061b.phpt" role="test" />
<file md5sum="187689f3d1d8fe3636ea7d6188e7e559" name="tests/062.phpt" role="test" />
<file md5sum="9c91266595d01080b813fb2a056fca82" name="tests/063.phpt" role="test" />
- <file md5sum="18c088d2ee24af0caa758ffbe92321c9" name="tests/070.phpt" role="test" />
- <file md5sum="2f89e6a4efe59bc9491aa77af31e65fd" name="tests/070b.phpt" role="test" />
- <file md5sum="c82b42c39192fd9dcc6ddcf61e7c6c63" name="tests/071.phpt" role="test" />
- <file md5sum="a2f836fa16af5f01819fd2529a783803" name="tests/071b.phpt" role="test" />
- <file md5sum="ca1f561229e54efd2bebc99378d1dac1" name="tests/072.phpt" role="test" />
- <file md5sum="02c2644ba84bb1d78fa66e7706460edc" name="tests/072b.phpt" role="test" />
- <file md5sum="e725faa855f9760fce4815944d439c0b" name="tests/073.phpt" role="test" />
- <file md5sum="96b234f889dd6d391db24a21eac55cf6" name="tests/073b.phpt" role="test" />
+ <file md5sum="3bd5fc0384a9628064ae34886de6dcab" name="tests/064.phpt" role="test" />
+ <file md5sum="7077fa1fbf3290e8fdf8d963fd2c7d97" name="tests/064b.phpt" role="test" />
+ <file md5sum="c0ba5f5b4d8c7751a4643cd9946fe9da" name="tests/065.phpt" role="test" />
+ <file md5sum="1b3763cd9ed063eb733c5e18d726273e" name="tests/065b.phpt" role="test" />
+ <file md5sum="bad0c2dee56d9f7a8dd0161ed863915e" name="tests/066.phpt" role="test" />
+ <file md5sum="d15e923a2bca68f5fb7e285da725c248" name="tests/067.phpt" role="test" />
+ <file md5sum="337d4cd9d5fe8f903ab093131028a7e7" name="tests/070.phpt" role="test" />
+ <file md5sum="39fcd79bf09d3edb0c66c301ec5c9095" name="tests/070b.phpt" role="test" />
+ <file md5sum="f36922baf1228fbb306b1a1104d5b1d2" name="tests/071.phpt" role="test" />
+ <file md5sum="c75ab77ffcd25d21d31a3889b2f6fa3f" name="tests/071b.phpt" role="test" />
+ <file md5sum="0ffca7b01df0131c7093c870f30afd60" name="tests/072.phpt" role="test" />
+ <file md5sum="82c166252f9b775316b22e0082b6354e" name="tests/072b.phpt" role="test" />
+ <file md5sum="4050391dae2825de90a836828ac21ea9" name="tests/073.phpt" role="test" />
+ <file md5sum="0dc3daedec3e152ec08db132e28c6015" name="tests/073b.phpt" role="test" />
<file md5sum="50ef1b19cea2b81bcb7cf3f3ff1d040b" name="tests/080.phpt" role="test" />
<file md5sum="5ee3dfab84acdee232622aae101ec146" name="tests/081.phpt" role="test" />
<file md5sum="c7f9bb84e313d1d675318373938c026a" name="tests/082.phpt" role="test" />
diff --git a/php/php-msgpack.spec b/php/php-msgpack.spec
index 6a98288..7609ca4 100644
--- a/php/php-msgpack.spec
+++ b/php/php-msgpack.spec
@@ -12,7 +12,6 @@ Packager: advect <advect@gmail.com>
Provides: php-pecl-msgpack
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: php-devel
-Requires: msgpack
%if 0%{?php_zend_api}
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
diff --git a/php/php_msgpack.h b/php/php_msgpack.h
index 61badea..0791deb 100644
--- a/php/php_msgpack.h
+++ b/php/php_msgpack.h
@@ -2,7 +2,7 @@
#ifndef PHP_MSGPACK_H
#define PHP_MSGPACK_H
-#define MSGPACK_EXTENSION_VERSION "0.3.0"
+#define MSGPACK_EXTENSION_VERSION "0.3.1"
#include "ext/standard/php_smart_str.h"
diff --git a/php/tests/009.phpt b/php/tests/009.phpt
index 9992988..a1534c9 100644
--- a/php/tests/009.phpt
+++ b/php/tests/009.phpt
@@ -2,8 +2,8 @@
Check for reference serialization
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
- echo "skip tests in PHP 5.3.2 and lower";
+if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
+ echo "skip tests in PHP 5.3.3 or newer";
}
--FILE--
<?php
@@ -74,13 +74,7 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- &array(1) {
- [0]=>
- &array(1) {
- [0]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
}
@@ -91,13 +85,7 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- &array(1) {
- [0]=>
- &array(1) {
- [0]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
}
@@ -107,13 +95,7 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- &array(1) {
- [0]=>
- &array(1) {
- [0]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
}
diff --git a/php/tests/009b.phpt b/php/tests/009b.phpt
index 7765d62..10e7259 100644
--- a/php/tests/009b.phpt
+++ b/php/tests/009b.phpt
@@ -2,8 +2,8 @@
Check for reference serialization
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
- echo "skip tests in PHP 5.3.3";
+if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
+ echo "skip tests in PHP 5.3.2 or older";
}
--FILE--
<?php
@@ -74,7 +74,13 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- *RECURSION*
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ *RECURSION*
+ }
+ }
}
}
}
@@ -85,7 +91,13 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- *RECURSION*
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ *RECURSION*
+ }
+ }
}
}
}
@@ -95,7 +107,13 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- *RECURSION*
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ *RECURSION*
+ }
+ }
}
}
}
diff --git a/php/tests/024.phpt b/php/tests/024.phpt
index 9b185f7..97db2a7 100644
--- a/php/tests/024.phpt
+++ b/php/tests/024.phpt
@@ -2,8 +2,8 @@
Recursive objects
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
- echo "skip tests in PHP 5.3.2 and lower";
+if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
+ echo "skip tests in PHP 5.3.3 or newer";
}
--FILE--
<?php
@@ -160,11 +160,6 @@ object(Obj4)#%d (2) {
[%r"?a"?:("Obj4":)?private"?%r]=>
int(100)
[%r"?obj"?:("Obj4":)?private"?%r]=>
- object(Obj4)#%d (2) {
- [%r"?a"?:("Obj4":)?private"?%r]=>
- int(100)
- [%r"?obj"?:("Obj4":)?private"?%r]=>
- *RECURSION*
- }
+ *RECURSION*
}
OK
diff --git a/php/tests/024b.phpt b/php/tests/024b.phpt
index 7c691be..c7612d7 100644
--- a/php/tests/024b.phpt
+++ b/php/tests/024b.phpt
@@ -2,8 +2,8 @@
Recursive objects
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
- echo "skip tests in PHP 5.3.3";
+if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
+ echo "skip tests in PHP 5.3.2 or older";
}
--FILE--
<?php
@@ -160,6 +160,11 @@ object(Obj4)#%d (2) {
[%r"?a"?:("Obj4":)?private"?%r]=>
int(100)
[%r"?obj"?:("Obj4":)?private"?%r]=>
- *RECURSION*
+ object(Obj4)#%d (2) {
+ [%r"?a"?:("Obj4":)?private"?%r]=>
+ int(100)
+ [%r"?obj"?:("Obj4":)?private"?%r]=>
+ *RECURSION*
+ }
}
OK
diff --git a/php/tests/026.phpt b/php/tests/026.phpt
index c243ef5..383289d 100644
--- a/php/tests/026.phpt
+++ b/php/tests/026.phpt
@@ -3,8 +3,8 @@ Cyclic array test
--INI--
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
- echo "skip tests in PHP 5.3.2 and lower";
+if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
+ echo "skip tests in PHP 5.3.3 or newer";
}
--FILE--
<?php
@@ -62,17 +62,7 @@ array(2) {
string(1) "e"
}
["f"]=>
- &array(2) {
- ["a"]=>
- array(2) {
- ["b"]=>
- string(1) "c"
- ["d"]=>
- string(1) "e"
- }
- ["f"]=>
- *RECURSION*
- }
+ *RECURSION*
}
}
OK
@@ -84,17 +74,7 @@ array(1) {
[1]=>
int(2)
[2]=>
- array(1) {
- ["foo"]=>
- &array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
array(1) {
@@ -107,17 +87,7 @@ array(1) {
[2]=>
array(1) {
["foo"]=>
- &array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- array(1) {
- ["foo"]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
}
@@ -131,17 +101,7 @@ array(1) {
[2]=>
array(1) {
["foo"]=>
- &array(3) {
- [0]=>
- int(1)
- [1]=>
- string(1) "b"
- [2]=>
- array(1) {
- ["foo"]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
}
diff --git a/php/tests/026b.phpt b/php/tests/026b.phpt
index f7a3381..9eef7cb 100644
--- a/php/tests/026b.phpt
+++ b/php/tests/026b.phpt
@@ -3,8 +3,8 @@ Cyclic array test
--INI--
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
- echo "skip tests in PHP 5.3.3";
+if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
+ echo "skip tests in PHP 5.3.2 or older";
}
--FILE--
<?php
@@ -62,7 +62,17 @@ array(2) {
string(1) "e"
}
["f"]=>
- *RECURSION*
+ &array(2) {
+ ["a"]=>
+ array(2) {
+ ["b"]=>
+ string(1) "c"
+ ["d"]=>
+ string(1) "e"
+ }
+ ["f"]=>
+ *RECURSION*
+ }
}
}
OK
@@ -74,7 +84,17 @@ array(1) {
[1]=>
int(2)
[2]=>
- *RECURSION*
+ array(1) {
+ ["foo"]=>
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ *RECURSION*
+ }
+ }
}
}
array(1) {
@@ -87,7 +107,17 @@ array(1) {
[2]=>
array(1) {
["foo"]=>
- *RECURSION*
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ array(1) {
+ ["foo"]=>
+ *RECURSION*
+ }
+ }
}
}
}
@@ -101,7 +131,17 @@ array(1) {
[2]=>
array(1) {
["foo"]=>
- *RECURSION*
+ &array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ string(1) "b"
+ [2]=>
+ array(1) {
+ ["foo"]=>
+ *RECURSION*
+ }
+ }
}
}
}
diff --git a/php/tests/028.phpt b/php/tests/028.phpt
index 00db675..1d326ce 100644
--- a/php/tests/028.phpt
+++ b/php/tests/028.phpt
@@ -2,8 +2,8 @@
Serialize object into session, full set
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
- echo "skip tests in PHP 5.3.2 and lower";
+if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
+ echo "skip tests in PHP 5.3.3 or newer";
}
--FILE--
<?php
@@ -107,281 +107,29 @@ array(3) {
[%r"?d1"?:("Foo":)?private"?%r]=>
object(Bar)#4 (3) {
["d1"]=>
- object(Foo)#3 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- [%r"?d2"?:protected"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- ["d3"]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- }
+ *RECURSION*
[%r"?d2"?:("Bar":)?private"?%r]=>
- object(Foo)#3 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- [%r"?d2"?:protected"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- ["d3"]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- }
+ *RECURSION*
[%r"?d3"?:protected"?%r]=>
- object(Foo)#3 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- [%r"?d2"?:protected"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- ["d3"]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
[%r"?d2"?:protected"?%r]=>
object(Bar)#4 (3) {
["d1"]=>
- object(Foo)#3 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- [%r"?d2"?:protected"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- ["d3"]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- }
+ *RECURSION*
[%r"?d2"?:("Bar":)?private"?%r]=>
- object(Foo)#3 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- [%r"?d2"?:protected"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- ["d3"]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- }
+ *RECURSION*
[%r"?d3"?:protected"?%r]=>
- object(Foo)#3 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- [%r"?d2"?:protected"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- ["d3"]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
["d3"]=>
object(Bar)#4 (3) {
["d1"]=>
- object(Foo)#3 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- [%r"?d2"?:protected"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- ["d3"]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- }
+ *RECURSION*
[%r"?d2"?:("Bar":)?private"?%r]=>
- object(Foo)#3 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- [%r"?d2"?:protected"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- ["d3"]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- }
+ *RECURSION*
[%r"?d3"?:protected"?%r]=>
- object(Foo)#3 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- [%r"?d2"?:protected"?%r]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- ["d3"]=>
- object(Bar)#4 (3) {
- ["d1"]=>
- *RECURSION*
- [%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
- [%r"?d3"?:protected"?%r]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
["test"]=>
@@ -391,281 +139,29 @@ array(3) {
["d1"]=>
object(Foo)#6 (3) {
[%r"?d1"?:("Foo":)?private"?%r]=>
- object(Bar)#5 (3) {
- ["d1"]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d2"?:("Bar":)?private"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d3"?:protected"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- }
+ *RECURSION*
[%r"?d2"?:protected"?%r]=>
- object(Bar)#5 (3) {
- ["d1"]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d2"?:("Bar":)?private"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d3"?:protected"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- }
+ *RECURSION*
["d3"]=>
- object(Bar)#5 (3) {
- ["d1"]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d2"?:("Bar":)?private"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d3"?:protected"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
[%r"?d2"?:("Bar":)?private"?%r]=>
object(Foo)#6 (3) {
[%r"?d1"?:("Foo":)?private"?%r]=>
- object(Bar)#5 (3) {
- ["d1"]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d2"?:("Bar":)?private"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d3"?:protected"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- }
+ *RECURSION*
[%r"?d2"?:protected"?%r]=>
- object(Bar)#5 (3) {
- ["d1"]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d2"?:("Bar":)?private"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d3"?:protected"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- }
+ *RECURSION*
["d3"]=>
- object(Bar)#5 (3) {
- ["d1"]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d2"?:("Bar":)?private"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d3"?:protected"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
[%r"?d3"?:protected"?%r]=>
object(Foo)#6 (3) {
[%r"?d1"?:("Foo":)?private"?%r]=>
- object(Bar)#5 (3) {
- ["d1"]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d2"?:("Bar":)?private"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d3"?:protected"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- }
+ *RECURSION*
[%r"?d2"?:protected"?%r]=>
- object(Bar)#5 (3) {
- ["d1"]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d2"?:("Bar":)?private"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d3"?:protected"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- }
+ *RECURSION*
["d3"]=>
- object(Bar)#5 (3) {
- ["d1"]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d2"?:("Bar":)?private"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- [%r"?d3"?:protected"?%r]=>
- object(Foo)#6 (3) {
- [%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
- [%r"?d2"?:protected"?%r]=>
- *RECURSION*
- ["d3"]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
}
diff --git a/php/tests/028b.phpt b/php/tests/028b.phpt
index 7331a57..0efba18 100644
--- a/php/tests/028b.phpt
+++ b/php/tests/028b.phpt
@@ -2,8 +2,8 @@
Serialize object into session, full set
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
- echo "skip tests in PHP 5.3.3";
+if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
+ echo "skip tests in PHP 5.3.2 or older";
}
--FILE--
<?php
@@ -107,29 +107,281 @@ array(3) {
[%r"?d1"?:("Foo":)?private"?%r]=>
object(Bar)#4 (3) {
["d1"]=>
- *RECURSION*
+ object(Foo)#3 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:protected"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ ["d3"]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ }
[%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
+ object(Foo)#3 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:protected"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ ["d3"]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ }
[%r"?d3"?:protected"?%r]=>
- *RECURSION*
+ object(Foo)#3 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:protected"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ ["d3"]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ }
}
[%r"?d2"?:protected"?%r]=>
object(Bar)#4 (3) {
["d1"]=>
- *RECURSION*
+ object(Foo)#3 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:protected"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ ["d3"]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ }
[%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
+ object(Foo)#3 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:protected"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ ["d3"]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ }
[%r"?d3"?:protected"?%r]=>
- *RECURSION*
+ object(Foo)#3 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:protected"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ ["d3"]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ }
}
["d3"]=>
object(Bar)#4 (3) {
["d1"]=>
- *RECURSION*
+ object(Foo)#3 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:protected"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ ["d3"]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ }
[%r"?d2"?:("Bar":)?private"?%r]=>
- *RECURSION*
+ object(Foo)#3 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:protected"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ ["d3"]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ }
[%r"?d3"?:protected"?%r]=>
- *RECURSION*
+ object(Foo)#3 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:protected"?%r]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ ["d3"]=>
+ object(Bar)#4 (3) {
+ ["d1"]=>
+ *RECURSION*
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d3"?:protected"?%r]=>
+ *RECURSION*
+ }
+ }
}
}
["test"]=>
@@ -139,29 +391,281 @@ array(3) {
["d1"]=>
object(Foo)#6 (3) {
[%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
+ object(Bar)#5 (3) {
+ ["d1"]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d3"?:protected"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ }
[%r"?d2"?:protected"?%r]=>
- *RECURSION*
+ object(Bar)#5 (3) {
+ ["d1"]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d3"?:protected"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ }
["d3"]=>
- *RECURSION*
+ object(Bar)#5 (3) {
+ ["d1"]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d3"?:protected"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ }
}
[%r"?d2"?:("Bar":)?private"?%r]=>
object(Foo)#6 (3) {
[%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
+ object(Bar)#5 (3) {
+ ["d1"]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d3"?:protected"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ }
[%r"?d2"?:protected"?%r]=>
- *RECURSION*
+ object(Bar)#5 (3) {
+ ["d1"]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d3"?:protected"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ }
["d3"]=>
- *RECURSION*
+ object(Bar)#5 (3) {
+ ["d1"]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d3"?:protected"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ }
}
[%r"?d3"?:protected"?%r]=>
object(Foo)#6 (3) {
[%r"?d1"?:("Foo":)?private"?%r]=>
- *RECURSION*
+ object(Bar)#5 (3) {
+ ["d1"]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d3"?:protected"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ }
[%r"?d2"?:protected"?%r]=>
- *RECURSION*
+ object(Bar)#5 (3) {
+ ["d1"]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d3"?:protected"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ }
["d3"]=>
- *RECURSION*
+ object(Bar)#5 (3) {
+ ["d1"]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d2"?:("Bar":)?private"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ [%r"?d3"?:protected"?%r]=>
+ object(Foo)#6 (3) {
+ [%r"?d1"?:("Foo":)?private"?%r]=>
+ *RECURSION*
+ [%r"?d2"?:protected"?%r]=>
+ *RECURSION*
+ ["d3"]=>
+ *RECURSION*
+ }
+ }
}
}
}
diff --git a/php/tests/042.phpt b/php/tests/042.phpt
index 2ba73ac..83e8bc7 100644
--- a/php/tests/042.phpt
+++ b/php/tests/042.phpt
@@ -3,7 +3,7 @@ Closure
--SKIPIF--
<?php
if (version_compare(PHP_VERSION, '5.3.0') < 0) {
- echo "skip closures only for PHP 5.3.0+";
+ echo "skip closures only for PHP 5.3.0 or newer";
}
--FILE--
<?php
diff --git a/php/tests/060.phpt b/php/tests/060.phpt
index 649d788..3ea97eb 100644
--- a/php/tests/060.phpt
+++ b/php/tests/060.phpt
@@ -2,8 +2,8 @@
Check for buffered streaming unserialization
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
- echo "skip tests in PHP 5.3.2 and lower";
+if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
+ echo "skip tests in PHP 5.3.3 or newer";
}
--FILE--
<?php
@@ -240,13 +240,7 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- &array(1) {
- [0]=>
- &array(1) {
- [0]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
}
diff --git a/php/tests/060b.phpt b/php/tests/060b.phpt
index 0b947c8..a2e50bc 100644
--- a/php/tests/060b.phpt
+++ b/php/tests/060b.phpt
@@ -2,8 +2,8 @@
Check for buffered streaming unserialization
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
- echo "skip tests in PHP 5.3.3";
+if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
+ echo "skip tests in PHP 5.3.2 or older";
}
--FILE--
<?php
@@ -240,7 +240,13 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- *RECURSION*
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ *RECURSION*
+ }
+ }
}
}
}
diff --git a/php/tests/061.phpt b/php/tests/061.phpt
index 7ecc0c9..2b42d31 100644
--- a/php/tests/061.phpt
+++ b/php/tests/061.phpt
@@ -2,8 +2,8 @@
Check for unbuffered streaming unserialization
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
- echo "skip tests in PHP 5.3.2 and lower";
+if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
+ echo "skip tests in PHP 5.3.3 or newer";
}
--FILE--
<?php
@@ -245,13 +245,7 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- &array(1) {
- [0]=>
- &array(1) {
- [0]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
}
diff --git a/php/tests/061b.phpt b/php/tests/061b.phpt
index efb3a9b..21706db 100644
--- a/php/tests/061b.phpt
+++ b/php/tests/061b.phpt
@@ -2,8 +2,8 @@
Check for unbuffered streaming unserialization
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
- echo "skip tests in PHP 5.3.3";
+if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
+ echo "skip tests in PHP 5.3.2 or older";
}
--FILE--
<?php
@@ -245,7 +245,13 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- *RECURSION*
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ *RECURSION*
+ }
+ }
}
}
}
diff --git a/php/tests/064.phpt b/php/tests/064.phpt
new file mode 100644
index 0000000..a7a2f3b
--- /dev/null
+++ b/php/tests/064.phpt
@@ -0,0 +1,315 @@
+--TEST--
+Check for buffered streaming unserialization (single)
+--SKIPIF--
+<?php
+if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
+ echo "skip tests in PHP 5.3.3 or newer";
+}
+--FILE--
+<?php
+if(!extension_loaded('msgpack')) {
+ dl('msgpack.' . PHP_SHLIB_SUFFIX);
+}
+
+$unpacker = new MessagePackUnpacker();
+
+function test($type, $variable, $test = null) {
+ $serialized = msgpack_serialize($variable);
+
+ global $unpacker;
+
+ $length = strlen($serialized);
+
+ for ($i = 0; $i < $length;) {
+ $len = rand(1, 10);
+ $str = substr($serialized, $i, $len);
+
+ $unpacker->feed($str);
+ if ($unpacker->execute())
+ {
+ $unserialized = $unpacker->data();
+ var_dump($unserialized);
+ $unpacker->reset();
+ }
+
+ $i += $len;
+ }
+
+ if (!is_bool($test))
+ {
+ echo $unserialized === $variable ? 'OK' : 'ERROR', PHP_EOL;
+ }
+ else
+ {
+ echo $test || $unserialized == $variable ? 'OK' : 'ERROR', PHP_EOL;
+ }
+}
+
+test('null', null);
+
+test('bool: true', true);
+test('bool: false', false);
+
+test('zero: 0', 0);
+test('small: 1', 1);
+test('small: -1', -1);
+test('medium: 1000', 1000);
+test('medium: -1000', -1000);
+test('large: 100000', 100000);
+test('large: -100000', -100000);
+
+test('double: 123.456', 123.456);
+
+test('empty: ""', "");
+test('string: "foobar"', "foobar");
+
+test('array', array(), false);
+test('array(1, 2, 3)', array(1, 2, 3), false);
+test('array(array(1, 2, 3), arr...', array(array(1, 2, 3), array(4, 5, 6), array(7, 8, 9)), false);
+
+test('array("foo", "foo", "foo")', array("foo", "foo", "foo"), false);
+test('array("one" => 1, "two" => 2))', array("one" => 1, "two" => 2), false);
+test('array("kek" => "lol", "lol" => "kek")', array("kek" => "lol", "lol" => "kek"), false);
+test('array("" => "empty")', array("" => "empty"), false);
+
+$a = array('foo');
+test('array($a, $a)', array($a, $a), false);
+test('array(&$a, &$a)', array(&$a, &$a), false);
+
+$a = array(null);
+$b = array(&$a);
+$a[0] = &$b;
+
+test('cyclic', $a, true);
+
+$a = array(
+ 'a' => array(
+ 'b' => 'c',
+ 'd' => 'e'
+ ),
+ 'f' => array(
+ 'g' => 'h'
+ )
+ );
+
+test('array', $a, false);
+
+class Obj {
+ public $a;
+ protected $b;
+ private $c;
+
+ function __construct($a, $b, $c) {
+ $this->a = $a;
+ $this->b = $b;
+ $this->c = $c;
+ }
+}
+
+test('object', new Obj(1, 2, 3), false);
+
+test('object', array(new Obj(1, 2, 3), new Obj(4, 5, 6)), false);
+
+$o = new Obj(1, 2, 3);
+
+test('object', array(&$o, &$o), false);
+--EXPECTF--
+NULL
+OK
+bool(true)
+OK
+bool(false)
+OK
+int(0)
+OK
+int(1)
+OK
+int(-1)
+OK
+int(1000)
+OK
+int(-1000)
+OK
+int(100000)
+OK
+int(-100000)
+OK
+float(123.456)
+OK
+string(0) ""
+OK
+string(6) "foobar"
+OK
+array(0) {
+}
+OK
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+OK
+array(3) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(4)
+ [1]=>
+ int(5)
+ [2]=>
+ int(6)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(7)
+ [1]=>
+ int(8)
+ [2]=>
+ int(9)
+ }
+}
+OK
+array(3) {
+ [0]=>
+ string(3) "foo"
+ [1]=>
+ string(3) "foo"
+ [2]=>
+ string(3) "foo"
+}
+OK
+array(2) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+OK
+array(2) {
+ ["kek"]=>
+ string(3) "lol"
+ ["lol"]=>
+ string(3) "kek"
+}
+OK
+array(1) {
+ [""]=>
+ string(5) "empty"
+}
+OK
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+}
+OK
+array(2) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+ [1]=>
+ &array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+}
+OK
+array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ *RECURSION*
+ }
+ }
+}
+OK
+array(2) {
+ ["a"]=>
+ array(2) {
+ ["b"]=>
+ string(1) "c"
+ ["d"]=>
+ string(1) "e"
+ }
+ ["f"]=>
+ array(1) {
+ ["g"]=>
+ string(1) "h"
+ }
+}
+OK
+object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+}
+OK
+array(2) {
+ [0]=>
+ object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+ }
+ [1]=>
+ object(Obj)#%d (3) {
+ ["a"]=>
+ int(4)
+ [%r"?b"?:protected"?%r]=>
+ int(5)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(6)
+ }
+}
+OK
+array(2) {
+ [0]=>
+ &object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+ }
+ [1]=>
+ &object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+ }
+}
+OK
diff --git a/php/tests/064b.phpt b/php/tests/064b.phpt
new file mode 100644
index 0000000..aba7a2d
--- /dev/null
+++ b/php/tests/064b.phpt
@@ -0,0 +1,321 @@
+--TEST--
+Check for buffered streaming unserialization (single)
+--SKIPIF--
+<?php
+if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
+ echo "skip tests in PHP 5.3.2 or older";
+}
+--FILE--
+<?php
+if(!extension_loaded('msgpack')) {
+ dl('msgpack.' . PHP_SHLIB_SUFFIX);
+}
+
+$unpacker = new MessagePackUnpacker();
+
+function test($type, $variable, $test = null) {
+ $serialized = msgpack_serialize($variable);
+
+ global $unpacker;
+
+ $length = strlen($serialized);
+
+ for ($i = 0; $i < $length;) {
+ $len = rand(1, 10);
+ $str = substr($serialized, $i, $len);
+
+ $unpacker->feed($str);
+ if ($unpacker->execute())
+ {
+ $unserialized = $unpacker->data();
+ var_dump($unserialized);
+ $unpacker->reset();
+ }
+
+ $i += $len;
+ }
+
+ if (!is_bool($test))
+ {
+ echo $unserialized === $variable ? 'OK' : 'ERROR', PHP_EOL;
+ }
+ else
+ {
+ echo $test || $unserialized == $variable ? 'OK' : 'ERROR', PHP_EOL;
+ }
+}
+
+test('null', null);
+
+test('bool: true', true);
+test('bool: false', false);
+
+test('zero: 0', 0);
+test('small: 1', 1);
+test('small: -1', -1);
+test('medium: 1000', 1000);
+test('medium: -1000', -1000);
+test('large: 100000', 100000);
+test('large: -100000', -100000);
+
+test('double: 123.456', 123.456);
+
+test('empty: ""', "");
+test('string: "foobar"', "foobar");
+
+test('array', array(), false);
+test('array(1, 2, 3)', array(1, 2, 3), false);
+test('array(array(1, 2, 3), arr...', array(array(1, 2, 3), array(4, 5, 6), array(7, 8, 9)), false);
+
+test('array("foo", "foo", "foo")', array("foo", "foo", "foo"), false);
+test('array("one" => 1, "two" => 2))', array("one" => 1, "two" => 2), false);
+test('array("kek" => "lol", "lol" => "kek")', array("kek" => "lol", "lol" => "kek"), false);
+test('array("" => "empty")', array("" => "empty"), false);
+
+$a = array('foo');
+test('array($a, $a)', array($a, $a), false);
+test('array(&$a, &$a)', array(&$a, &$a), false);
+
+$a = array(null);
+$b = array(&$a);
+$a[0] = &$b;
+
+test('cyclic', $a, true);
+
+$a = array(
+ 'a' => array(
+ 'b' => 'c',
+ 'd' => 'e'
+ ),
+ 'f' => array(
+ 'g' => 'h'
+ )
+ );
+
+test('array', $a, false);
+
+class Obj {
+ public $a;
+ protected $b;
+ private $c;
+
+ function __construct($a, $b, $c) {
+ $this->a = $a;
+ $this->b = $b;
+ $this->c = $c;
+ }
+}
+
+test('object', new Obj(1, 2, 3), false);
+
+test('object', array(new Obj(1, 2, 3), new Obj(4, 5, 6)), false);
+
+$o = new Obj(1, 2, 3);
+
+test('object', array(&$o, &$o), false);
+--EXPECTF--
+NULL
+OK
+bool(true)
+OK
+bool(false)
+OK
+int(0)
+OK
+int(1)
+OK
+int(-1)
+OK
+int(1000)
+OK
+int(-1000)
+OK
+int(100000)
+OK
+int(-100000)
+OK
+float(123.456)
+OK
+string(0) ""
+OK
+string(6) "foobar"
+OK
+array(0) {
+}
+OK
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+OK
+array(3) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(4)
+ [1]=>
+ int(5)
+ [2]=>
+ int(6)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(7)
+ [1]=>
+ int(8)
+ [2]=>
+ int(9)
+ }
+}
+OK
+array(3) {
+ [0]=>
+ string(3) "foo"
+ [1]=>
+ string(3) "foo"
+ [2]=>
+ string(3) "foo"
+}
+OK
+array(2) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+OK
+array(2) {
+ ["kek"]=>
+ string(3) "lol"
+ ["lol"]=>
+ string(3) "kek"
+}
+OK
+array(1) {
+ [""]=>
+ string(5) "empty"
+}
+OK
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+}
+OK
+array(2) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+ [1]=>
+ &array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+}
+OK
+array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ *RECURSION*
+ }
+ }
+ }
+ }
+}
+OK
+array(2) {
+ ["a"]=>
+ array(2) {
+ ["b"]=>
+ string(1) "c"
+ ["d"]=>
+ string(1) "e"
+ }
+ ["f"]=>
+ array(1) {
+ ["g"]=>
+ string(1) "h"
+ }
+}
+OK
+object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+}
+OK
+array(2) {
+ [0]=>
+ object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+ }
+ [1]=>
+ object(Obj)#%d (3) {
+ ["a"]=>
+ int(4)
+ [%r"?b"?:protected"?%r]=>
+ int(5)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(6)
+ }
+}
+OK
+array(2) {
+ [0]=>
+ &object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+ }
+ [1]=>
+ &object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+ }
+}
+OK
diff --git a/php/tests/065.phpt b/php/tests/065.phpt
new file mode 100644
index 0000000..c37ca12
--- /dev/null
+++ b/php/tests/065.phpt
@@ -0,0 +1,320 @@
+--TEST--
+Check for unbuffered streaming unserialization (single)
+--SKIPIF--
+<?php
+if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
+ echo "skip tests in PHP 5.3.3 or newer";
+}
+--FILE--
+<?php
+if(!extension_loaded('msgpack')) {
+ dl('msgpack.' . PHP_SHLIB_SUFFIX);
+}
+
+$unpacker = new MessagePackUnpacker();
+
+function test($type, $variable, $test = null) {
+ $serialized = msgpack_serialize($variable);
+
+ global $unpacker;
+
+ $length = strlen($serialized);
+
+ $str = "";
+ $offset = 0;
+
+ for ($i = 0; $i < $length;) {
+ $len = rand(1, 10);
+ $str .= substr($serialized, $i, $len);
+
+ if ($unpacker->execute($str, $offset))
+ {
+ $unserialized = $unpacker->data();
+ var_dump($unserialized);
+
+ $unpacker->reset();
+ $str = "";
+ $offset = 0;
+ }
+
+ $i += $len;
+ }
+
+ if (!is_bool($test))
+ {
+ echo $unserialized === $variable ? 'OK' : 'ERROR', PHP_EOL;
+ }
+ else
+ {
+ echo $test || $unserialized == $variable ? 'OK' : 'ERROR', PHP_EOL;
+ }
+}
+
+test('null', null);
+
+test('boo:l true', true);
+test('bool: true', false);
+
+test('zero: 0', 0);
+test('small: 1', 1);
+test('small: -1', -1);
+test('medium: 1000', 1000);
+test('medium: -1000', -1000);
+test('large: 100000', 100000);
+test('large: -100000', -100000);
+
+test('double: 123.456', 123.456);
+
+test('empty: ""', "");
+test('string: "foobar"', "foobar");
+
+test('empty: array', array(), false);
+test('empty: array(1, 2, 3)', array(1, 2, 3), false);
+test('empty: array(array(1, 2, 3), arr...', array(array(1, 2, 3), array(4, 5, 6), array(7, 8, 9)), false);
+
+test('array("foo", "foo", "foo")', array("foo", "foo", "foo"), false);
+test('array("one" => 1, "two" => 2))', array("one" => 1, "two" => 2), false);
+test('array("kek" => "lol", "lol" => "kek")', array("kek" => "lol", "lol" => "kek"), false);
+test('array("" => "empty")', array("" => "empty"), false);
+
+$a = array('foo');
+test('array($a, $a)', array($a, $a), false);
+test('array(&$a, &$a)', array(&$a, &$a), false);
+
+$a = array(null);
+$b = array(&$a);
+$a[0] = &$b;
+
+test('cyclic', $a, true);
+
+$a = array(
+ 'a' => array(
+ 'b' => 'c',
+ 'd' => 'e'
+ ),
+ 'f' => array(
+ 'g' => 'h'
+ )
+ );
+
+test('array', $a, false);
+
+class Obj {
+ public $a;
+ protected $b;
+ private $c;
+
+ function __construct($a, $b, $c) {
+ $this->a = $a;
+ $this->b = $b;
+ $this->c = $c;
+ }
+}
+
+test('object', new Obj(1, 2, 3), false);
+
+test('object', array(new Obj(1, 2, 3), new Obj(4, 5, 6)), false);
+
+$o = new Obj(1, 2, 3);
+
+test('object', array(&$o, &$o), false);
+--EXPECTF--
+NULL
+OK
+bool(true)
+OK
+bool(false)
+OK
+int(0)
+OK
+int(1)
+OK
+int(-1)
+OK
+int(1000)
+OK
+int(-1000)
+OK
+int(100000)
+OK
+int(-100000)
+OK
+float(123.456)
+OK
+string(0) ""
+OK
+string(6) "foobar"
+OK
+array(0) {
+}
+OK
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+OK
+array(3) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(4)
+ [1]=>
+ int(5)
+ [2]=>
+ int(6)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(7)
+ [1]=>
+ int(8)
+ [2]=>
+ int(9)
+ }
+}
+OK
+array(3) {
+ [0]=>
+ string(3) "foo"
+ [1]=>
+ string(3) "foo"
+ [2]=>
+ string(3) "foo"
+}
+OK
+array(2) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+OK
+array(2) {
+ ["kek"]=>
+ string(3) "lol"
+ ["lol"]=>
+ string(3) "kek"
+}
+OK
+array(1) {
+ [""]=>
+ string(5) "empty"
+}
+OK
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+}
+OK
+array(2) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+ [1]=>
+ &array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+}
+OK
+array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ *RECURSION*
+ }
+ }
+}
+OK
+array(2) {
+ ["a"]=>
+ array(2) {
+ ["b"]=>
+ string(1) "c"
+ ["d"]=>
+ string(1) "e"
+ }
+ ["f"]=>
+ array(1) {
+ ["g"]=>
+ string(1) "h"
+ }
+}
+OK
+object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+}
+OK
+array(2) {
+ [0]=>
+ object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+ }
+ [1]=>
+ object(Obj)#%d (3) {
+ ["a"]=>
+ int(4)
+ [%r"?b"?:protected"?%r]=>
+ int(5)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(6)
+ }
+}
+OK
+array(2) {
+ [0]=>
+ &object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+ }
+ [1]=>
+ &object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+ }
+}
+OK
diff --git a/php/tests/065b.phpt b/php/tests/065b.phpt
new file mode 100644
index 0000000..c623d9a
--- /dev/null
+++ b/php/tests/065b.phpt
@@ -0,0 +1,326 @@
+--TEST--
+Check for unbuffered streaming unserialization (single)
+--SKIPIF--
+<?php
+if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
+ echo "skip tests in PHP 5.3.2 or older";
+}
+--FILE--
+<?php
+if(!extension_loaded('msgpack')) {
+ dl('msgpack.' . PHP_SHLIB_SUFFIX);
+}
+
+$unpacker = new MessagePackUnpacker();
+
+function test($type, $variable, $test = null) {
+ $serialized = msgpack_serialize($variable);
+
+ global $unpacker;
+
+ $length = strlen($serialized);
+
+ $str = "";
+ $offset = 0;
+
+ for ($i = 0; $i < $length;) {
+ $len = rand(1, 10);
+ $str .= substr($serialized, $i, $len);
+
+ if ($unpacker->execute($str, $offset))
+ {
+ $unserialized = $unpacker->data();
+ var_dump($unserialized);
+
+ $unpacker->reset();
+ $str = "";
+ $offset = 0;
+ }
+
+ $i += $len;
+ }
+
+ if (!is_bool($test))
+ {
+ echo $unserialized === $variable ? 'OK' : 'ERROR', PHP_EOL;
+ }
+ else
+ {
+ echo $test || $unserialized == $variable ? 'OK' : 'ERROR', PHP_EOL;
+ }
+}
+
+test('null', null);
+
+test('boo:l true', true);
+test('bool: true', false);
+
+test('zero: 0', 0);
+test('small: 1', 1);
+test('small: -1', -1);
+test('medium: 1000', 1000);
+test('medium: -1000', -1000);
+test('large: 100000', 100000);
+test('large: -100000', -100000);
+
+test('double: 123.456', 123.456);
+
+test('empty: ""', "");
+test('string: "foobar"', "foobar");
+
+test('empty: array', array(), false);
+test('empty: array(1, 2, 3)', array(1, 2, 3), false);
+test('empty: array(array(1, 2, 3), arr...', array(array(1, 2, 3), array(4, 5, 6), array(7, 8, 9)), false);
+
+test('array("foo", "foo", "foo")', array("foo", "foo", "foo"), false);
+test('array("one" => 1, "two" => 2))', array("one" => 1, "two" => 2), false);
+test('array("kek" => "lol", "lol" => "kek")', array("kek" => "lol", "lol" => "kek"), false);
+test('array("" => "empty")', array("" => "empty"), false);
+
+$a = array('foo');
+test('array($a, $a)', array($a, $a), false);
+test('array(&$a, &$a)', array(&$a, &$a), false);
+
+$a = array(null);
+$b = array(&$a);
+$a[0] = &$b;
+
+test('cyclic', $a, true);
+
+$a = array(
+ 'a' => array(
+ 'b' => 'c',
+ 'd' => 'e'
+ ),
+ 'f' => array(
+ 'g' => 'h'
+ )
+ );
+
+test('array', $a, false);
+
+class Obj {
+ public $a;
+ protected $b;
+ private $c;
+
+ function __construct($a, $b, $c) {
+ $this->a = $a;
+ $this->b = $b;
+ $this->c = $c;
+ }
+}
+
+test('object', new Obj(1, 2, 3), false);
+
+test('object', array(new Obj(1, 2, 3), new Obj(4, 5, 6)), false);
+
+$o = new Obj(1, 2, 3);
+
+test('object', array(&$o, &$o), false);
+--EXPECTF--
+NULL
+OK
+bool(true)
+OK
+bool(false)
+OK
+int(0)
+OK
+int(1)
+OK
+int(-1)
+OK
+int(1000)
+OK
+int(-1000)
+OK
+int(100000)
+OK
+int(-100000)
+OK
+float(123.456)
+OK
+string(0) ""
+OK
+string(6) "foobar"
+OK
+array(0) {
+}
+OK
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+OK
+array(3) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(4)
+ [1]=>
+ int(5)
+ [2]=>
+ int(6)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(7)
+ [1]=>
+ int(8)
+ [2]=>
+ int(9)
+ }
+}
+OK
+array(3) {
+ [0]=>
+ string(3) "foo"
+ [1]=>
+ string(3) "foo"
+ [2]=>
+ string(3) "foo"
+}
+OK
+array(2) {
+ ["one"]=>
+ int(1)
+ ["two"]=>
+ int(2)
+}
+OK
+array(2) {
+ ["kek"]=>
+ string(3) "lol"
+ ["lol"]=>
+ string(3) "kek"
+}
+OK
+array(1) {
+ [""]=>
+ string(5) "empty"
+}
+OK
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+}
+OK
+array(2) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+ [1]=>
+ &array(1) {
+ [0]=>
+ string(3) "foo"
+ }
+}
+OK
+array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ *RECURSION*
+ }
+ }
+ }
+ }
+}
+OK
+array(2) {
+ ["a"]=>
+ array(2) {
+ ["b"]=>
+ string(1) "c"
+ ["d"]=>
+ string(1) "e"
+ }
+ ["f"]=>
+ array(1) {
+ ["g"]=>
+ string(1) "h"
+ }
+}
+OK
+object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+}
+OK
+array(2) {
+ [0]=>
+ object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+ }
+ [1]=>
+ object(Obj)#%d (3) {
+ ["a"]=>
+ int(4)
+ [%r"?b"?:protected"?%r]=>
+ int(5)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(6)
+ }
+}
+OK
+array(2) {
+ [0]=>
+ &object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+ }
+ [1]=>
+ &object(Obj)#%d (3) {
+ ["a"]=>
+ int(1)
+ [%r"?b"?:protected"?%r]=>
+ int(2)
+ [%r"?c"?:("Obj":)?private"?%r]=>
+ int(3)
+ }
+}
+OK
diff --git a/php/tests/066.phpt b/php/tests/066.phpt
new file mode 100644
index 0000000..d2e430d
--- /dev/null
+++ b/php/tests/066.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Extra bytes buffered streaming unserialization (single)
+--SKIPIF--
+--FILE--
+<?php
+if(!extension_loaded('msgpack')) {
+ dl('msgpack.' . PHP_SHLIB_SUFFIX);
+}
+
+$unpacker = new MessagePackUnpacker();
+
+function test($type, $variable, $test = null) {
+ global $unpacker;
+
+ foreach ($variable as $var)
+ {
+ $serialized = pack('H*', $var);
+
+ $length = strlen($serialized);
+
+ for ($i = 0; $i < $length;) {
+ $len = rand(1, 10);
+ $str = substr($serialized, $i, $len);
+
+ $unpacker->feed($str);
+
+ while (true) {
+ if ($unpacker->execute()) {
+ $unserialized = $unpacker->data();
+ var_dump($unserialized);
+ $unpacker->reset();
+ } else {
+ break;
+ }
+ }
+ $i += $len;
+ }
+ }
+}
+
+test('array(1, 2, 3)', array('9301020392'));
+test('array(1, 2, 3), array(3, 9), 4', array('9301020392', '030904'));
+--EXPECTF--
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+array(2) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(9)
+ }
+}
+int(4)
diff --git a/php/tests/067.phpt b/php/tests/067.phpt
new file mode 100644
index 0000000..96c1442
--- /dev/null
+++ b/php/tests/067.phpt
@@ -0,0 +1,74 @@
+--TEST--
+Extra bytes unbuffered streaming unserialization (single)
+--SKIPIF--
+--FILE--
+<?php
+if(!extension_loaded('msgpack')) {
+ dl('msgpack.' . PHP_SHLIB_SUFFIX);
+}
+
+$unpacker = new MessagePackUnpacker();
+
+function test($type, $variable, $test = null) {
+ global $unpacker;
+
+ $str = "";
+ $offset = 0;
+
+ foreach ($variable as $var)
+ {
+ $serialized = pack('H*', $var);
+
+ $length = strlen($serialized);
+
+ for ($i = 0; $i < $length;) {
+ $len = rand(1, 10);
+ $str .= substr($serialized, $i, $len);
+
+ while (true) {
+ if ($unpacker->execute($str, $offset)) {
+ $unserialized = $unpacker->data();
+ var_dump($unserialized);
+
+ $unpacker->reset();
+ $str = substr($str, $offset);
+ $offset = 0;
+ } else {
+ break;
+ }
+ }
+ $i += $len;
+ }
+ }
+}
+
+test('array(1, 2, 3)', array('9301020392'));
+test('array(1, 2, 3), array(3, 9), 4', array('9301020392', '030904'));
+--EXPECTF--
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+array(2) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(9)
+ }
+}
+int(4)
diff --git a/php/tests/070.phpt b/php/tests/070.phpt
index 893023b..affcc72 100644
--- a/php/tests/070.phpt
+++ b/php/tests/070.phpt
@@ -2,8 +2,8 @@
Check for alias functions
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
- echo "skip tests in PHP 5.3.2 and lower";
+if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
+ echo "skip tests in PHP 5.3.3 or newer";
}
--FILE--
<?php
@@ -224,13 +224,7 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- &array(1) {
- [0]=>
- &array(1) {
- [0]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
}
diff --git a/php/tests/070b.phpt b/php/tests/070b.phpt
index 109ddc1..0aaa4e7 100644
--- a/php/tests/070b.phpt
+++ b/php/tests/070b.phpt
@@ -2,8 +2,8 @@
Check for alias functions
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
- echo "skip tests in PHP 5.3.3";
+if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
+ echo "skip tests in PHP 5.3.2 or older";
}
--FILE--
<?php
@@ -224,7 +224,13 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- *RECURSION*
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ *RECURSION*
+ }
+ }
}
}
}
diff --git a/php/tests/071.phpt b/php/tests/071.phpt
index 431303b..20041d4 100644
--- a/php/tests/071.phpt
+++ b/php/tests/071.phpt
@@ -2,8 +2,8 @@
Check for class methods
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
- echo "skip tests in PHP 5.3.2 and lower";
+if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
+ echo "skip tests in PHP 5.3.3 or newer";
}
--FILE--
<?php
@@ -226,13 +226,7 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- &array(1) {
- [0]=>
- &array(1) {
- [0]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
}
diff --git a/php/tests/071b.phpt b/php/tests/071b.phpt
index 770d06e..f663073 100644
--- a/php/tests/071b.phpt
+++ b/php/tests/071b.phpt
@@ -2,8 +2,8 @@
Check for class methods
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
- echo "skip tests in PHP 5.3.3";
+if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
+ echo "skip tests in PHP 5.3.2 or older";
}
--FILE--
<?php
@@ -226,7 +226,13 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- *RECURSION*
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ *RECURSION*
+ }
+ }
}
}
}
diff --git a/php/tests/072.phpt b/php/tests/072.phpt
index ea79a56..0f89e0a 100644
--- a/php/tests/072.phpt
+++ b/php/tests/072.phpt
@@ -2,8 +2,8 @@
Check for class methods unpacker
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
- echo "skip tests in PHP 5.3.2 and lower";
+if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
+ echo "skip tests in PHP 5.3.3 or newer";
}
--FILE--
<?php
@@ -266,13 +266,7 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- &array(1) {
- [0]=>
- &array(1) {
- [0]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
}
diff --git a/php/tests/072b.phpt b/php/tests/072b.phpt
index c7b0c3c..05fe41e 100644
--- a/php/tests/072b.phpt
+++ b/php/tests/072b.phpt
@@ -2,8 +2,8 @@
Check for class methods unpacker
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
- echo "skip tests in PHP 5.3.3";
+if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
+ echo "skip tests in PHP 5.3.2 or older";
}
--FILE--
<?php
@@ -266,7 +266,13 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- *RECURSION*
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ *RECURSION*
+ }
+ }
}
}
}
diff --git a/php/tests/073.phpt b/php/tests/073.phpt
index d3a7637..f6a91a6 100644
--- a/php/tests/073.phpt
+++ b/php/tests/073.phpt
@@ -2,8 +2,8 @@
Check for class unpacker
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
- echo "skip tests in PHP 5.3.2 and lower";
+if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
+ echo "skip tests in PHP 5.3.3 or newer";
}
--FILE--
<?php
@@ -267,13 +267,7 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- &array(1) {
- [0]=>
- &array(1) {
- [0]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
}
diff --git a/php/tests/073b.phpt b/php/tests/073b.phpt
index 131a534..065a2aa 100644
--- a/php/tests/073b.phpt
+++ b/php/tests/073b.phpt
@@ -2,8 +2,8 @@
Check for class unpacker
--SKIPIF--
<?php
-if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
- echo "skip tests in PHP 5.3.3";
+if (version_compare(PHP_VERSION, '5.3.3') >= 0) {
+ echo "skip tests in PHP 5.3.2 or older";
}
--FILE--
<?php
@@ -267,7 +267,13 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- *RECURSION*
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ *RECURSION*
+ }
+ }
}
}
}