3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump([ $original_set = [ 'arrayobject' => new arrayobject( [3] ), 'reference?' => [5] ], $original_serialized = serialize( $original_set ), $original_unserialized = unserialize( $original_serialized ), $withreference_serialized = preg_replace( '/a:1:{i:0;i:5;}}/', 'R:4;}', $original_serialized ), $withreference_unserialized = unserialize( $withreference_serialized ), $withreference_unserialized['reference?'][9] = 8, $withreference_unserialized, $withreference_unserialized['arrayobject'][9] === $withreference_unserialized['reference?'][9] # ? 'looks like a reference' : 'does not look like a reference' , ]) ;
based on Je2Ye
Register dump:

 RAX: ffffffffff9a6078   RBX: 0000000000000009   RCX: 0000000000000000
 RDX: 000000000064d5a8   RSI: 0000000000000009   RDI: 0000000000000000
 RBP: 0000000000000000   R8 : 00007f0faf2131e0   R9 : 000000000000040a
 R10: 0000000000000011   R11: 00007f0fafd97020   R12: 0000000000000009
 R13: 0000000000000000   R14: 00007f0faf213030   R15: 00007f0faf280480
 RSP: 00007fff62702fc8

 RIP: 000000000074bcb0   EFLAGS: 00010203

 CS: 0033   FS: 0000   GS: 0000

 Trap: 0000000e   Error: 00000004   OldMask: 00000000   CR2: 00000008

 FPUCW: 0000027f   FPUSW: 00000000   TAG: 00000000
 RIP: 00000000   RDP: 00000000

 ST(0) 0000 0000000000000000   ST(1) 0000 0000000000000000
 ST(2) 0000 0000000000000000   ST(3) 0000 0000000000000000
 ST(4) 0000 0000000000000000   ST(5) 0000 0000000000000000
 ST(6) 0000 0000000000000000   ST(7) 0000 0000000000000000
 mxcsr: 1fa0
 XMM0:  00000000000000000000000000000000 XMM1:  00000000000000000000000000000000
 XMM2:  00000000000000000000000000000000 XMM3:  00000000000000000000000000000000
 XMM4:  00000000000000000000000000000000 XMM5:  00000000000000000000000000000000
 XMM6:  00000000000000000000000000000000 XMM7:  00000000000000000000000000000000
 XMM8:  00000000000000000000000000000000 XMM9:  00000000000000000000000000000000
 XMM10: 00000000000000000000000000000000 XMM11: 00000000000000000000000000000000
 XMM12: 00000000000000000000000000000000 XMM13: 00000000000000000000000000000000
 XMM14: 00000000000000000000000000000000 XMM15: 00000000000000000000000000000000

Backtrace:
/usr/bin/php-7.0.0(zend_hash_index_find+0x0)[0x74bcb0]
/usr/bin/php-7.0.0[0x64d4db]
/usr/bin/php-7.0.0[0x64d85b]
/usr/bin/php-7.0.0[0x77710a]
/usr/bin/php-7.0.0[0x777be7]
/usr/bin/php-7.0.0(execute_ex+0x1b)[0x77617b]
/usr/bin/php-7.0.0(zend_execute+0x1a7)[0x7c7e37]
/usr/bin/php-7.0.0(zend_execute_scripts+0xb4)[0x739484]
/usr/bin/php-7.0.0(php_execute_script+0x280)[0x6dd2e0]
/usr/bin/php-7.0.0[0x7c9a54]
/usr/bin/php-7.0.0[0x434198]
/usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7f0fafc4b710]
/usr/bin/php-7.0.0(_start+0x29)[0x4342d9]

Memory map:

00400000-00d76000 r-xp 00000000 00:00 0 
00d76000-00f76000 ---p 00000000 00:00 0 
00f76000-0103f000 rwxp 00000000 00:00 0 
01200000-01201000 rwxp 00000000 00:00 0 
02231000-023a0000 rwxp 00000000 00:00 0                                  [heap]
7f0faf200000-7f0faf400000 rwxp 00000000 00:0e 185286768                  /anon_hugepage (deleted)
7f0faf548000-7f0faf5d1000 rwxp 00000000 00:00 0 
7f0faf5d1000-7f0faf5f6000 r-xp 00000000 00:12 32324                      /usr/lib/liblzma.so.5.2.2
7f0faf5f6000-7f0faf7f5000 ---p 00025000 00:12 32324                      /usr/lib/liblzma.so.5.2.2
7f0faf7f5000-7f0faf7f6000 r-xp 00024000 00:12 32324                      /usr/lib/liblzma.so.5.2.2
7f0faf7f6000-7f0faf7f7000 rwxp 00025000 00:12 32324                      /usr/lib/liblzma.so.5.2.2
7f0faf7f7000-7f0faf7f8000 rwxp 00000000 00:00 0 
7f0faf7f8000-7f0faf80e000 r-xp 00000000 00:12 64247                      /usr/lib/libgcc_s.so.1
7f0faf80e000-7f0fafa0d000 ---p 00016000 00:12 64247                      /usr/lib/libgcc_s.so.1
7f0fafa0d000-7f0fafa0e000 rwxp 00015000 00:12 64247                      /usr/lib/libgcc_s.so.1
7f0fafa0e000-7f0fafa26000 r-xp 00000000 00:12 64329                      /usr/lib/libpthread-2.23.so
7f0fafa26000-7f0fafc25000 ---p 00018000 00:12 64329                      /usr/lib/libpthread-2.23.so
7f0fafc25000-7f0fafc26000 r-xp 00017000 00:12 64329                      /usr/lib/libpthread-2.23.so
7f0fafc26000-7f0fafc27000 rwxp 00018000 00:12 64329                      /usr/lib/libpthread-2.23.so
7f0fafc27000-7f0fafc2b000 rwxp 00000000 00:00 0 
7f0fafc2b000-7f0fafdc3000 r-xp 00000000 00:12 64222                      /usr/lib/libc-2.23.so
7f0fafdc3000-7f0faffc2000 ---p 00198000 00:12 64222                      /usr/lib/libc-2.23.so
7f0faffc2000-7f0faffc6000 r-xp 00197000 00:12 64222                      /usr/lib/libc-2.23.so
7f0faffc6000-7f0faffc8000 rwxp 0019b000 00:12 64222                      /usr/lib/libc-2.23.so
7f0faffc8000-7f0faffcd000 rwxp 00000000 00:00 0 
7f0faffcd000-7f0fb0219000 r-xp 00000000 00:12 64237                      /usr/lib/libcrypto.so.1.0.0
7f0fb0219000-7f0fb0419000 ---p 0024c000 00:12 64237                      /usr/lib/libcrypto.so.1.0.0
7f0fb0419000-7f0fb0435000 r-xp 0024c000 00:12 64237                      /usr/lib/libcrypto.so.1.0.0
7f0fb0435000-7f0fb0441000 rwxp 00268000 00:12 64237                      /usr/lib/libcrypto.so.1.0.0
7f0fb0441000-7f0fb0444000 rwxp 00000000 00:00 0 
7f0fb0444000-7f0fb04aa000 r-xp 00000000 00:12 64342                      /usr/lib/libssl.so.1.0.0
7f0fb04aa000-7f0fb06aa000 ---p 00066000 00:12 64342                      /usr/lib/libssl.so.1.0.0
7f0fb06aa000-7f0fb06ae000 r-xp 00066000 00:12 64342                      /usr/lib/libssl.so.1.0.0
7f0fb06ae000-7f0fb06b5000 rwxp 0006a000 00:12 64342                      /usr/lib/libssl.so.1.0.0
7f0fb06b5000-7f0fb0813000 r-xp 00000000 00:12 42054                      /usr/lib/libxml2.so.2.9.3
7f0fb0813000-7f0fb0a13000 ---p 0015e000 00:12 42054                      /usr/lib/libxml2.so.2.9.3
7f0fb0a13000-7f0fb0a1b000 r-xp 0015e000 00:12 42054                      /usr/lib/libxml2.so.2.9.3
7f0fb0a1b000-7f0fb0a1d000 rwxp 00166000 00:12 42054                      /usr/lib/libxml2.so.2.9.3
7f0fb0a1d000-7f0fb0a20000 rwxp 00000000 00:00 0 
7f0fb0a20000-7f0fb0a35000 r-xp 00000000 00:12 64308                      /usr/lib/libnsl-2.23.so
7f0fb0a35000-7f0fb0c34000 ---p 00015000 00:12 64308                      /usr/lib/libnsl-2.23.so
7f0fb0c34000-7f0fb0c35000 r-xp 00014000 00:12 64308                      /usr/lib/libnsl-2.23.so
7f0fb0c35000-7f0fb0c36000 rwxp 00015000 00:12 64308                      /usr/lib/libnsl-2.23.so
7f0fb0c36000-7f0fb0c38000 rwxp 00000000 00:00 0 
7f0fb0c38000-7f0fb0c3a000 r-xp 00000000 00:12 64239                      /usr/lib/libdl-2.23.so
7f0fb0c3a000-7f0fb0e3a000 ---p 00002000 00:12 64239                      /usr/lib/libdl-2.23.so
7f0fb0e3a000-7f0fb0e3b000 r-xp 00002000 00:12 64239                      /usr/lib/libdl-2.23.so
7f0fb0e3b000-7f0fb0e3c000 rwxp 00003000 00:12 64239                      /usr/lib/libdl-2.23.so
7f0fb0e3c000-7f0fb0f3f000 r-xp 00000000 00:12 64293                      /usr/lib/libm-2.23.so
7f0fb0f3f000-7f0fb113f000 ---p 00103000 00:12 64293                      /usr/lib/libm-2.23.so
7f0fb113f000-7f0fb1140000 r-xp 00103000 00:12 64293                      /usr/lib/libm-2.23.so
7f0fb1140000-7f0fb1141000 rwxp 00104000 00:12 64293                      /usr/lib/libm-2.23.so
7f0fb1141000-7f0fb1142000 rwxp 00000000 00:00 0 
7f0fb1142000-7f0fb1157000 r-xp 00000000 00:12 7684                       /usr/lib/libz.so.1.2.8
7f0fb1157000-7f0fb1356000 ---p 00015000 00:12 7684                       /usr/lib/libz.so.1.2.8
7f0fb1356000-7f0fb1357000 r-xp 00014000 00:12 7684                       /usr/lib/libz.so.1.2.8
7f0fb1357000-7f0fb1358000 rwxp 00015000 00:12 7684                       /usr/lib/libz.so.1.2.8
7f0fb1358000-7f0fb13cf000 r-xp 00000000 00:12 50634                      /usr/lib/libgmp.so.10.3.0
7f0fb13cf000-7f0fb15ce000 ---p 00077000 00:12 50634                      /usr/lib/libgmp.so.10.3.0
7f0fb15ce000-7f0fb15cf000 r-xp 00076000 00:12 50634                      /usr/lib/libgmp.so.10.3.0
7f0fb15cf000-7f0fb15d0000 rwxp 00077000 00:12 50634                      /usr/lib/libgmp.so.10.3.0
7f0fb15d0000-7f0fb1742000 r-xp 00000000 00:12 64343                      /usr/lib/libstdc++.so.6.0.21
7f0fb1742000-7f0fb1942000 ---p 00172000 00:12 64343                      /usr/lib/libstdc++.so.6.0.21
7f0fb1942000-7f0fb194c000 r-xp 00172000 00:12 64343                      /usr/lib/libstdc++.so.6.0.21
7f0fb194c000-7f0fb194e000 rwxp 0017c000 00:12 64343                      /usr/lib/libstdc++.so.6.0.21
7f0fb194e000-7f0fb1953000 rwxp 00000000 00:00 0 
7f0fb1953000-7f0fb195c000 r-xp 00000000 00:12 41987                      /usr/lib/libltdl.so.7.3.1
7f0fb195c000-7f0fb1b5b000 ---p 00009000 00:12 41987                      /usr/lib/libltdl.so.7.3.1
7f0fb1b5b000-7f0fb1b5c000 r-xp 00008000 00:12 41987                      /usr/lib/libltdl.so.7.3.1
7f0fb1b5c000-7f0fb1b5d000 rwxp 00009000 00:12 41987                      /usr/lib/libltdl.so.7.3.1
7f0fb1b5d000-7f0fb1b87000 r-xp 00000000 00:12 7561                       /usr/lib/libmcrypt.so.4.4.8
7f0fb1b87000-7f0fb1d87000 ---p 0002a000 00:12 7561                       /usr/lib/libmcrypt.so.4.4.8
7f0fb1d87000-7f0fb1d89000 r-xp 0002a000 00:12 7561                       /usr/lib/libmcrypt.so.4.4.8
7f0fb1d89000-7f0fb1d8b000 rwxp 0002c000 00:12 7561                       /usr/lib/libmcrypt.so.4.4.8
7f0fb1d8b000-7f0fb1d91000 rwxp 00000000 00:00 0 
7f0fb1d91000-7f0fb1d98000 r-xp 00000000 00:12 64338                      /usr/lib/librt-2.23.so
7f0fb1d98000-7f0fb1f97000 ---p 00007000 00:12 64338                      /usr/lib/librt-2.23.so
7f0fb1f97000-7f0fb1f98000 r-xp 00006000 00:12 64338                      /usr/lib/librt-2.23.so
7f0fb1f98000-7f0fb1f99000 rwxp 00007000 00:12 64338                      /usr/lib/librt-2.23.so
7f0fb1f99000-7f0fb1f9a000 rwxp 00000000 00:00 0 
7f0fb1f9a000-7f0fb1fae000 r-xp 00000000 00:12 64335                      /usr/lib/libresolv-2.23.so
7f0fb1fae000-7f0fb21ad000 ---p 00014000 00:12 64335                      /usr/lib/libresolv-2.23.so
7f0fb21ad000-7f0fb21ae000 r-xp 00013000 00:12 64335                      /usr/lib/libresolv-2.23.so
7f0fb21ae000-7f0fb21af000 rwxp 00014000 00:12 64335                      /usr/lib/libresolv-2.23.so
7f0fb21af000-7f0fb21b1000 rwxp 00000000 00:00 0 
7f0fb21b1000-7f0fb21b9000 r-xp 00000000 00:12 64235                      /usr/lib/libcrypt-2.23.so
7f0fb21b9000-7f0fb23b8000 ---p 00008000 00:12 64235                      /usr/lib/libcrypt-2.23.so
7f0fb23b8000-7f0fb23b9000 r-xp 00007000 00:12 64235                      /usr/lib/libcrypt-2.23.so
7f0fb23b9000-7f0fb23ba000 rwxp 00008000 00:12 64235                      /usr/lib/libcrypt-2.23.so
7f0fb23ba000-7f0fb23e8000 rwxp 00000000 00:00 0 
7f0fb23f5000-7f0fb23f9000 r-xp 00000000 00:12 64212                      /usr/lib/libSegFault.so
7f0fb23f9000-7f0fb25f8000 ---p 00004000 00:12 64212                      /usr/lib/libSegFault.so
7f0fb25f8000-7f0fb25f9000 r-xp 00003000 00:12 64212                      /usr/lib/libSegFault.so
7f0fb25f9000-7f0fb25fa000 rwxp 00004000 00:12 64212                      /usr/lib/libSegFault.so
7f0fb25fa000-7f0fb25fb000 rwxp 00000000 00:00 0 
7f0fb25fb000-7f0fb261e000 r-xp 00000000 00:12 64206                      /usr/lib/ld-2.23.so
7f0fb261e000-7f0fb281e000 ---p 00000000 00:00 0 
7f0fb281e000-7f0fb281f000 r-xp 00023000 00:12 64206                      /usr/lib/ld-2.23.so
7f0fb281f000-7f0fb2820000 rwxp 00024000 00:12 64206                      /usr/lib/ld-2.23.so
7f0fb2820000-7f0fb2821000 rwxp 00000000 00:00 0 
7fff626e7000-7fff62708000 rwxp 00000000 00:00 0 
7fff627a0000-7fff627a2000 r--p 00000000 00:00 0                          [vvar]
7fff627a2000-7fff627a4000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]