3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function gen() { return; yield 1; } $append = new \AppendIterator; $append->append(gen()); foreach ($append as $foo) {}
Register dump:

 RAX: 0000000000000005   RBX: 00007f7fe246e300   RCX: 0000000000000003
 RDX: 00000000018a1b20   RSI: 0000000000000000   RDI: 0000000000000000
 RBP: 0000000000000000   R8 : 00007f7fe24624a0   R9 : 00000000010223e0
 R10: 00000000017d59c0   R11: 00007f7fe2c39560   R12: 00007ffd472a4db0
 R13: 00000000010223e0   R14: 00007ffd472a4d80   R15: 00007f7fe246e390
 RSP: 00007ffd472a4c00

 RIP: 0000000000637f36   EFLAGS: 00010202

 CS: 0033   FS: 0000   GS: 0000

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

 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[0x637f36]
/usr/bin/php-7.0.0[0x638354]
/usr/bin/php-7.0.0(zend_call_function+0x798)[0x71a1d8]
/usr/bin/php-7.0.0(zend_call_method+0x21e)[0x743a4e]
/usr/bin/php-7.0.0(zend_user_it_rewind+0x37)[0x743ff7]
/usr/bin/php-7.0.0[0x79a904]
/usr/bin/php-7.0.0(execute_ex+0x1b)[0x764f7b]
/usr/bin/php-7.0.0(zend_execute+0x1a7)[0x7b5be7]
/usr/bin/php-7.0.0(zend_execute_scripts+0xc5)[0x727e25]
/usr/bin/php-7.0.0(php_execute_script+0x280)[0x6cbcf0]
/usr/bin/php-7.0.0[0x7b77fd]
/usr/bin/php-7.0.0[0x431e54]
/usr/lib/libc.so.6(__libc_start_main+0xea)[0x7f7fe2ae843a]
/usr/bin/php-7.0.0(_start+0x2a)[0x431f9a]

Memory map:

