3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $magic = "\x45\x52\x00\x05\x00\x45\x52\x00\x01\x00\x45\x52\x00\x01\x00\x45\x52\x00\x01\x00\x45\x52\x00\x01\x00\x00\x01\x00\x45\x52\x00\x01\x00\x45\x52\x00\x01\x00\x00\x00\x00\x01\x00\x00\x00\x20\x20\x00\x00\x00\x20\x40\x00\x00\x00\xff\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x00\x52\x64\x00\x00"; $info = finfo_open(FILEINFO_MIME); var_dump(finfo_buffer($info, $magic));
Output for 5.3.20 - 5.4.14, 7.2.0
string(40) "application/octet-stream; charset=binary"
Output for 7.0.0 - 7.1.10
string(372) "application/x-font-ttfimage/x-iconapplication/x-font-ttfapplication/x-font-ttfapplication/x-font-ttfimage/x-iconapplication/x-font-ttfapplication/x-font-ttfapplication/x-font-ttfimage/x-iconapplication/x-font-ttfapplication/x-font-ttfapplication/x-font-ttfimage/x-iconapplication/x-font-ttfapplication/x-font-ttfapplication/x-font-ttfapplication/x-font-ttf; charset=binary"
Output for 5.4.16 - 5.6.28
string(420) "image/x-iconapplication/x-font-ttfimage/x-iconapplication/x-font-ttfapplication/x-font-ttfimage/x-iconapplication/x-font-ttfimage/x-iconapplication/x-font-ttfapplication/x-font-ttfimage/x-iconapplication/x-font-ttfimage/x-iconapplication/x-font-ttfapplication/x-font-ttfimage/x-iconapplication/x-font-ttfimage/x-iconapplication/x-font-ttfapplication/x-font-ttfapplication/x-font-ttfapplication/x-font-ttf; charset=binary"
Output for 5.4.15
*** Error in `/bin/php-5.4.15': free(): invalid next size (fast): 0x00007fd9ee55ee60 *** ======= Backtrace: ========= /usr/lib/libc.so.6(+0x72055)[0x7fd9eea27055] /usr/lib/libc.so.6(+0x779a6)[0x7fd9eea2c9a6] /usr/lib/libc.so.6(+0x7818e)[0x7fd9eea2d18e] /bin/php-5.4.15[0x530766] /bin/php-5.4.15[0x52fec2] /bin/php-5.4.15[0x530306] /bin/php-5.4.15[0x5306fb] /bin/php-5.4.15[0x52fec2] /bin/php-5.4.15[0x530306] /bin/php-5.4.15[0x5306fb] /bin/php-5.4.15[0x52fec2] /bin/php-5.4.15[0x530306] /bin/php-5.4.15[0x5306fb] /bin/php-5.4.15[0x52fec2] /bin/php-5.4.15[0x530306] /bin/php-5.4.15[0x5306fb] /bin/php-5.4.15[0x52fec2] /bin/php-5.4.15[0x530306] /bin/php-5.4.15[0x52c828] /bin/php-5.4.15[0x52d2de] /bin/php-5.4.15[0x523cca] /bin/php-5.4.15[0x7a2e20] /bin/php-5.4.15(execute+0x1ac)[0x71a71c] /bin/php-5.4.15(zend_execute_scripts+0x136)[0x6f5be6] /bin/php-5.4.15(php_execute_script+0x18c)[0x69864c] /bin/php-5.4.15[0x7a545c] /bin/php-5.4.15[0x43190f] /usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7fd9ee9d5610] /bin/php-5.4.15(_start+0x29)[0x431aa9] ======= Memory map: ======== 00400000-00cfe000 r-xp 00000000 00:00 0 00cfe000-00efe000 ---p 00000000 00:00 0 00efe000-00f2a000 rwxp 00000000 00:00 0 01000000-01001000 rwxp 00000000 00:00 0 01b9d000-01d9d000 rwxp 00000000 00:00 0 [heap] 7fd9e8000000-7fd9e8021000 rwxp 00000000 00:00 0 7fd9e8021000-7fd9ec000000 ---p 00000000 00:00 0 7fd9ee3da000-7fd9ee571000 rwxp 00000000 00:00 0 7fd9ee571000-7fd9ee596000 r-xp 00000000 00:12 68001 /usr/lib/liblzma.so.5.2.2 7fd9ee596000-7fd9ee795000 ---p 00025000 00:12 68001 /usr/lib/liblzma.so.5.2.2 7fd9ee795000-7fd9ee796000 r-xp 00024000 00:12 68001 /usr/lib/liblzma.so.5.2.2 7fd9ee796000-7fd9ee797000 rwxp 00025000 00:12 68001 /usr/lib/liblzma.so.5.2.2 7fd9ee797000-7fd9ee798000 rwxp 00000000 00:00 0 7fd9ee798000-7fd9ee7b0000 r-xp 00000000 00:12 53248 /usr/lib/libpthread-2.22.so 7fd9ee7b0000-7fd9ee9af000 ---p 00018000 00:12 53248 /usr/lib/libpthread-2.22.so 7fd9ee9af000-7fd9ee9b0000 r-xp 00017000 00:12 53248 /usr/lib/libpthread-2.22.so 7fd9ee9b0000-7fd9ee9b1000 rwxp 00018000 00:12 53248 /usr/lib/libpthread-2.22.so 7fd9ee9b1000-7fd9ee9b5000 rwxp 00000000 00:00 0 7fd9ee9b5000-7fd9eeb50000 r-xp 00000000 00:12 53267 /usr/lib/libc-2.22.so 7fd9eeb50000-7fd9eed4f000 ---p 0019b000 00:12 53267 /usr/lib/libc-2.22.so 7fd9eed4f000-7fd9eed53000 r-xp 0019a000 00:12 53267 /usr/lib/libc-2.22.so 7fd9eed53000-7fd9eed55000 rwxp 0019e000 00:12 53267 /usr/lib/libc-2.22.so 7fd9eed55000-7fd9eed59000 rwxp 00000000 00:00 0 7fd9eed59000-7fd9eed6f000 r-xp 00000000 00:12 81465 /usr/lib/libgcc_s.so.1 7fd9eed6f000-7fd9eef6e000 ---p 00016000 00:12 81465 /usr/lib/libgcc_s.so.1 7fd9eef6e000-7fd9eef6f000 rwxp 00015000 00:12 81465 /usr/lib/libgcc_s.so.1 7fd9eef6f000-7fd9eef70000 rwxp 00000000 00:00 0 7fd9eef70000-7fd9eef7c000 r-xp 00000000 00:12 76485 /usr/lib/libicuio.so.55 7fd9eef7c000-7fd9ef17b000 ---p 0000c000 00:12 76485 /usr/lib/libicuio.so.55 7fd9ef17b000-7fd9ef17e000 r-xp 0000b000 00:12 76485 /usr/lib/libicuio.so.55 7fd9ef17e000-7fd9ef17f000 rwxp 0000e000 00:12 76485 /usr/lib/libicuio.so.55 7fd9ef17f000-7fd9f0a35000 r-xp 00000000 00:12 76481 /usr/lib/libicudata.so.55 7fd9f0a35000-7fd9f0c34000 ---p 018b6000 00:12 76481 /usr/lib/libicudata.so.55 7fd9f0c34000-7fd9f0c35000 r-xp 018b5000 00:12 76481 /usr/lib/libicudata.so.55 7fd9f0c35000-7fd9f0db2000 r-xp 00000000 00:12 76495 /usr/lib/libicuuc.so.55 7fd9f0db2000-7fd9f0fb2000 ---p 0017d000 00:12 76495 /usr/lib/libicuuc.so.55 7fd9f0fb2000-7fd9f0fc3000 r-xp 0017d000 00:12 76495 /usr/lib/libicuuc.so.55 7fd9f0fc3000-7fd9f0fc4000 rwxp 0018e000 00:12 76495 /usr/lib/libicuuc.so.55 7fd9f0fc4000-7fd9f0fc9000 rwxp 00000000 00:00 0 7fd9f0fc9000-7fd9f121c000 r-xp 00000000 00:12 76483 /usr/lib/libicui18n.so.55 7fd9f121c000-7fd9f141c000 ---p 00253000 00:12 76483 /usr/lib/libicui18n.so.55 7fd9f141c000-7fd9f142c000 r-xp 00253000 00:12 76483 /usr/lib/libicui18n.so.55 7fd9f142c000-7fd9f142e000 rwxp 00263000 00:12 76483 /usr/lib/libicui18n.so.55 7fd9f142e000-7fd9f142f000 rwxp 00000000 00:00 0 7fd9f142f000-7fd9f167d000 r-xp 00000000 00:12 86069 /usr/lib/libcrypto.so.1.0.0 7fd9f167d000-7fd9f187c000 ---p 0024e000 00:12 86069 /usr/lib/libcrypto.so.1.0.0 7fd9f187c000-7fd9f1898000 r-xp 0024d000 00:12 86069 /usr/lib/libcrypto.so.1.0.0 7fd9f1898000-7fd9f18a4000 rwxp 00269000 00:12 86069 /usr/lib/libcrypto.so.1.0.0 7fd9f18a4000-7fd9f18a7000 rwxp 00000000 00:00 0 7fd9f18a7000-7fd9f1917000 r-xp 00000000 00:12 86068 /usr/lib/libssl.so.1.0.0 7fd9f1917000-7fd9f1b16000 ---p 00070000 00:12 86068 /usr/lib/libssl.so.1.0.0 7fd9f1b16000-7fd9f1b1b000 r-xp 0006f000 00:12 86068 /usr/lib/libssl.so.1.0.0 7fd9f1b1b000-7fd9f1b22000 rwxp 00074000 00:12 86068 /usr/lib/libssl.so.1.0.0 7fd9f1b22000-7fd9f1b23000 rwxp 00000000 00:00 0 7fd9f1b23000-7fd9f1c81000 r-xp 00000000 00:12 88616 /usr/lib/libxml2.so.2.9.3 7fd9f1c81000-7fd9f1e81000 ---p 0015e000 00:12 88616 /usr/lib/libxml2.so.2.9.3 7fd9f1e81000-7fd9f1e89000 r-xp 0015e000 00:12 88616 /usr/lib/libxml2.so.2.9.3 7fd9f1e89000-7fd9f1e8b000 rwxp 00166000 00:12 88616 /usr/lib/libxml2.so.2.9.3 7fd9f1e8b000-7fd9f1e8d000 rwxp 00000000 00:00 0 7fd9f1e8d000-7fd9f1ea2000 r-xp 00000000 00:12 53314 /usr/lib/libnsl-2.22.so 7fd9f1ea2000-7fd9f20a1000 ---p 00015000 00:12 53314 /usr/lib/libnsl-2.22.so 7fd9f20a1000-7fd9f20a2000 r-xp 00014000 00:12 53314 /usr/lib/libnsl-2.22.so 7fd9f20a2000-7fd9f20a3000 rwxp 00015000 00:12 53314 /usr/lib/libnsl-2.22.so 7fd9f20a3000-7fd9f20a5000 rwxp 00000000 00:00 0 7fd9f20a5000-7fd9f20a8000 r-xp 00000000 00:12 53312 /usr/lib/libdl-2.22.so 7fd9f20a8000-7fd9f22a7000 ---p 00003000 00:12 53312 /usr/lib/libdl-2.22.so 7fd9f22a7000-7fd9f22a8000 r-xp 00002000 00:12 53312 /usr/lib/libdl-2.22.so 7fd9f22a8000-7fd9f22a9000 rwxp 00003000 00:12 53312 /usr/lib/libdl-2.22.so 7fd9f22a9000-7fd9f22aa000 rwxp 00000000 00:00 0 7fd9f22aa000-7fd9f23a7000 r-xp 00000000 00:12 53313 /usr/lib/libm-2.22.so 7fd9f23a7000-7fd9f25a6000 ---p 000fd000 00:12 53313 /usr/lib/libm-2.22.so 7fd9f25a6000-7fd9f25a7000 r-xp 000fc000 00:12 53313 /usr/lib/libm-2.22.so 7fd9f25a7000-7fd9f25a8000 rwxp 000fd000 00:12 53313 /usr/lib/libm-2.22.so 7fd9f25a8000-7fd9f25bd000 r-xp 00000000 00:12 25251 /usr/lib/libz.so.1.2.8 7fd9f25bd000-7fd9f27bc000 ---p 00015000 00:12 25251 /usr/lib/libz.so.1.2.8 7fd9f27bc000-7fd9f27bd000 r-xp 00014000 00:12 25251 /usr/lib/libz.so.1.2.8 7fd9f27bd000-7fd9f27be000 rwxp 00015000 00:12 25251 /usr/lib/libz.so.1.2.8 7fd9f27be000-7fd9f284f000 r-xp 00000000 00:12 86170 /usr/lib/libgmp.so.10.3.0 7fd9f284f000-7fd9f2a4f000 ---p 00091000 00:12 86170 /usr/lib/libgmp.so.10.3.0 7fd9f2a4f000-7fd9f2a50000 r-xp 00091000 00:12 86170 /usr/lib/libgmp.so.10.3.0 7fd9f2a50000-7fd9f2a51000 rwxp 00092000 00:12 86170 /usr/lib/libgmp.so.10.3.0 7fd9f2a51000-7fd9f2a52000 rwxp 00000000 00:00 0 7fd9f2a52000-7fd9f2bc4000 r-xp 00000000 00:12 81497 /usr/lib/libstdc++.so.6.0.21 7fd9f2bc4000-7fd9f2dc4000 ---p 00172000 00:12 81497 /usr/lib/libstdc++.so.6.0.21 7fd9f2dc4000-7fd9f2dce000 r-xp 00172000 00:12 81497 /usr/lib/libstdc++.so.6.0.21 7fd9f2dce000-7fd9f2dd0000 rwxp 0017c000 00:12 81497 /usr/lib/libstdc++.so.6.0.21 7fd9f2dd0000-7fd9f2dd4000 rwxp 00000000 00:00 0 7fd9f2dd4000-7fd9f2ddd000 r-xp 00000000 00:12 87498 /usr/lib/libltdl.so.7.3.1 7fd9f2ddd000-7fd9f2fdc000 ---p 00009000 00:12 87498 /usr/lib/libltdl.so.7.3.1 7fd9f2fdc000-7fd9f2fdd000 r-xp 00008000 00:12 87498 /usr/lib/libltdl.so.7.3.1 7fd9f2fdd000-7fd9f2fde000 rwxp 00009000 00:12 87498 /usr/lib/libltdl.so.7.3.1 7fd9f2fde000-7fd9f3008000 r-xp 00000000 00:12 26113 /usr/lib/libmcrypt.so.4.4.8 7fd9f3008000-7fd9f3208000 ---p 0002a000 00:12 26113 /usr/lib/libmcrypt.so.4.4.8 7fd9f3208000-7fd9f320a000 r-xp 0002a000 00:12 26113 /usr/lib/libmcrypt.so.4.4.8 7fd9f320a000-7fd9f320c000 rwxp 0002c000 00:12 26113 /usr/lib/libmcrypt.so.4.4.8 7fd9f320c000-7fd9f3213000 rwxp 00000000 00:00 0 7fd9f3213000-7fd9f321a000 r-xp 00000000 00:12 53316 /usr/lib/librt-2.22.so 7fd9f321a000-7fd9f3419000 ---p 00007000 00:12 53316 /usr/lib/librt-2.22.so 7fd9f3419000-7fd9f341a000 r-xp 00006000 00:12 53316 /usr/lib/librt-2.22.so 7fd9f341a000-7fd9f341b000 rwxp 00007000 00:12 53316 /usr/lib/librt-2.22.so 7fd9f341b000-7fd9f342f000 r-xp 00000000 00:12 53315 /usr/lib/libresolv-2.22.so 7fd9f342f000-7fd9f362e000 ---p 00014000 00:12 53315 /usr/lib/libresolv-2.22.so 7fd9f362e000-7fd9f362f000 r-xp 00013000 00:12 53315 /usr/lib/libresolv-2.22.so 7fd9f362f000-7fd9f3630000 rwxp 00014000 00:12 53315 /usr/lib/libresolv-2.22.so 7fd9f3630000-7fd9f3632000 rwxp 00000000 00:00 0 7fd9f3632000-7fd9f363a000 r-xp 00000000 00:12 53304 /usr/lib/libcrypt-2.22.so 7fd9f363a000-7fd9f383a000 ---p 00008000 00:12 53304 /usr/lib/libcrypt-2.22.so 7fd9f383a000-7fd9f383b000 r-xp 00008000 00:12 53304 /usr/lib/libcrypt-2.22.so 7fd9f383b000-7fd9f383c000 rwxp 00009000 00:12 53304 /usr/lib/libcrypt-2.22.so 7fd9f383c000-7fd9f386b000 rwxp 00000000 00:00 0 7fd9f3876000-7fd9f3877000 rwxp 00000000 00:00 0 7fd9f3877000-7fd9f3899000 r-xp 00000000 00:12 53266 /usr/lib/ld-2.22.so 7fd9f3899000-7fd9f3a98000 ---p 00000000 00:00 0 7fd9f3a98000-7fd9f3a99000 r-xp 00021000 00:12 53266 /usr/lib/ld-2.22.so 7fd9f3a99000-7fd9f3a9a000 rwxp 00022000 00:12 53266 /usr/lib/ld-2.22.so 7fd9f3a9a000-7fd9f3a9b000 rwxp 00000000 00:00 0 7ffe5076a000-7ffe5078b000 rwxp 00000000 00:00 0 [stack] 7ffe50797000-7ffe50799000 r--p 00000000 00:00 0 [vvar] 7ffe50799000-7ffe5079b000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Process exited with code 134.