00400000-00d5f000 r-xp 00000000 00:329 19969                             /usr/bin/php-7.0.0
00f5f000-00fef000 r--p 0095f000 00:329 19969                             /usr/bin/php-7.0.0
00fef000-01008000 rw-p 009ef000 00:329 19969                             /usr/bin/php-7.0.0
01008000-01026000 rw-p 00000000 00:00 0 
017ae000-0194a000 rw-p 00000000 00:00 0                                  [heap]
7f7fdf1f6000-7f7fdf1fd000 r-xp 00000000 00:329 20467                     /usr/lib/php/7.0.0/modules/bcmath.so
7f7fdf1fd000-7f7fdf3fc000 ---p 00007000 00:329 20467                     /usr/lib/php/7.0.0/modules/bcmath.so
7f7fdf3fc000-7f7fdf3fd000 r--p 00006000 00:329 20467                     /usr/lib/php/7.0.0/modules/bcmath.so
7f7fdf3fd000-7f7fdf3fe000 rw-p 00007000 00:329 20467                     /usr/lib/php/7.0.0/modules/bcmath.so
7f7fdf3fe000-7f7fdf40a000 r-xp 00000000 00:15 2539                       /usr/lib/libicuio.so.57
7f7fdf40a000-7f7fdf609000 ---p 0000c000 00:15 2539                       /usr/lib/libicuio.so.57
7f7fdf609000-7f7fdf60b000 r--p 0000b000 00:15 2539                       /usr/lib/libicuio.so.57
7f7fdf60b000-7f7fdf60c000 rw-p 0000d000 00:15 2539                       /usr/lib/libicuio.so.57
7f7fdf60c000-7f7fe0e88000 r--p 00000000 00:15 2525                       /usr/lib/libicudata.so.57
7f7fe0e88000-7f7fe1087000 ---p 0187c000 00:15 2525                       /usr/lib/libicudata.so.57
7f7fe1087000-7f7fe1088000 r--p 0187b000 00:15 2525                       /usr/lib/libicudata.so.57
7f7fe1088000-7f7fe121b000 r-xp 00000000 00:15 2568                       /usr/lib/libicuuc.so.57
7f7fe121b000-7f7fe141b000 ---p 00193000 00:15 2568                       /usr/lib/libicuuc.so.57
7f7fe141b000-7f7fe142d000 r--p 00193000 00:15 2568                       /usr/lib/libicuuc.so.57
7f7fe142d000-7f7fe142e000 rw-p 001a5000 00:15 2568                       /usr/lib/libicuuc.so.57
7f7fe142e000-7f7fe1430000 rw-p 00000000 00:00 0 
7f7fe1430000-7f7fe169b000 r-xp 00000000 00:15 2532                       /usr/lib/libicui18n.so.57
7f7fe169b000-7f7fe189a000 ---p 0026b000 00:15 2532                       /usr/lib/libicui18n.so.57
7f7fe189a000-7f7fe18a7000 r--p 0026a000 00:15 2532                       /usr/lib/libicui18n.so.57
7f7fe18a7000-7f7fe18a9000 rw-p 00277000 00:15 2532                       /usr/lib/libicui18n.so.57
7f7fe18a9000-7f7fe18aa000 rw-p 00000000 00:00 0 
7f7fe18aa000-7f7fe1912000 r-xp 00000000 00:329 20470                     /usr/lib/php/7.0.0/modules/intl.so
7f7fe1912000-7f7fe1b11000 ---p 00068000 00:329 20470                     /usr/lib/php/7.0.0/modules/intl.so
7f7fe1b11000-7f7fe1b18000 r--p 00067000 00:329 20470                     /usr/lib/php/7.0.0/modules/intl.so
7f7fe1b18000-7f7fe1b1d000 rw-p 0006e000 00:329 20470                     /usr/lib/php/7.0.0/modules/intl.so
7f7fe1b1d000-7f7fe1b1e000 rw-p 00000000 00:00 0 
7f7fe1b1e000-7f7fe1b27000 r-xp 00000000 00:329 20469                     /usr/lib/php/7.0.0/modules/iconv.so
7f7fe1b27000-7f7fe1d26000 ---p 00009000 00:329 20469                     /usr/lib/php/7.0.0/modules/iconv.so
7f7fe1d26000-7f7fe1d27000 r--p 00008000 00:329 20469                     /usr/lib/php/7.0.0/modules/iconv.so
7f7fe1d27000-7f7fe1d28000 rw-p 00009000 00:329 20469                     /usr/lib/php/7.0.0/modules/iconv.so
7f7fe1d28000-7f7fe1dba000 r-xp 00000000 00:15 2508                       /usr/lib/libgmp.so.10.3.1
7f7fe1dba000-7f7fe1fb9000 ---p 00092000 00:15 2508                       /usr/lib/libgmp.so.10.3.1
7f7fe1fb9000-7f7fe1fba000 r--p 00091000 00:15 2508                       /usr/lib/libgmp.so.10.3.1
7f7fe1fba000-7f7fe1fbb000 rw-p 00092000 00:15 2508                       /usr/lib/libgmp.so.10.3.1
7f7fe1fbb000-7f7fe1fc9000 r-xp 00000000 00:329 20468                     /usr/lib/php/7.0.0/modules/gmp.so
7f7fe1fc9000-7f7fe21c9000 ---p 0000e000 00:329 20468                     /usr/lib/php/7.0.0/modules/gmp.so
7f7fe21c9000-7f7fe21ca000 r--p 0000e000 00:329 20468                     /usr/lib/php/7.0.0/modules/gmp.so
7f7fe21ca000-7f7fe21cb000 rw-p 0000f000 00:329 20468                     /usr/lib/php/7.0.0/modules/gmp.so
7f7fe21cb000-7f7fe21f6000 r-xp 00000000 00:329 20472                     /usr/lib/php/7.0.0/modules/opcache.so
7f7fe21f6000-7f7fe23f6000 ---p 0002b000 00:329 20472                     /usr/lib/php/7.0.0/modules/opcache.so
7f7fe23f6000-7f7fe23f7000 r--p 0002b000 00:329 20472                     /usr/lib/php/7.0.0/modules/opcache.so
7f7fe23f7000-7f7fe23f8000 rw-p 0002c000 00:329 20472                     /usr/lib/php/7.0.0/modules/opcache.so
7f7fe23f8000-7f7fe2400000 rw-p 00000000 00:00 0 
7f7fe2400000-7f7fe2600000 rw-p 00000000 00:0e 568849381                  /anon_hugepage (deleted)
7f7fe2693000-7f7fe26a9000 r-xp 00000000 00:15 2502                       /usr/lib/libgcc_s.so.1
7f7fe26a9000-7f7fe28a8000 ---p 00016000 00:15 2502                       /usr/lib/libgcc_s.so.1
7f7fe28a8000-7f7fe28a9000 r--p 00015000 00:15 2502                       /usr/lib/libgcc_s.so.1
7f7fe28a9000-7f7fe28aa000 rw-p 00016000 00:15 2502                       /usr/lib/libgcc_s.so.1
7f7fe28aa000-7f7fe28c3000 r-xp 00000000 00:15 2619                       /usr/lib/libpthread-2.25.so
7f7fe28c3000-7f7fe2ac2000 ---p 00019000 00:15 2619                       /usr/lib/libpthread-2.25.so
7f7fe2ac2000-7f7fe2ac3000 r--p 00018000 00:15 2619                       /usr/lib/libpthread-2.25.so
7f7fe2ac3000-7f7fe2ac4000 rw-p 00019000 00:15 2619                       /usr/lib/libpthread-2.25.so
7f7fe2ac4000-7f7fe2ac8000 rw-p 00000000 00:00 0 
7f7fe2ac8000-7f7fe2c64000 r-xp 00000000 00:15 2480                       /usr/lib/libc-2.25.so
7f7fe2c64000-7f7fe2e63000 ---p 0019c000 00:15 2480                       /usr/lib/libc-2.25.so
7f7fe2e63000-7f7fe2e67000 r--p 0019b000 00:15 2480                       /usr/lib/libc-2.25.so
7f7fe2e67000-7f7fe2e69000 rw-p 0019f000 00:15 2480                       /usr/lib/libc-2.25.so
7f7fe2e69000-7f7fe2e6d000 rw-p 00000000 00:00 0 
7f7fe2e6d000-7f7fe303a000 r-xp 00000000 00:15 2693                       /usr/lib/debian/libcrypto.so.1.0.0
7f7fe303a000-7f7fe3239000 ---p 001cd000 00:15 2693                       /usr/lib/debian/libcrypto.so.1.0.0
7f7fe3239000-7f7fe3256000 r--p 001cc000 00:15 2693                       /usr/lib/debian/libcrypto.so.1.0.0
7f7fe3256000-7f7fe3266000 rw-p 001e9000 00:15 2693                       /usr/lib/debian/libcrypto.so.1.0.0
7f7fe3266000-7f7fe3269000 rw-p 00000000 00:00 0 
7f7fe3269000-7f7fe32c0000 r-xp 00000000 00:15 2732                       /usr/lib/debian/libssl.so.1.0.0
7f7fe32c0000-7f7fe34c0000 ---p 00057000 00:15 2732                       /usr/lib/debian/libssl.so.1.0.0
7f7fe34c0000-7f7fe34c3000 r--p 00057000 00:15 2732                       /usr/lib/debian/libssl.so.1.0.0
7f7fe34c3000-7f7fe34c9000 rw-p 0005a000 00:15 2732                       /usr/lib/debian/libssl.so.1.0.0
7f7fe34c9000-7f7fe34ca000 rw-p 00000000 00:00 0 
7f7fe34ca000-7f7fe34ef000 r-xp 00000000 00:15 2578                       /usr/lib/liblzma.so.5.2.2
7f7fe34ef000-7f7fe36ee000 ---p 00025000 00:15 2578                       /usr/lib/liblzma.so.5.2.2
7f7fe36ee000-7f7fe36ef000 r--p 00024000 00:15 2578                       /usr/lib/liblzma.so.5.2.2
7f7fe36ef000-7f7fe36f0000 rw-p 00025000 00:15 2578                       /usr/lib/liblzma.so.5.2.2
7f7fe36f0000-7f7fe384c000 r-xp 00000000 00:15 2737                       /usr/lib/debian/libxml2.so.2
7f7fe384c000-7f7fe3a4b000 ---p 0015c000 00:15 2737                       /usr/lib/debian/libxml2.so.2
7f7fe3a4b000-7f7fe3a54000 r--p 0015b000 00:15 2737                       /usr/lib/debian/libxml2.so.2
7f7fe3a54000-7f7fe3a56000 rw-p 00164000 00:15 2737                       /usr/lib/debian/libxml2.so.2
7f7fe3a56000-7f7fe3a57000 rw-p 00000000 00:00 0 
7f7fe3a57000-7f7fe3a6c000 r-xp 00000000 00:15 2597                       /usr/lib/libnsl-2.25.so
7f7fe3a6c000-7f7fe3c6b000 ---p 00015000 00:15 2597                       /usr/lib/libnsl-2.25.so
7f7fe3c6b000-7f7fe3c6c000 r--p 00014000 00:15 2597                       /usr/lib/libnsl-2.25.so
7f7fe3c6c000-7f7fe3c6d000 rw-p 00015000 00:15 2597                       /usr/lib/libnsl-2.25.so
7f7fe3c6d000-7f7fe3c6f000 rw-p 00000000 00:00 0 
7f7fe3c6f000-7f7fe3c72000 r-xp 00000000 00:15 2490                       /usr/lib/libdl-2.25.so
7f7fe3c72000-7f7fe3e71000 ---p 00003000 00:15 2490                       /usr/lib/libdl-2.25.so
7f7fe3e71000-7f7fe3e72000 r--p 00002000 00:15 2490                       /usr/lib/libdl-2.25.so
7f7fe3e72000-7f7fe3e73000 rw-p 00003000 00:15 2490                       /usr/lib/libdl-2.25.so
7f7fe3e73000-7f7fe3f83000 r-xp 00000000 00:15 2580                       /usr/lib/libm-2.25.so
7f7fe3f83000-7f7fe4183000 ---p 00110000 00:15 2580                       /usr/lib/libm-2.25.so
7f7fe4183000-7f7fe4184000 r--p 00110000 00:15 2580                       /usr/lib/libm-2.25.so
7f7fe4184000-7f7fe4185000 rw-p 00111000 00:15 2580                       /usr/lib/libm-2.25.so
7f7fe4185000-7f7fe419b000 r-xp 00000000 00:15 2645                       /usr/lib/libz.so.1.2.11
7f7fe419b000-7f7fe439a000 ---p 00016000 00:15 2645                       /usr/lib/libz.so.1.2.11
7f7fe439a000-7f7fe439b000 r--p 00015000 00:15 2645                       /usr/lib/libz.so.1.2.11
7f7fe439b000-7f7fe439c000 rw-p 00016000 00:15 2645                       /usr/lib/libz.so.1.2.11
7f7fe439c000-7f7fe4516000 r-xp 00000000 00:15 2632                       /usr/lib/libstdc++.so.6.0.23
7f7fe4516000-7f7fe4716000 ---p 0017a000 00:15 2632                       /usr/lib/libstdc++.so.6.0.23
7f7fe4716000-7f7fe4720000 r--p 0017a000 00:15 2632                       /usr/lib/libstdc++.so.6.0.23
7f7fe4720000-7f7fe4722000 rw-p 00184000 00:15 2632                       /usr/lib/libstdc++.so.6.0.23
7f7fe4722000-7f7fe4725000 rw-p 00000000 00:00 0 
7f7fe4725000-7f7fe472c000 r-xp 00000000 00:15 2628                       /usr/lib/librt-2.25.so
7f7fe472c000-7f7fe492b000 ---p 00007000 00:15 2628                       /usr/lib/librt-2.25.so
7f7fe492b000-7f7fe492c000 r--p 00006000 00:15 2628                       /usr/lib/librt-2.25.so
7f7fe492c000-7f7fe492d000 rw-p 00007000 00:15 2628                       /usr/lib/librt-2.25.so
7f7fe492d000-7f7fe4940000 r-xp 00000000 00:15 2625                       /usr/lib/libresolv-2.25.so
7f7fe4940000-7f7fe4b3f000 ---p 00013000 00:15 2625                       /usr/lib/libresolv-2.25.so
7f7fe4b3f000-7f7fe4b40000 r--p 00012000 00:15 2625                       /usr/lib/libresolv-2.25.so
7f7fe4b40000-7f7fe4b41000 rw-p 00013000 00:15 2625                       /usr/lib/libresolv-2.25.so
7f7fe4b41000-7f7fe4b43000 rw-p 00000000 00:00 0 
7f7fe4b43000-7f7fe4b4b000 r-xp 00000000 00:15 2486                       /usr/lib/libcrypt-2.25.so
7f7fe4b4b000-7f7fe4d4b000 ---p 00008000 00:15 2486                       /usr/lib/libcrypt-2.25.so
7f7fe4d4b000-7f7fe4d4c000 r--p 00008000 00:15 2486                       /usr/lib/libcrypt-2.25.so
7f7fe4d4c000-7f7fe4d4d000 rw-p 00009000 00:15 2486                       /usr/lib/libcrypt-2.25.so
7f7fe4d4d000-7f7fe4d7b000 rw-p 00000000 00:00 0 
7f7fe4d7b000-7f7fe4d7f000 r-xp 00000000 00:15 2470                       /usr/lib/libSegFault.so
7f7fe4d7f000-7f7fe4f7e000 ---p 00004000 00:15 2470                       /usr/lib/libSegFault.so
7f7fe4f7e000-7f7fe4f7f000 r--p 00003000 00:15 2470                       /usr/lib/libSegFault.so
7f7fe4f7f000-7f7fe4f80000 rw-p 00004000 00:15 2470                       /usr/lib/libSegFault.so
7f7fe4f80000-7f7fe4fa3000 r-xp 00000000 00:15 2442                       /usr/lib/ld-2.25.so
7f7fe511d000-7f7fe519a000 rw-p 00000000 00:00 0 
7f7fe51a0000-7f7fe51a2000 rw-p 00000000 00:00 0 
7f7fe51a2000-7f7fe51a3000 r--p 00022000 00:15 2442                       /usr/lib/ld-2.25.so
7f7fe51a3000-7f7fe51a4000 rw-p 00023000 00:15 2442                       /usr/lib/ld-2.25.so
7f7fe51a4000-7f7fe51a5000 rw-p 00000000 00:00 0 
7ffd47288000-7ffd472a9000 rw-p 00000000 00:00 0                          [stack]
7ffd472bb000-7ffd472bd000 r--p 00000000 00:00 0                          [vvar]
7ffd472bd000-7ffd472bf000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]