summaryrefslogtreecommitdiff
path: root/ext/phar/tests
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2013-03-14 05:42:27 +0000
committer <>2013-04-03 16:25:08 +0000
commitc4dd7a1a684490673e25aaf4fabec5df138854c4 (patch)
tree4d57c44caae4480efff02b90b9be86f44bf25409 /ext/phar/tests
downloadphp2-master.tar.gz
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/phar/tests')
-rw-r--r--ext/phar/tests/001.phpt12
-rw-r--r--ext/phar/tests/002.phpt17
-rw-r--r--ext/phar/tests/003.phpt13
-rw-r--r--ext/phar/tests/003a.phpt14
-rw-r--r--ext/phar/tests/004.phpt14
-rw-r--r--ext/phar/tests/005.phpt14
-rw-r--r--ext/phar/tests/006.phpt14
-rw-r--r--ext/phar/tests/007.phpt14
-rw-r--r--ext/phar/tests/008.phpt21
-rw-r--r--ext/phar/tests/009.phpt23
-rw-r--r--ext/phar/tests/010.phpt29
-rw-r--r--ext/phar/tests/011.phpt30
-rw-r--r--ext/phar/tests/012.phpt28
-rw-r--r--ext/phar/tests/013.phpt23
-rw-r--r--ext/phar/tests/014.phpt23
-rw-r--r--ext/phar/tests/015.phpt23
-rw-r--r--ext/phar/tests/015b.phpt23
-rw-r--r--ext/phar/tests/016.phpt39
-rw-r--r--ext/phar/tests/016b.phpt24
-rw-r--r--ext/phar/tests/017.phpt34
-rw-r--r--ext/phar/tests/017U.phpt34
-rw-r--r--ext/phar/tests/018.phpt36
-rw-r--r--ext/phar/tests/018U.phpt36
-rw-r--r--ext/phar/tests/019.phpt41
-rw-r--r--ext/phar/tests/019b.phpt68
-rw-r--r--ext/phar/tests/019bU.phpt70
-rw-r--r--ext/phar/tests/019c.phpt76
-rw-r--r--ext/phar/tests/019cU.phpt76
-rw-r--r--ext/phar/tests/020.phpt136
-rw-r--r--ext/phar/tests/021.phpt85
-rw-r--r--ext/phar/tests/022.phpt110
-rw-r--r--ext/phar/tests/023.phpt32
-rw-r--r--ext/phar/tests/024.phpt32
-rw-r--r--ext/phar/tests/025.phpt32
-rw-r--r--ext/phar/tests/026.phpt34
-rw-r--r--ext/phar/tests/027.phpt97
-rw-r--r--ext/phar/tests/027U.phpt97
-rw-r--r--ext/phar/tests/028.phpt47
-rw-r--r--ext/phar/tests/029.phpt50
-rw-r--r--ext/phar/tests/030.phpt48
-rw-r--r--ext/phar/tests/031.phpt31
-rw-r--r--ext/phar/tests/032.phpt29
-rw-r--r--ext/phar/tests/033.phpt47
-rw-r--r--ext/phar/tests/033a.phpt36
-rw-r--r--ext/phar/tests/addfuncs.phpt53
-rw-r--r--ext/phar/tests/alias_acrobatics.phpt46
-rw-r--r--ext/phar/tests/badparameters.phpt186
-rw-r--r--ext/phar/tests/bug13727.phpt4136
-rw-r--r--ext/phar/tests/bug13786.phpt32
-rw-r--r--ext/phar/tests/bug45218_SLOWTEST.phpt6092
-rw-r--r--ext/phar/tests/bug45218_SLOWTESTU.phpt6092
-rw-r--r--ext/phar/tests/bug46032.phpt34
-rw-r--r--ext/phar/tests/bug46060.phpt32
-rw-r--r--ext/phar/tests/bug46178.phpt20
-rw-r--r--ext/phar/tests/bug47085.phpt24
-rw-r--r--ext/phar/tests/bug48377.2.phpt25
-rw-r--r--ext/phar/tests/bug48377.phpt29
-rw-r--r--ext/phar/tests/bug52013.phpt40
-rw-r--r--ext/phar/tests/bug53872.phpt28
-rw-r--r--ext/phar/tests/bug53872/first.txt1
-rw-r--r--ext/phar/tests/bug53872/second.txt0
-rw-r--r--ext/phar/tests/bug53872/third.txt1
-rw-r--r--ext/phar/tests/bug54395.phpt16
-rw-r--r--ext/phar/tests/bug60164.phpt21
-rw-r--r--ext/phar/tests/bug60261.phpt19
-rw-r--r--ext/phar/tests/cache_list/copyonwrite1.phar.phpt14
-rw-r--r--ext/phar/tests/cache_list/copyonwrite10.phar.phpt24
-rw-r--r--ext/phar/tests/cache_list/copyonwrite11.phar.phpt22
-rw-r--r--ext/phar/tests/cache_list/copyonwrite12.phar.phpt24
-rw-r--r--ext/phar/tests/cache_list/copyonwrite13.phar.phpt15
-rw-r--r--ext/phar/tests/cache_list/copyonwrite14.phar.phpt15
-rw-r--r--ext/phar/tests/cache_list/copyonwrite15.phar.phpt14
-rw-r--r--ext/phar/tests/cache_list/copyonwrite16.phar.phpt14
-rw-r--r--ext/phar/tests/cache_list/copyonwrite17.phar.phpt14
-rw-r--r--ext/phar/tests/cache_list/copyonwrite18.phar.phpt14
-rw-r--r--ext/phar/tests/cache_list/copyonwrite19.phar.phpt14
-rw-r--r--ext/phar/tests/cache_list/copyonwrite2.phar.phpt17
-rw-r--r--ext/phar/tests/cache_list/copyonwrite20.phar.phpt14
-rw-r--r--ext/phar/tests/cache_list/copyonwrite21.phar.phpt15
-rw-r--r--ext/phar/tests/cache_list/copyonwrite22.phar.phpt15
-rw-r--r--ext/phar/tests/cache_list/copyonwrite23.phar.phpt17
-rw-r--r--ext/phar/tests/cache_list/copyonwrite24.phar.phpt15
-rw-r--r--ext/phar/tests/cache_list/copyonwrite25.phar.phpt16
-rw-r--r--ext/phar/tests/cache_list/copyonwrite3.phar.phpt16
-rw-r--r--ext/phar/tests/cache_list/copyonwrite4.phar.phpt15
-rw-r--r--ext/phar/tests/cache_list/copyonwrite4a.phpt20
-rw-r--r--ext/phar/tests/cache_list/copyonwrite5.phar.phpt27
-rw-r--r--ext/phar/tests/cache_list/copyonwrite6.phar.phpt29
-rw-r--r--ext/phar/tests/cache_list/copyonwrite7.phar.phpt14
-rw-r--r--ext/phar/tests/cache_list/copyonwrite8.phar.phpt14
-rw-r--r--ext/phar/tests/cache_list/copyonwrite9.phar.phpt23
-rw-r--r--ext/phar/tests/cache_list/files/blog.pharbin0 -> 468 bytes
-rw-r--r--ext/phar/tests/cache_list/files/blog.phar.inc20
-rw-r--r--ext/phar/tests/cache_list/files/config.xml9
-rw-r--r--ext/phar/tests/cache_list/files/extracted.inc1
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller.pharbin0 -> 331 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller.phar.inc13
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller10.pharbin0 -> 591 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller10.phar.inc20
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller11.pharbin0 -> 578 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller11.phar.inc20
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller12.pharbin0 -> 588 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller12.phar.inc20
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller13.pharbin0 -> 330 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller13.phar.inc14
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller14.pharbin0 -> 450 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller14.phar.inc19
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller16.pharbin0 -> 330 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller16.phar.inc16
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller17.pharbin0 -> 315 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller17.phar.inc16
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller18.pharbin0 -> 331 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller18.phar.inc19
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller19.pharbin0 -> 560 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller19.phar.inc25
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller2.pharbin0 -> 297 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller2.phar.inc12
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller3.pharbin0 -> 437 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller3.phar.inc18
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller4.pharbin0 -> 433 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller4.phar.inc18
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller5.pharbin0 -> 327 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller5.phar.inc12
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller6.pharbin0 -> 328 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller6.phar.inc12
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller7.pharbin0 -> 329 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller7.phar.inc12
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller8.pharbin0 -> 8970 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller8.phar.inc19
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller9.pharbin0 -> 448 bytes
-rw-r--r--ext/phar/tests/cache_list/files/frontcontroller9.phar.inc14
-rw-r--r--ext/phar/tests/cache_list/files/md5.pharbin0 -> 107 bytes
-rw-r--r--ext/phar/tests/cache_list/files/nophar.pharbin0 -> 7049 bytes
-rw-r--r--ext/phar/tests/cache_list/files/nophar.phar.inc10
-rw-r--r--ext/phar/tests/cache_list/files/openssl.pharbin0 -> 6901 bytes
-rw-r--r--ext/phar/tests/cache_list/files/openssl.phar.pubkey6
-rw-r--r--ext/phar/tests/cache_list/files/phar_oo_test.inc49
-rw-r--r--ext/phar/tests/cache_list/files/phar_test.inc78
-rw-r--r--ext/phar/tests/cache_list/files/private.pem15
-rw-r--r--ext/phar/tests/cache_list/files/sha1.pharbin0 -> 111 bytes
-rw-r--r--ext/phar/tests/cache_list/files/sha256.pharbin0 -> 123 bytes
-rw-r--r--ext/phar/tests/cache_list/files/sha512.pharbin0 -> 155 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write.pharbin0 -> 285 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write.phar.inc20
-rw-r--r--ext/phar/tests/cache_list/files/write10.pharbin0 -> 324 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write10.phar.inc18
-rw-r--r--ext/phar/tests/cache_list/files/write11.pharbin0 -> 284 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write11.phar.inc17
-rw-r--r--ext/phar/tests/cache_list/files/write12.pharbin0 -> 301 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write12.phar.inc17
-rw-r--r--ext/phar/tests/cache_list/files/write13.pharbin0 -> 316 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write13.phar.inc17
-rw-r--r--ext/phar/tests/cache_list/files/write14.pharbin0 -> 312 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write14.phar.inc18
-rw-r--r--ext/phar/tests/cache_list/files/write15.pharbin0 -> 270 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write15.phar.inc16
-rw-r--r--ext/phar/tests/cache_list/files/write16.pharbin0 -> 327 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write16.phar.inc17
-rw-r--r--ext/phar/tests/cache_list/files/write17.pharbin0 -> 258 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write17.phar.inc16
-rw-r--r--ext/phar/tests/cache_list/files/write18.pharbin0 -> 336 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write18.phar.inc17
-rw-r--r--ext/phar/tests/cache_list/files/write19.pharbin0 -> 304 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write19.phar.inc17
-rw-r--r--ext/phar/tests/cache_list/files/write2.pharbin0 -> 425 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write2.phar.inc23
-rw-r--r--ext/phar/tests/cache_list/files/write20.pharbin0 -> 299 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write20.phar.inc17
-rw-r--r--ext/phar/tests/cache_list/files/write21.pharbin0 -> 297 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write21.phar.inc16
-rw-r--r--ext/phar/tests/cache_list/files/write22.pharbin0 -> 293 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write22.phar.inc17
-rw-r--r--ext/phar/tests/cache_list/files/write23.pharbin0 -> 366 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write23.phar.inc16
-rw-r--r--ext/phar/tests/cache_list/files/write24.pharbin0 -> 327 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write24.phar.inc18
-rw-r--r--ext/phar/tests/cache_list/files/write25.pharbin0 -> 331 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write25.phar.inc16
-rw-r--r--ext/phar/tests/cache_list/files/write3.pharbin0 -> 447 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write3.phar.inc21
-rw-r--r--ext/phar/tests/cache_list/files/write4.pharbin0 -> 388 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write4.phar.inc16
-rw-r--r--ext/phar/tests/cache_list/files/write5.pharbin0 -> 564 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write5.phar.inc29
-rw-r--r--ext/phar/tests/cache_list/files/write6.pharbin0 -> 675 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write6.phar.inc30
-rw-r--r--ext/phar/tests/cache_list/files/write7.pharbin0 -> 316 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write7.phar.inc18
-rw-r--r--ext/phar/tests/cache_list/files/write8.pharbin0 -> 255 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write8.phar.inc18
-rw-r--r--ext/phar/tests/cache_list/files/write9.pharbin0 -> 277 bytes
-rw-r--r--ext/phar/tests/cache_list/files/write9.phar.inc18
-rw-r--r--ext/phar/tests/cache_list/files/zfapp.tgzbin0 -> 1725 bytes
-rw-r--r--ext/phar/tests/cache_list/frontcontroller1.phpt17
-rw-r--r--ext/phar/tests/cache_list/frontcontroller10.phpt25
-rw-r--r--ext/phar/tests/cache_list/frontcontroller11.phpt22
-rw-r--r--ext/phar/tests/cache_list/frontcontroller12.phpt21
-rw-r--r--ext/phar/tests/cache_list/frontcontroller13.phpt21
-rw-r--r--ext/phar/tests/cache_list/frontcontroller14.phpt17
-rw-r--r--ext/phar/tests/cache_list/frontcontroller15.phpt21
-rw-r--r--ext/phar/tests/cache_list/frontcontroller16.phpt18
-rw-r--r--ext/phar/tests/cache_list/frontcontroller17.phpt18
-rw-r--r--ext/phar/tests/cache_list/frontcontroller18.phpt18
-rw-r--r--ext/phar/tests/cache_list/frontcontroller19.phpt18
-rw-r--r--ext/phar/tests/cache_list/frontcontroller2.phpt17
-rw-r--r--ext/phar/tests/cache_list/frontcontroller20.phpt18
-rw-r--r--ext/phar/tests/cache_list/frontcontroller21.phpt25
-rw-r--r--ext/phar/tests/cache_list/frontcontroller22.phpt22
-rw-r--r--ext/phar/tests/cache_list/frontcontroller23.phpt18
-rw-r--r--ext/phar/tests/cache_list/frontcontroller24.phpt17
-rw-r--r--ext/phar/tests/cache_list/frontcontroller25.phpt18
-rw-r--r--ext/phar/tests/cache_list/frontcontroller26.phpt16
-rw-r--r--ext/phar/tests/cache_list/frontcontroller27.phpt17
-rw-r--r--ext/phar/tests/cache_list/frontcontroller28.phpt17
-rw-r--r--ext/phar/tests/cache_list/frontcontroller29.phpt17
-rw-r--r--ext/phar/tests/cache_list/frontcontroller3.phpt20
-rw-r--r--ext/phar/tests/cache_list/frontcontroller30.phpt14
-rw-r--r--ext/phar/tests/cache_list/frontcontroller31.phpt16
-rw-r--r--ext/phar/tests/cache_list/frontcontroller32.phpt16
-rw-r--r--ext/phar/tests/cache_list/frontcontroller33.phpt16
-rw-r--r--ext/phar/tests/cache_list/frontcontroller34.phpt19
-rw-r--r--ext/phar/tests/cache_list/frontcontroller4.phpt15
-rw-r--r--ext/phar/tests/cache_list/frontcontroller5.phpt16
-rw-r--r--ext/phar/tests/cache_list/frontcontroller6.phpt23
-rw-r--r--ext/phar/tests/cache_list/frontcontroller7.phpt16
-rw-r--r--ext/phar/tests/cache_list/frontcontroller8.phpt23
-rw-r--r--ext/phar/tests/cache_list/frontcontroller9.phpt20
-rw-r--r--ext/phar/tests/cached_manifest_1.phpt39
-rw-r--r--ext/phar/tests/cached_manifest_1U.phpt39
-rw-r--r--ext/phar/tests/create_new_and_modify.phpt48
-rw-r--r--ext/phar/tests/create_new_phar.phpt21
-rw-r--r--ext/phar/tests/create_new_phar_b.phpt27
-rw-r--r--ext/phar/tests/create_new_phar_c.phpt29
-rw-r--r--ext/phar/tests/create_path_error.phpt62
-rw-r--r--ext/phar/tests/delete.phpt31
-rw-r--r--ext/phar/tests/delete_in_phar.phpt48
-rw-r--r--ext/phar/tests/delete_in_phar_b.phpt46
-rw-r--r--ext/phar/tests/delete_in_phar_confirm.phpt51
-rw-r--r--ext/phar/tests/dir.phpt92
-rw-r--r--ext/phar/tests/fatal_error_webphar.phpt18
-rw-r--r--ext/phar/tests/fgc_edgecases.phpt99
-rw-r--r--ext/phar/tests/file_get_contents.phpt30
-rw-r--r--ext/phar/tests/files/blog.pharbin0 -> 523 bytes
-rw-r--r--ext/phar/tests/files/blog.phar.inc22
-rw-r--r--ext/phar/tests/files/config.xml9
-rw-r--r--ext/phar/tests/files/extracted.inc1
-rw-r--r--ext/phar/tests/files/frontcontroller.pharbin0 -> 331 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller.phar.inc13
-rw-r--r--ext/phar/tests/files/frontcontroller10.pharbin0 -> 591 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller10.phar.inc20
-rw-r--r--ext/phar/tests/files/frontcontroller11.pharbin0 -> 578 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller11.phar.inc20
-rw-r--r--ext/phar/tests/files/frontcontroller12.pharbin0 -> 588 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller12.phar.inc20
-rw-r--r--ext/phar/tests/files/frontcontroller13.pharbin0 -> 330 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller13.phar.inc14
-rw-r--r--ext/phar/tests/files/frontcontroller14.pharbin0 -> 450 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller14.phar.inc19
-rw-r--r--ext/phar/tests/files/frontcontroller16.pharbin0 -> 330 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller16.phar.inc16
-rw-r--r--ext/phar/tests/files/frontcontroller17.pharbin0 -> 315 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller17.phar.inc16
-rw-r--r--ext/phar/tests/files/frontcontroller18.pharbin0 -> 331 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller18.phar.inc19
-rw-r--r--ext/phar/tests/files/frontcontroller19.pharbin0 -> 560 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller19.phar.inc25
-rw-r--r--ext/phar/tests/files/frontcontroller2.pharbin0 -> 297 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller2.phar.inc12
-rw-r--r--ext/phar/tests/files/frontcontroller3.pharbin0 -> 438 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller3.phar.inc18
-rw-r--r--ext/phar/tests/files/frontcontroller4.pharbin0 -> 433 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller4.phar.inc18
-rw-r--r--ext/phar/tests/files/frontcontroller5.pharbin0 -> 327 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller5.phar.inc12
-rw-r--r--ext/phar/tests/files/frontcontroller6.pharbin0 -> 328 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller6.phar.inc12
-rw-r--r--ext/phar/tests/files/frontcontroller7.pharbin0 -> 329 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller7.phar.inc12
-rw-r--r--ext/phar/tests/files/frontcontroller8.pharbin0 -> 8970 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller8.phar.inc19
-rw-r--r--ext/phar/tests/files/frontcontroller9.pharbin0 -> 448 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller9.phar.inc14
-rw-r--r--ext/phar/tests/files/include_path.pharbin0 -> 470 bytes
-rw-r--r--ext/phar/tests/files/include_path.phar.inc19
-rw-r--r--ext/phar/tests/files/include_path2.pharbin0 -> 6837 bytes
-rw-r--r--ext/phar/tests/files/md5.pharbin0 -> 107 bytes
-rw-r--r--ext/phar/tests/files/nophar.pharbin0 -> 7049 bytes
-rw-r--r--ext/phar/tests/files/nophar.phar.inc10
-rw-r--r--ext/phar/tests/files/notbogus.zipbin0 -> 299 bytes
-rw-r--r--ext/phar/tests/files/openssl.cnf43
-rw-r--r--ext/phar/tests/files/openssl.pharbin0 -> 6901 bytes
-rw-r--r--ext/phar/tests/files/openssl.phar.pubkey6
-rw-r--r--ext/phar/tests/files/pear2coverage.phar.phpbin0 -> 55262 bytes
-rw-r--r--ext/phar/tests/files/phar_oo_test.inc49
-rw-r--r--ext/phar/tests/files/phar_test.inc78
-rw-r--r--ext/phar/tests/files/private.pem15
-rw-r--r--ext/phar/tests/files/sha1.pharbin0 -> 111 bytes
-rw-r--r--ext/phar/tests/files/sha256.pharbin0 -> 123 bytes
-rw-r--r--ext/phar/tests/files/sha512.pharbin0 -> 155 bytes
-rw-r--r--ext/phar/tests/files/stuboflength1041.pharbin0 -> 1168 bytes
-rw-r--r--ext/phar/tests/files/stuboflength1041.phar.inc21
-rw-r--r--ext/phar/tests/files/zfapp.tgzbin0 -> 1725 bytes
-rw-r--r--ext/phar/tests/fopen.phpt43
-rw-r--r--ext/phar/tests/fopen5.2.phpt43
-rw-r--r--ext/phar/tests/fopen_edgecases.phpt124
-rw-r--r--ext/phar/tests/fopen_edgecases2.phpt44
-rw-r--r--ext/phar/tests/fopen_edgecases2U.phpt46
-rw-r--r--ext/phar/tests/front.phar.phpt25
-rw-r--r--ext/phar/tests/frontcontroller1.phpt15
-rw-r--r--ext/phar/tests/frontcontroller10.phpt24
-rw-r--r--ext/phar/tests/frontcontroller11.phpt21
-rw-r--r--ext/phar/tests/frontcontroller12.phpt20
-rw-r--r--ext/phar/tests/frontcontroller13.phpt20
-rw-r--r--ext/phar/tests/frontcontroller14.phpt15
-rw-r--r--ext/phar/tests/frontcontroller15.phpt20
-rw-r--r--ext/phar/tests/frontcontroller16.phpt17
-rw-r--r--ext/phar/tests/frontcontroller17.phpt16
-rw-r--r--ext/phar/tests/frontcontroller18.phpt16
-rw-r--r--ext/phar/tests/frontcontroller19.phpt16
-rw-r--r--ext/phar/tests/frontcontroller2.phpt16
-rw-r--r--ext/phar/tests/frontcontroller20.phpt16
-rw-r--r--ext/phar/tests/frontcontroller21.phpt24
-rw-r--r--ext/phar/tests/frontcontroller22.phpt21
-rw-r--r--ext/phar/tests/frontcontroller23.phpt17
-rw-r--r--ext/phar/tests/frontcontroller24.phpt16
-rw-r--r--ext/phar/tests/frontcontroller25.phpt17
-rw-r--r--ext/phar/tests/frontcontroller26.phpt14
-rw-r--r--ext/phar/tests/frontcontroller27.phpt16
-rw-r--r--ext/phar/tests/frontcontroller28.phpt16
-rw-r--r--ext/phar/tests/frontcontroller29.phpt16
-rw-r--r--ext/phar/tests/frontcontroller3.phpt19
-rw-r--r--ext/phar/tests/frontcontroller30.phpt12
-rw-r--r--ext/phar/tests/frontcontroller31.phpt15
-rw-r--r--ext/phar/tests/frontcontroller32.phpt15
-rw-r--r--ext/phar/tests/frontcontroller33.phpt15
-rw-r--r--ext/phar/tests/frontcontroller34.phpt18
-rw-r--r--ext/phar/tests/frontcontroller4.phpt13
-rw-r--r--ext/phar/tests/frontcontroller5.phpt14
-rw-r--r--ext/phar/tests/frontcontroller6.phpt21
-rw-r--r--ext/phar/tests/frontcontroller7.phpt14
-rw-r--r--ext/phar/tests/frontcontroller8.phpt21
-rw-r--r--ext/phar/tests/frontcontroller9.phpt19
-rw-r--r--ext/phar/tests/include_path.phpt34
-rw-r--r--ext/phar/tests/include_path_advanced.phpt12
-rw-r--r--ext/phar/tests/ini_set.phpt34
-rw-r--r--ext/phar/tests/ini_set_off.phpt88
-rw-r--r--ext/phar/tests/ini_set_offU.phpt88
-rw-r--r--ext/phar/tests/invalid_alias.phpt45
-rw-r--r--ext/phar/tests/invalid_setstubalias.phpt47
-rw-r--r--ext/phar/tests/metadata_read.phpt64
-rw-r--r--ext/phar/tests/metadata_readU.phpt64
-rw-r--r--ext/phar/tests/metadata_write.phpt65
-rw-r--r--ext/phar/tests/metadata_writeU.phpt65
-rw-r--r--ext/phar/tests/metadata_write_commit.phpt82
-rw-r--r--ext/phar/tests/metadata_write_commitU.phpt82
-rw-r--r--ext/phar/tests/mkdir.phpt47
-rw-r--r--ext/phar/tests/mounteddir.phpt118
-rw-r--r--ext/phar/tests/mounteddirU.phpt118
-rw-r--r--ext/phar/tests/nophar.phpt14
-rw-r--r--ext/phar/tests/nophar_web.phpt11
-rw-r--r--ext/phar/tests/open_for_write_existing.phpt31
-rw-r--r--ext/phar/tests/open_for_write_existing_b.phpt45
-rw-r--r--ext/phar/tests/open_for_write_existing_b_5_2.phpt43
-rw-r--r--ext/phar/tests/open_for_write_existing_c.phpt39
-rw-r--r--ext/phar/tests/open_for_write_existing_c_5_2.phpt37
-rw-r--r--ext/phar/tests/open_for_write_newfile.phpt33
-rw-r--r--ext/phar/tests/open_for_write_newfile_b.phpt52
-rw-r--r--ext/phar/tests/open_for_write_newfile_b_5_2.phpt50
-rw-r--r--ext/phar/tests/open_for_write_newfile_c.phpt46
-rw-r--r--ext/phar/tests/open_for_write_newfile_c_5_2.phpt44
-rw-r--r--ext/phar/tests/opendir.phpt44
-rw-r--r--ext/phar/tests/opendir_edgecases.phpt61
-rw-r--r--ext/phar/tests/phar_begin_setstub_commit.phpt53
-rw-r--r--ext/phar/tests/phar_begin_setstub_commitU.phpt53
-rw-r--r--ext/phar/tests/phar_buildfromdirectory1.phpt28
-rw-r--r--ext/phar/tests/phar_buildfromdirectory2-win.phpt30
-rw-r--r--ext/phar/tests/phar_buildfromdirectory2.phpt30
-rw-r--r--ext/phar/tests/phar_buildfromdirectory3.phpt27
-rw-r--r--ext/phar/tests/phar_buildfromdirectory4.phpt51
-rw-r--r--ext/phar/tests/phar_buildfromdirectory5.phpt50
-rw-r--r--ext/phar/tests/phar_buildfromdirectory6.phpt40
-rw-r--r--ext/phar/tests/phar_buildfromiterator1.phpt28
-rw-r--r--ext/phar/tests/phar_buildfromiterator10.phpt104
-rw-r--r--ext/phar/tests/phar_buildfromiterator2.phpt26
-rw-r--r--ext/phar/tests/phar_buildfromiterator3.phpt54
-rw-r--r--ext/phar/tests/phar_buildfromiterator4.phpt83
-rw-r--r--ext/phar/tests/phar_buildfromiterator5.phpt59
-rw-r--r--ext/phar/tests/phar_buildfromiterator6.phpt60
-rw-r--r--ext/phar/tests/phar_buildfromiterator7.phpt60
-rw-r--r--ext/phar/tests/phar_buildfromiterator8.phpt95
-rw-r--r--ext/phar/tests/phar_buildfromiterator9.phpt65
-rw-r--r--ext/phar/tests/phar_bz2.phpt65
-rw-r--r--ext/phar/tests/phar_commitwrite.phpt42
-rw-r--r--ext/phar/tests/phar_construct_invalidurl.phpt30
-rw-r--r--ext/phar/tests/phar_convert_again.phpt205
-rw-r--r--ext/phar/tests/phar_convert_repeated.phpt149
-rw-r--r--ext/phar/tests/phar_convert_repeated_b.phpt118
-rw-r--r--ext/phar/tests/phar_convert_tar.phpt57
-rw-r--r--ext/phar/tests/phar_convert_tar2.phpt64
-rw-r--r--ext/phar/tests/phar_convert_tar3.phpt65
-rw-r--r--ext/phar/tests/phar_convert_zip.phpt56
-rw-r--r--ext/phar/tests/phar_copy.phpt84
-rw-r--r--ext/phar/tests/phar_create_in_cwd.phpt45
-rw-r--r--ext/phar/tests/phar_createdefaultstub.phpt929
-rw-r--r--ext/phar/tests/phar_ctx_001.phpt100
-rw-r--r--ext/phar/tests/phar_decompress.phpt69
-rw-r--r--ext/phar/tests/phar_dir_iterate.phpt32
-rw-r--r--ext/phar/tests/phar_dotted_path.phpt41
-rw-r--r--ext/phar/tests/phar_extract.phpt150
-rw-r--r--ext/phar/tests/phar_extract2.phpt60
-rw-r--r--ext/phar/tests/phar_extract3.phpt46
-rw-r--r--ext/phar/tests/phar_get_supported_signatures_001.phpt26
-rw-r--r--ext/phar/tests/phar_get_supported_signatures_001a.phpt28
-rw-r--r--ext/phar/tests/phar_get_supported_signatures_002.phpt31
-rw-r--r--ext/phar/tests/phar_get_supported_signatures_002a.phpt32
-rw-r--r--ext/phar/tests/phar_get_supportedcomp1.phpt22
-rw-r--r--ext/phar/tests/phar_get_supportedcomp2.phpt20
-rw-r--r--ext/phar/tests/phar_get_supportedcomp3.phpt20
-rw-r--r--ext/phar/tests/phar_get_supportedcomp4.phpt16
-rw-r--r--ext/phar/tests/phar_gobyebye-win32.phpt48
-rw-r--r--ext/phar/tests/phar_gobyebye.phpt47
-rw-r--r--ext/phar/tests/phar_gzip.phpt62
-rw-r--r--ext/phar/tests/phar_gzipU.phpt57
-rw-r--r--ext/phar/tests/phar_isvalidpharfilename.phpt140
-rw-r--r--ext/phar/tests/phar_magic.phpt34
-rw-r--r--ext/phar/tests/phar_metadata_read.phpt98
-rw-r--r--ext/phar/tests/phar_metadata_readU.phpt98
-rw-r--r--ext/phar/tests/phar_metadata_write.phpt74
-rw-r--r--ext/phar/tests/phar_metadata_writeU.phpt74
-rw-r--r--ext/phar/tests/phar_mount.phpt63
-rw-r--r--ext/phar/tests/phar_offset_check.phpt78
-rw-r--r--ext/phar/tests/phar_offset_get_error.phpt51
-rw-r--r--ext/phar/tests/phar_oo_001.phpt57
-rw-r--r--ext/phar/tests/phar_oo_001U.phpt57
-rw-r--r--ext/phar/tests/phar_oo_002.phpt140
-rw-r--r--ext/phar/tests/phar_oo_002U.phpt140
-rw-r--r--ext/phar/tests/phar_oo_003.phpt45
-rw-r--r--ext/phar/tests/phar_oo_004.phpt129
-rw-r--r--ext/phar/tests/phar_oo_004U.phpt129
-rw-r--r--ext/phar/tests/phar_oo_005.phpt64
-rw-r--r--ext/phar/tests/phar_oo_005U.phpt63
-rw-r--r--ext/phar/tests/phar_oo_005_5.2.phpt63
-rw-r--r--ext/phar/tests/phar_oo_006.phpt52
-rw-r--r--ext/phar/tests/phar_oo_007.phpt87
-rw-r--r--ext/phar/tests/phar_oo_008.phpt119
-rw-r--r--ext/phar/tests/phar_oo_009.phpt56
-rw-r--r--ext/phar/tests/phar_oo_010.phpt55
-rw-r--r--ext/phar/tests/phar_oo_011.phpt36
-rw-r--r--ext/phar/tests/phar_oo_011b.phpt39
-rw-r--r--ext/phar/tests/phar_oo_012.phpt37
-rw-r--r--ext/phar/tests/phar_oo_012_confirm.phpt40
-rw-r--r--ext/phar/tests/phar_oo_012b.phpt42
-rw-r--r--ext/phar/tests/phar_oo_compressallbz2.phpt66
-rw-r--r--ext/phar/tests/phar_oo_compressallgz.phpt71
-rw-r--r--ext/phar/tests/phar_oo_compressed_001.phpt68
-rw-r--r--ext/phar/tests/phar_oo_compressed_001b.phpt68
-rw-r--r--ext/phar/tests/phar_oo_compressed_002.phpt73
-rw-r--r--ext/phar/tests/phar_oo_compressed_002b.phpt73
-rw-r--r--ext/phar/tests/phar_oo_getcontents.phpt39
-rw-r--r--ext/phar/tests/phar_oo_getcontentsgz.phpt34
-rw-r--r--ext/phar/tests/phar_oo_getmodified.phpt36
-rw-r--r--ext/phar/tests/phar_oo_iswriteable.phpt84
-rw-r--r--ext/phar/tests/phar_oo_nosig.phpt24
-rw-r--r--ext/phar/tests/phar_oo_uncompressall.phpt80
-rw-r--r--ext/phar/tests/phar_running.phpt29
-rw-r--r--ext/phar/tests/phar_setalias.phpt36
-rw-r--r--ext/phar/tests/phar_setalias2.phpt51
-rw-r--r--ext/phar/tests/phar_setdefaultstub.phpt944
-rw-r--r--ext/phar/tests/phar_setsignaturealgo1.phpt70
-rw-r--r--ext/phar/tests/phar_setsignaturealgo2.phpt90
-rw-r--r--ext/phar/tests/phar_stub.phpt92
-rw-r--r--ext/phar/tests/phar_stub_error.phpt56
-rw-r--r--ext/phar/tests/phar_stub_write.phpt64
-rw-r--r--ext/phar/tests/phar_stub_write_file.phpt65
-rw-r--r--ext/phar/tests/phar_unlinkarchive.phpt108
-rw-r--r--ext/phar/tests/pharfileinfo_chmod.phpt33
-rw-r--r--ext/phar/tests/pharfileinfo_compression.phpt94
-rw-r--r--ext/phar/tests/pharfileinfo_construct.phpt54
-rw-r--r--ext/phar/tests/pharfileinfo_destruct.phpt25
-rw-r--r--ext/phar/tests/pharfileinfo_getcrc32.phpt49
-rw-r--r--ext/phar/tests/pharfileinfo_setmetadata.phpt53
-rw-r--r--ext/phar/tests/phpinfo_001.phpt68
-rw-r--r--ext/phar/tests/phpinfo_002.phpt44
-rw-r--r--ext/phar/tests/phpinfo_003.phpt44
-rw-r--r--ext/phar/tests/phpinfo_004.phpt75
-rw-r--r--ext/phar/tests/readfile.phpt30
-rw-r--r--ext/phar/tests/readfile_edgecases.phpt63
-rw-r--r--ext/phar/tests/readfile_edgecasesU.phpt61
-rw-r--r--ext/phar/tests/refcount1.phpt62
-rw-r--r--ext/phar/tests/refcount1_5_2.phpt64
-rw-r--r--ext/phar/tests/rename.phpt32
-rw-r--r--ext/phar/tests/rename_dir.phpt33
-rw-r--r--ext/phar/tests/rename_dir_and_mount.phpt65
-rw-r--r--ext/phar/tests/rmdir.phpt35
-rw-r--r--ext/phar/tests/security.phpt36
-rw-r--r--ext/phar/tests/stat.phpt225
-rw-r--r--ext/phar/tests/stat2.phpt61
-rw-r--r--ext/phar/tests/stat2_5.3.phpt61
-rw-r--r--ext/phar/tests/tar/033.phpt50
-rw-r--r--ext/phar/tests/tar/033a.phpt45
-rw-r--r--ext/phar/tests/tar/alias_acrobatics.phpt46
-rw-r--r--ext/phar/tests/tar/all.phpt59
-rw-r--r--ext/phar/tests/tar/allU.phpt59
-rw-r--r--ext/phar/tests/tar/badalias.phpt25
-rw-r--r--ext/phar/tests/tar/badchecksum.phpt30
-rw-r--r--ext/phar/tests/tar/bignames.phpt57
-rw-r--r--ext/phar/tests/tar/bignames_overflow.phpt40
-rw-r--r--ext/phar/tests/tar/bug49910.phpt50
-rw-r--r--ext/phar/tests/tar/create_new_and_modify.phpt45
-rw-r--r--ext/phar/tests/tar/create_new_phar_b.phpt27
-rw-r--r--ext/phar/tests/tar/delete.phpt32
-rw-r--r--ext/phar/tests/tar/delete_in_phar.phpt49
-rw-r--r--ext/phar/tests/tar/delete_in_phar_b.phpt49
-rw-r--r--ext/phar/tests/tar/delete_in_phar_confirm.phpt52
-rw-r--r--ext/phar/tests/tar/dir.phpt45
-rw-r--r--ext/phar/tests/tar/exists_as_phar.phpt38
-rw-r--r--ext/phar/tests/tar/files/Net_URL-1.0.15.tgzbin0 -> 6303 bytes
-rw-r--r--ext/phar/tests/tar/files/P1-1.0.0.tgzbin0 -> 1284 bytes
-rw-r--r--ext/phar/tests/tar/files/P1-1.0.0.tgz.pubkey9
-rw-r--r--ext/phar/tests/tar/files/Structures_Graph-1.0.3.tgzbin0 -> 30191 bytes
-rw-r--r--ext/phar/tests/tar/files/badalias1.phar.tarbin0 -> 3072 bytes
-rw-r--r--ext/phar/tests/tar/files/badalias2.phar.tarbin0 -> 3072 bytes
-rw-r--r--ext/phar/tests/tar/files/badalias3.phar.tarbin0 -> 3072 bytes
-rw-r--r--ext/phar/tests/tar/files/badalias4.phar.tarbin0 -> 3072 bytes
-rw-r--r--ext/phar/tests/tar/files/badalias5.phar.tarbin0 -> 3584 bytes
-rw-r--r--ext/phar/tests/tar/files/biglink.tarbin0 -> 10240 bytes
-rw-r--r--ext/phar/tests/tar/files/corrupt_tarmaker.php.inc177
-rw-r--r--ext/phar/tests/tar/files/frontcontroller.phar.inc13
-rw-r--r--ext/phar/tests/tar/files/frontcontroller.phar.tarbin0 -> 7168 bytes
-rw-r--r--ext/phar/tests/tar/files/frontcontroller10.phar.inc20
-rw-r--r--ext/phar/tests/tar/files/frontcontroller10.phar.tarbin0 -> 4096 bytes
-rw-r--r--ext/phar/tests/tar/files/frontcontroller11.phar.inc20
-rw-r--r--ext/phar/tests/tar/files/frontcontroller11.phar.tarbin0 -> 4096 bytes
-rw-r--r--ext/phar/tests/tar/files/frontcontroller12.phar.inc20
-rw-r--r--ext/phar/tests/tar/files/frontcontroller12.phar.tarbin0 -> 4096 bytes
-rw-r--r--ext/phar/tests/tar/files/frontcontroller2.phar.inc12
-rw-r--r--ext/phar/tests/tar/files/frontcontroller2.phar.tarbin0 -> 6144 bytes
-rw-r--r--ext/phar/tests/tar/files/frontcontroller3.phar.inc18
-rw-r--r--ext/phar/tests/tar/files/frontcontroller3.phar.tarbin0 -> 6144 bytes
-rw-r--r--ext/phar/tests/tar/files/frontcontroller4.phar.inc18
-rw-r--r--ext/phar/tests/tar/files/frontcontroller4.phar.tarbin0 -> 6144 bytes
-rw-r--r--ext/phar/tests/tar/files/frontcontroller5.phar.inc12
-rw-r--r--ext/phar/tests/tar/files/frontcontroller5.phar.tarbin0 -> 6144 bytes
-rw-r--r--ext/phar/tests/tar/files/frontcontroller6.phar.inc12
-rw-r--r--ext/phar/tests/tar/files/frontcontroller6.phar.tarbin0 -> 6144 bytes
-rw-r--r--ext/phar/tests/tar/files/frontcontroller7.phar.inc12
-rw-r--r--ext/phar/tests/tar/files/frontcontroller7.phar.tarbin0 -> 6144 bytes
-rw-r--r--ext/phar/tests/tar/files/frontcontroller8.phar.inc13
-rw-r--r--ext/phar/tests/tar/files/frontcontroller8.phar.tarbin0 -> 7168 bytes
-rw-r--r--ext/phar/tests/tar/files/frontcontroller9.phar.inc14
-rw-r--r--ext/phar/tests/tar/files/frontcontroller9.phar.tarbin0 -> 7168 bytes
-rw-r--r--ext/phar/tests/tar/files/links.phar.tarbin0 -> 10240 bytes
-rw-r--r--ext/phar/tests/tar/files/links.tarbin0 -> 10240 bytes
-rw-r--r--ext/phar/tests/tar/files/make.dangerous.tar.php.inc170
-rw-r--r--ext/phar/tests/tar/files/make_invalid_tar.php.inc9
-rw-r--r--ext/phar/tests/tar/files/subdirlink.tarbin0 -> 10240 bytes
-rw-r--r--ext/phar/tests/tar/files/tarmaker.php.inc169
-rw-r--r--ext/phar/tests/tar/files/tinylink.tarbin0 -> 10240 bytes
-rw-r--r--ext/phar/tests/tar/files/trunc.tarbin0 -> 800 bytes
-rw-r--r--ext/phar/tests/tar/frontcontroller1.phar.phpt15
-rw-r--r--ext/phar/tests/tar/frontcontroller10.phar.phpt24
-rw-r--r--ext/phar/tests/tar/frontcontroller11.phar.phpt21
-rw-r--r--ext/phar/tests/tar/frontcontroller12.phar.phpt20
-rw-r--r--ext/phar/tests/tar/frontcontroller13.phar.phpt20
-rw-r--r--ext/phar/tests/tar/frontcontroller14.phar.phpt15
-rw-r--r--ext/phar/tests/tar/frontcontroller15.phar.phpt20
-rw-r--r--ext/phar/tests/tar/frontcontroller16.phar.phpt17
-rw-r--r--ext/phar/tests/tar/frontcontroller17.phar.phpt16
-rw-r--r--ext/phar/tests/tar/frontcontroller18.phar.phpt16
-rw-r--r--ext/phar/tests/tar/frontcontroller19.phar.phpt16
-rw-r--r--ext/phar/tests/tar/frontcontroller2.phar.phpt16
-rw-r--r--ext/phar/tests/tar/frontcontroller20.phar.phpt16
-rw-r--r--ext/phar/tests/tar/frontcontroller21.phar.phpt24
-rw-r--r--ext/phar/tests/tar/frontcontroller3.phar.phpt19
-rw-r--r--ext/phar/tests/tar/frontcontroller4.phar.phpt13
-rw-r--r--ext/phar/tests/tar/frontcontroller5.phar.phpt14
-rw-r--r--ext/phar/tests/tar/frontcontroller6.phar.phpt21
-rw-r--r--ext/phar/tests/tar/frontcontroller7.phar.phpt14
-rw-r--r--ext/phar/tests/tar/frontcontroller8.phar.phpt21
-rw-r--r--ext/phar/tests/tar/frontcontroller9.phar.phpt19
-rw-r--r--ext/phar/tests/tar/links.phpt35
-rw-r--r--ext/phar/tests/tar/links2.phpt35
-rw-r--r--ext/phar/tests/tar/links3.phpt21
-rw-r--r--ext/phar/tests/tar/links4.phpt21
-rw-r--r--ext/phar/tests/tar/links5.phpt21
-rw-r--r--ext/phar/tests/tar/links6.phpt29
-rw-r--r--ext/phar/tests/tar/open_for_write_existing.phpt42
-rw-r--r--ext/phar/tests/tar/open_for_write_existing_b.phpt59
-rw-r--r--ext/phar/tests/tar/open_for_write_existing_b_5_2.phpt57
-rw-r--r--ext/phar/tests/tar/open_for_write_existing_c.phpt53
-rw-r--r--ext/phar/tests/tar/open_for_write_existing_c_5_2.phpt51
-rw-r--r--ext/phar/tests/tar/open_for_write_newfile.phpt44
-rw-r--r--ext/phar/tests/tar/open_for_write_newfile_b.phpt64
-rw-r--r--ext/phar/tests/tar/open_for_write_newfile_b_5_2.phpt62
-rw-r--r--ext/phar/tests/tar/open_for_write_newfile_c.phpt57
-rw-r--r--ext/phar/tests/tar/open_for_write_newfile_c_5_2.phpt55
-rw-r--r--ext/phar/tests/tar/phar_begin_setstub_commit.phpt54
-rw-r--r--ext/phar/tests/tar/phar_begin_setstub_commitU.phpt54
-rw-r--r--ext/phar/tests/tar/phar_buildfromiterator4.phpt66
-rw-r--r--ext/phar/tests/tar/phar_buildfromiterator5.phpt59
-rw-r--r--ext/phar/tests/tar/phar_buildfromiterator6.phpt60
-rw-r--r--ext/phar/tests/tar/phar_buildfromiterator7.phpt60
-rw-r--r--ext/phar/tests/tar/phar_buildfromiterator8.phpt73
-rw-r--r--ext/phar/tests/tar/phar_buildfromiterator9.phpt65
-rw-r--r--ext/phar/tests/tar/phar_commitwrite.phpt47
-rw-r--r--ext/phar/tests/tar/phar_convert_phar.phpt58
-rw-r--r--ext/phar/tests/tar/phar_convert_phar2.phpt62
-rw-r--r--ext/phar/tests/tar/phar_convert_phar3.phpt62
-rw-r--r--ext/phar/tests/tar/phar_convert_phar4.phpt71
-rw-r--r--ext/phar/tests/tar/phar_copy.phpt56
-rw-r--r--ext/phar/tests/tar/phar_magic.phpt36
-rw-r--r--ext/phar/tests/tar/phar_setalias.phpt51
-rw-r--r--ext/phar/tests/tar/phar_setalias2.phpt53
-rw-r--r--ext/phar/tests/tar/phar_setdefaultstub.phpt80
-rw-r--r--ext/phar/tests/tar/phar_setsignaturealgo2.phpt91
-rw-r--r--ext/phar/tests/tar/phar_stub.phpt75
-rw-r--r--ext/phar/tests/tar/phar_stub_error.phpt55
-rw-r--r--ext/phar/tests/tar/refcount1.phpt74
-rw-r--r--ext/phar/tests/tar/refcount1_5_2.phpt64
-rw-r--r--ext/phar/tests/tar/rename.phpt42
-rw-r--r--ext/phar/tests/tar/rename_dir.phpt42
-rw-r--r--ext/phar/tests/tar/require_hash.phpt57
-rw-r--r--ext/phar/tests/tar/rmdir.phpt46
-rw-r--r--ext/phar/tests/tar/tar_001.phpt31
-rw-r--r--ext/phar/tests/tar/tar_002.phpt34
-rw-r--r--ext/phar/tests/tar/tar_003.phpt71
-rw-r--r--ext/phar/tests/tar/tar_004.phpt42
-rw-r--r--ext/phar/tests/tar/tar_004U.phpt42
-rw-r--r--ext/phar/tests/tar/tar_bz2.phpt63
-rw-r--r--ext/phar/tests/tar/tar_bz2U.phpt63
-rw-r--r--ext/phar/tests/tar/tar_gzip.phpt55
-rw-r--r--ext/phar/tests/tar/tar_gzipU.phpt55
-rw-r--r--ext/phar/tests/tar/tar_makebz2.phpt40
-rw-r--r--ext/phar/tests/tar/tar_makegz.phpt41
-rw-r--r--ext/phar/tests/tar/tar_nohash.phpt23
-rw-r--r--ext/phar/tests/tar/tar_nostub.phpt49
-rw-r--r--ext/phar/tests/tar/tar_openssl_hash.phpt22
-rw-r--r--ext/phar/tests/tar/truncated.phpt22
-rw-r--r--ext/phar/tests/test_alias_unset.phpt45
-rw-r--r--ext/phar/tests/test_signaturealgos.phpt39
-rw-r--r--ext/phar/tests/test_unset.phpt42
-rw-r--r--ext/phar/tests/webphar_compilefail.phpt17
-rw-r--r--ext/phar/tests/withphar.phpt14
-rw-r--r--ext/phar/tests/withphar_web.phpt16
-rw-r--r--ext/phar/tests/zf_test.phpt50
-rw-r--r--ext/phar/tests/zip/033.phpt56
-rw-r--r--ext/phar/tests/zip/033a.phpt45
-rw-r--r--ext/phar/tests/zip/alias_acrobatics.phpt46
-rw-r--r--ext/phar/tests/zip/all.phpt66
-rw-r--r--ext/phar/tests/zip/allU.phpt65
-rw-r--r--ext/phar/tests/zip/badalias.phpt25
-rw-r--r--ext/phar/tests/zip/bug48791.phpt15
-rw-r--r--ext/phar/tests/zip/bzip2.phpt83
-rw-r--r--ext/phar/tests/zip/corrupt_001.phpt23
-rw-r--r--ext/phar/tests/zip/corrupt_002.phpt17
-rw-r--r--ext/phar/tests/zip/corrupt_003.phpt17
-rw-r--r--ext/phar/tests/zip/corrupt_004.phpt17
-rw-r--r--ext/phar/tests/zip/corrupt_005.phpt17
-rw-r--r--ext/phar/tests/zip/corrupt_006.phpt17
-rw-r--r--ext/phar/tests/zip/corrupt_007.phpt17
-rw-r--r--ext/phar/tests/zip/corrupt_008.phpt101
-rw-r--r--ext/phar/tests/zip/corrupt_009.phpt17
-rw-r--r--ext/phar/tests/zip/corrupt_010.phpt17
-rw-r--r--ext/phar/tests/zip/create_new_and_modify.phpt45
-rw-r--r--ext/phar/tests/zip/create_new_phar_b.phpt27
-rw-r--r--ext/phar/tests/zip/delete.phpt31
-rw-r--r--ext/phar/tests/zip/delete_in_phar.phpt49
-rw-r--r--ext/phar/tests/zip/delete_in_phar_b.phpt48
-rw-r--r--ext/phar/tests/zip/delete_in_phar_confirm.phpt53
-rw-r--r--ext/phar/tests/zip/dir.phpt43
-rw-r--r--ext/phar/tests/zip/exists_as_phar.phpt38
-rw-r--r--ext/phar/tests/zip/files/badalias1.phar.zipbin0 -> 353 bytes
-rw-r--r--ext/phar/tests/zip/files/badalias2.phar.zipbin0 -> 353 bytes
-rw-r--r--ext/phar/tests/zip/files/badalias3.phar.zipbin0 -> 353 bytes
-rw-r--r--ext/phar/tests/zip/files/badalias4.phar.zipbin0 -> 353 bytes
-rw-r--r--ext/phar/tests/zip/files/badalias5.phar.zipbin0 -> 353 bytes
-rw-r--r--ext/phar/tests/zip/files/bz2_alias.phar.zipbin0 -> 105534 bytes
-rw-r--r--ext/phar/tests/zip/files/bzip2.zipbin0 -> 603 bytes
-rw-r--r--ext/phar/tests/zip/files/cdir_offset.zipbin0 -> 191 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsup1.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsup10.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsup14.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsup18.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsup19.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsup2.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsup3.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsup4.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsup5.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsup6.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsup7.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsup9.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsup97.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsup98.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/compress_unsupunknown.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/corrupt2.php.inc60
-rw-r--r--ext/phar/tests/zip/files/corrupt3.php.inc9
-rw-r--r--ext/phar/tests/zip/files/corrupt_count1.php.inc11
-rw-r--r--ext/phar/tests/zip/files/corrupt_zipmaker.php.inc332
-rw-r--r--ext/phar/tests/zip/files/count1.zipbin0 -> 191 bytes
-rw-r--r--ext/phar/tests/zip/files/count2.zipbin0 -> 191 bytes
-rw-r--r--ext/phar/tests/zip/files/disknumber.zipbin0 -> 105 bytes
-rw-r--r--ext/phar/tests/zip/files/encrypted.zipbin0 -> 191 bytes
-rw-r--r--ext/phar/tests/zip/files/extralen_toolong.zipbin0 -> 112 bytes
-rw-r--r--ext/phar/tests/zip/files/filecomment.zipbin0 -> 191 bytes
-rw-r--r--ext/phar/tests/zip/files/frontcontroller.phar.inc13
-rw-r--r--ext/phar/tests/zip/files/frontcontroller.phar.zipbin0 -> 804 bytes
-rw-r--r--ext/phar/tests/zip/files/frontcontroller10.phar.inc20
-rw-r--r--ext/phar/tests/zip/files/frontcontroller10.phar.zipbin0 -> 796 bytes
-rw-r--r--ext/phar/tests/zip/files/frontcontroller11.phar.inc20
-rw-r--r--ext/phar/tests/zip/files/frontcontroller11.phar.zipbin0 -> 783 bytes
-rw-r--r--ext/phar/tests/zip/files/frontcontroller12.phar.inc20
-rw-r--r--ext/phar/tests/zip/files/frontcontroller12.phar.zipbin0 -> 793 bytes
-rw-r--r--ext/phar/tests/zip/files/frontcontroller2.phar.inc12
-rw-r--r--ext/phar/tests/zip/files/frontcontroller2.phar.zipbin0 -> 677 bytes
-rw-r--r--ext/phar/tests/zip/files/frontcontroller3.phar.inc18
-rw-r--r--ext/phar/tests/zip/files/frontcontroller3.phar.zipbin0 -> 818 bytes
-rw-r--r--ext/phar/tests/zip/files/frontcontroller4.phar.inc18
-rw-r--r--ext/phar/tests/zip/files/frontcontroller4.phar.zipbin0 -> 813 bytes
-rw-r--r--ext/phar/tests/zip/files/frontcontroller5.phar.inc12
-rw-r--r--ext/phar/tests/zip/files/frontcontroller5.phar.zipbin0 -> 707 bytes
-rw-r--r--ext/phar/tests/zip/files/frontcontroller6.phar.inc12
-rw-r--r--ext/phar/tests/zip/files/frontcontroller6.phar.zipbin0 -> 708 bytes
-rw-r--r--ext/phar/tests/zip/files/frontcontroller7.phar.inc12
-rw-r--r--ext/phar/tests/zip/files/frontcontroller7.phar.zipbin0 -> 709 bytes
-rw-r--r--ext/phar/tests/zip/files/frontcontroller8.phar.inc13
-rw-r--r--ext/phar/tests/zip/files/frontcontroller8.phar.zipbin0 -> 896 bytes
-rw-r--r--ext/phar/tests/zip/files/frontcontroller9.phar.inc14
-rw-r--r--ext/phar/tests/zip/files/frontcontroller9.phar.zipbin0 -> 923 bytes
-rw-r--r--ext/phar/tests/zip/files/make_invalid_tar.php.inc12
-rw-r--r--ext/phar/tests/zip/files/metadata.phar.inc11
-rw-r--r--ext/phar/tests/zip/files/metadata.phar.zipbin0 -> 779 bytes
-rw-r--r--ext/phar/tests/zip/files/nozipend.zipbin0 -> 169 bytes
-rw-r--r--ext/phar/tests/zip/files/odt.odtbin0 -> 8873 bytes
-rw-r--r--ext/phar/tests/zip/files/stdin.zipbin0 -> 186 bytes
-rw-r--r--ext/phar/tests/zip/files/test.odtbin0 -> 8303 bytes
-rw-r--r--ext/phar/tests/zip/files/truncfilename.zipbin0 -> 190 bytes
-rw-r--r--ext/phar/tests/zip/files/zip.zipbin0 -> 619 bytes
-rw-r--r--ext/phar/tests/zip/files/zipmaker.php.inc70
-rw-r--r--ext/phar/tests/zip/files/zlib_alias.phar.zipbin0 -> 624 bytes
-rw-r--r--ext/phar/tests/zip/frontcontroller1.phar.phpt16
-rw-r--r--ext/phar/tests/zip/frontcontroller10.phar.phpt24
-rw-r--r--ext/phar/tests/zip/frontcontroller11.phar.phpt22
-rw-r--r--ext/phar/tests/zip/frontcontroller12.phar.phpt21
-rw-r--r--ext/phar/tests/zip/frontcontroller13.phar.phpt21
-rw-r--r--ext/phar/tests/zip/frontcontroller14.phar.phpt16
-rw-r--r--ext/phar/tests/zip/frontcontroller15.phar.phpt21
-rw-r--r--ext/phar/tests/zip/frontcontroller16.phar.phpt18
-rw-r--r--ext/phar/tests/zip/frontcontroller17.phar.phpt17
-rw-r--r--ext/phar/tests/zip/frontcontroller18.phar.phpt17
-rw-r--r--ext/phar/tests/zip/frontcontroller19.phar.phpt17
-rw-r--r--ext/phar/tests/zip/frontcontroller2.phar.phpt17
-rw-r--r--ext/phar/tests/zip/frontcontroller20.phar.phpt17
-rw-r--r--ext/phar/tests/zip/frontcontroller21.phar.phpt25
-rw-r--r--ext/phar/tests/zip/frontcontroller3.phar.phpt20
-rw-r--r--ext/phar/tests/zip/frontcontroller4.phar.phpt14
-rw-r--r--ext/phar/tests/zip/frontcontroller5.phar.phpt15
-rw-r--r--ext/phar/tests/zip/frontcontroller6.phar.phpt22
-rw-r--r--ext/phar/tests/zip/frontcontroller7.phar.phpt15
-rw-r--r--ext/phar/tests/zip/frontcontroller8.phar.phpt21
-rw-r--r--ext/phar/tests/zip/frontcontroller9.phar.phpt19
-rw-r--r--ext/phar/tests/zip/getalias.phpt59
-rw-r--r--ext/phar/tests/zip/largezip.phpt29
-rw-r--r--ext/phar/tests/zip/metadata_write_commit.phpt88
-rw-r--r--ext/phar/tests/zip/metadata_write_commitU.phpt88
-rw-r--r--ext/phar/tests/zip/notphar.phpt24
-rw-r--r--ext/phar/tests/zip/odt.phpt35
-rw-r--r--ext/phar/tests/zip/open_for_write_existing.phpt39
-rw-r--r--ext/phar/tests/zip/open_for_write_existing_b.phpt55
-rw-r--r--ext/phar/tests/zip/open_for_write_existing_b_5_2.phpt53
-rw-r--r--ext/phar/tests/zip/open_for_write_existing_c.phpt49
-rw-r--r--ext/phar/tests/zip/open_for_write_existing_c_5_2.phpt47
-rw-r--r--ext/phar/tests/zip/open_for_write_newfile.phpt42
-rw-r--r--ext/phar/tests/zip/open_for_write_newfile_b.phpt63
-rw-r--r--ext/phar/tests/zip/open_for_write_newfile_b_5_2.phpt61
-rw-r--r--ext/phar/tests/zip/open_for_write_newfile_c.phpt57
-rw-r--r--ext/phar/tests/zip/open_for_write_newfile_c_5_2.phpt55
-rw-r--r--ext/phar/tests/zip/phar_begin_setstub_commit.phpt71
-rw-r--r--ext/phar/tests/zip/phar_begin_setstub_commitU.phpt71
-rw-r--r--ext/phar/tests/zip/phar_buildfromiterator4.phpt66
-rw-r--r--ext/phar/tests/zip/phar_buildfromiterator5.phpt59
-rw-r--r--ext/phar/tests/zip/phar_buildfromiterator6.phpt60
-rw-r--r--ext/phar/tests/zip/phar_buildfromiterator7.phpt60
-rw-r--r--ext/phar/tests/zip/phar_buildfromiterator8.phpt73
-rw-r--r--ext/phar/tests/zip/phar_buildfromiterator9.phpt65
-rw-r--r--ext/phar/tests/zip/phar_commitwrite.phpt47
-rw-r--r--ext/phar/tests/zip/phar_convert_phar.phpt57
-rw-r--r--ext/phar/tests/zip/phar_copy.phpt55
-rw-r--r--ext/phar/tests/zip/phar_magic.phpt44
-rw-r--r--ext/phar/tests/zip/phar_magicU.phpt41
-rw-r--r--ext/phar/tests/zip/phar_oo_compressallbz2.phpt70
-rw-r--r--ext/phar/tests/zip/phar_oo_compressallgz.phpt58
-rw-r--r--ext/phar/tests/zip/phar_setalias.phpt62
-rw-r--r--ext/phar/tests/zip/phar_setalias2.phpt49
-rw-r--r--ext/phar/tests/zip/phar_setdefaultstub.phpt80
-rw-r--r--ext/phar/tests/zip/phar_setsignaturealgo2.phpt115
-rw-r--r--ext/phar/tests/zip/phar_stub.phpt75
-rw-r--r--ext/phar/tests/zip/phar_stub_error.phpt55
-rw-r--r--ext/phar/tests/zip/refcount1.phpt70
-rw-r--r--ext/phar/tests/zip/refcount1_5_2.phpt64
-rw-r--r--ext/phar/tests/zip/rename.phpt34
-rw-r--r--ext/phar/tests/zip/rename_dir.phpt34
-rw-r--r--ext/phar/tests/zip/rmdir.phpt38
-rw-r--r--ext/phar/tests/zip/unixzip.phpt29
-rw-r--r--ext/phar/tests/zip/zlib.phpt19
804 files changed, 43829 insertions, 0 deletions
diff --git a/ext/phar/tests/001.phpt b/ext/phar/tests/001.phpt
new file mode 100644
index 0000000..1205e4e
--- /dev/null
+++ b/ext/phar/tests/001.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Phar::apiVersion
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+var_dump(Phar::apiVersion());
+?>
+===DONE===
+--EXPECT--
+string(5) "1.1.1"
+===DONE===
diff --git a/ext/phar/tests/002.phpt b/ext/phar/tests/002.phpt
new file mode 100644
index 0000000..a7cf0cb
--- /dev/null
+++ b/ext/phar/tests/002.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar::mapPhar truncated manifest/improper params
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+try {
+Phar::mapPhar(5, 'hio', 'hi');
+
+Phar::mapPhar();
+} catch (Exception $e) {
+ echo $e->getMessage();
+}
+__HALT_COMPILER(); ?>
+--EXPECTF--
+Warning: Phar::mapPhar() expects at most 2 parameters, 3 given in %s002.php on line %d
+internal corruption of phar "%s002.php" (truncated manifest at manifest length) \ No newline at end of file
diff --git a/ext/phar/tests/003.phpt b/ext/phar/tests/003.phpt
new file mode 100644
index 0000000..fcc95a8
--- /dev/null
+++ b/ext/phar/tests/003.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Phar::canCompress
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+/* check this works and actually returns the boolean value */
+var_dump(Phar::canCompress() == (
+ extension_loaded("zlib") || extension_loaded("bz2")
+ ));
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/phar/tests/003a.phpt b/ext/phar/tests/003a.phpt
new file mode 100644
index 0000000..37e3107
--- /dev/null
+++ b/ext/phar/tests/003a.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar::canCompress, specific
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+var_dump(Phar::canCompress(Phar::GZ) == extension_loaded("zlib"));
+var_dump(Phar::canCompress(Phar::BZ2) == extension_loaded("bz2"));
+?>
+===DONE===
+--EXPECT--
+bool(true)
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/004.phpt b/ext/phar/tests/004.phpt
new file mode 100644
index 0000000..963a9b4
--- /dev/null
+++ b/ext/phar/tests/004.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar::mapPhar no __HALT_COMPILER();
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--FILE--
+<?php
+try {
+Phar::mapPhar('hio');
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+?>
+--EXPECTF--
+__HALT_COMPILER(); must be declared in a phar
diff --git a/ext/phar/tests/005.phpt b/ext/phar/tests/005.phpt
new file mode 100644
index 0000000..a6e3449
--- /dev/null
+++ b/ext/phar/tests/005.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar::mapPhar truncated manifest (none)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--FILE--
+<?php
+try {
+Phar::mapPhar('hio');
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+__HALT_COMPILER(); ?>()
+--EXPECTF--
+internal corruption of phar "%s" (truncated manifest at manifest length)
diff --git a/ext/phar/tests/006.phpt b/ext/phar/tests/006.phpt
new file mode 100644
index 0000000..b2e8b29
--- /dev/null
+++ b/ext/phar/tests/006.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar::mapPhar truncated manifest (manifest length truncated)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--FILE--
+<?php
+try {
+Phar::mapPhar('hio');
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+__HALT_COMPILER(); ?>
+--EXPECTF--
+internal corruption of phar "%s" (truncated manifest at manifest length)
diff --git a/ext/phar/tests/007.phpt b/ext/phar/tests/007.phpt
new file mode 100644
index 0000000..a13c2a4
--- /dev/null
+++ b/ext/phar/tests/007.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar::mapPhar manifest too big
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--FILE--
+<?php
+try {
+Phar::mapPhar('hio');
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+__HALT_COMPILER(); ?>~~~~
+--EXPECTF--
+manifest cannot be larger than 100 MB in phar "%s"
diff --git a/ext/phar/tests/008.phpt b/ext/phar/tests/008.phpt
new file mode 100644
index 0000000..664ffea
--- /dev/null
+++ b/ext/phar/tests/008.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar::mapPhar truncated manifest (not enough for manifest length)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--FILE--
+<?php
+$file = "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+$file .= pack('V', 500) . 'notenough';
+file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file);
+try {
+include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+internal corruption of phar "%s" (truncated manifest header)
diff --git a/ext/phar/tests/009.phpt b/ext/phar/tests/009.phpt
new file mode 100644
index 0000000..61933b3
--- /dev/null
+++ b/ext/phar/tests/009.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Phar::mapPhar too many manifest entries
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$file = b"<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+$file .= (binary) pack(b'VVnVVV', 500, 500, 0x1000, 0x00000000, 0, 0) . (binary) str_repeat((binary)'A', 500);
+file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file);
+try {
+include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+internal corruption of phar "%s009.phar.php" (too many manifest entries for size of manifest)
diff --git a/ext/phar/tests/010.phpt b/ext/phar/tests/010.phpt
new file mode 100644
index 0000000..d1e2f40
--- /dev/null
+++ b/ext/phar/tests/010.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Phar::mapPhar buffer overrun
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$file = b"<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+// this fails because the manifest length does not include the other 10 byte manifest data
+
+$manifest = pack('V', 1) . 'a' . pack('VVVVVV', 0, time(), 0, crc32(b''), 0x00000000, 0);
+$file .= pack('VVnVV', strlen($manifest), 1, 0x1000, 0x00000000, 3) . 'hio' . pack('V', 0) . $manifest;
+
+file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file);
+try {
+include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+echo file_get_contents('phar://hio/a');
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+internal corruption of phar "%s" (too many manifest entries for size of manifest)
diff --git a/ext/phar/tests/011.phpt b/ext/phar/tests/011.phpt
new file mode 100644
index 0000000..4a1f0dd
--- /dev/null
+++ b/ext/phar/tests/011.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Phar::mapPhar filesize too small in manifest
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+// compressed file length does not match incompressed lentgh for an uncompressed file
+
+$files = array();
+$files['a'] = array('cont'=>'a','ulen'=>1,'clen'=>2);;
+include 'files/phar_test.inc';
+try {
+include $fname;
+echo file_get_contents('phar://hio/a');
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+internal corruption of phar "%s" (compressed and uncompressed size does not match for uncompressed entry)
diff --git a/ext/phar/tests/012.phpt b/ext/phar/tests/012.phpt
new file mode 100644
index 0000000..3246eff
--- /dev/null
+++ b/ext/phar/tests/012.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Phar::mapPhar valid file
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = 'a';
+
+include 'files/phar_test.inc';
+include $fname;
+
+echo file_get_contents('phar://hio/a');
+
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+a
diff --git a/ext/phar/tests/013.phpt b/ext/phar/tests/013.phpt
new file mode 100644
index 0000000..ae3ae72
--- /dev/null
+++ b/ext/phar/tests/013.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Phar::mapPhar filesize mismatch
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+// filesize should be 1, and is 2
+
+$files = array();
+$files['a'] = array('cont'=>'a', 'ulen'=>2, 'clen'=>2);
+include 'files/phar_test.inc';
+
+echo file_get_contents($pname.'/a');
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+Warning: file_get_contents(phar://%s/a): failed to open stream: phar error: internal corruption of phar "%s" (%s file "a") in %s on line %d
diff --git a/ext/phar/tests/014.phpt b/ext/phar/tests/014.phpt
new file mode 100644
index 0000000..cb83ea5
--- /dev/null
+++ b/ext/phar/tests/014.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Phar::mapPhar filesize mismatch
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+// wrong crc32
+
+$files = array();
+$files['a'] = array('cont'=>'a', 'crc32'=>crc32(b'aX'));
+include 'files/phar_test.inc';
+
+echo file_get_contents($pname.'/a');
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+Warning: file_get_contents(phar://%s/a): failed to open stream: phar error: internal corruption of phar "%s" (crc32 mismatch on file "a") in %s on line %d
diff --git a/ext/phar/tests/015.phpt b/ext/phar/tests/015.phpt
new file mode 100644
index 0000000..b93b77e
--- /dev/null
+++ b/ext/phar/tests/015.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Phar::mapPhar valid file (gzipped)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not present"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = array('cont'=>'a','comp'=>chr(75) . chr(4) . chr(0) /* 'a' gzdeflated */, 'flags'=>0x00001000);
+include 'files/phar_test.inc';
+
+echo file_get_contents($pname .'/a');
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+a
diff --git a/ext/phar/tests/015b.phpt b/ext/phar/tests/015b.phpt
new file mode 100644
index 0000000..08ead2d
--- /dev/null
+++ b/ext/phar/tests/015b.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Phar::mapPhar valid file (bzip2)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+<?php if (!extension_loaded("bz2")) die("skip bz2 not present"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = array('cont'=>'Hello World', 'comp'=>pack('H*', '425a6834314159265359065c89da0000009780400000400080060490002000310c082031a916c41d41e2ee48a70a1200cb913b40'),'flags'=>0x00002000);
+include 'files/phar_test.inc';
+
+var_dump(file_get_contents($pname . '/a'));
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(11) "Hello World"
diff --git a/ext/phar/tests/016.phpt b/ext/phar/tests/016.phpt
new file mode 100644
index 0000000..3288e8e
--- /dev/null
+++ b/ext/phar/tests/016.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Phar::mapPhar invalid file (gzipped file length is too short)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not present"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = b"<?php __HALT_COMPILER(); ?>";
+// file length is too short
+
+$files = array();
+// "hi" gzdeflated
+$files['a'] = array('cont'=>b'a','comp'=> (binary)pack('H*', 'cbc80400'),'flags'=>0x00001000, 'ulen' => 1, 'clen' => 4);
+$files['b'] = $files['a'];
+$files['c'] = array('cont'=>b'*');
+$files['d'] = $files['a'];
+include 'files/phar_test.inc';
+
+var_dump(file_get_contents($pname . '/a'));
+var_dump(file_get_contents($pname . '/b'));
+var_dump(file_get_contents($pname . '/c'));
+var_dump(file_get_contents($pname . '/d'));
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+Warning: file_get_contents(phar://%s/a): failed to open stream: phar error: internal corruption of phar "%s" (actual filesize mismatch on file "a") in %s on line %d
+bool(false)
+
+Warning: file_get_contents(phar://%s/b): failed to open stream: phar error: internal corruption of phar "%s" (actual filesize mismatch on file "b") in %s on line %d
+bool(false)
+string(1) "*"
+
+Warning: file_get_contents(phar://%s/d): failed to open stream: phar error: internal corruption of phar "%s" (actual filesize mismatch on file "d") in %s on line %d
+bool(false)
diff --git a/ext/phar/tests/016b.phpt b/ext/phar/tests/016b.phpt
new file mode 100644
index 0000000..8fe6682
--- /dev/null
+++ b/ext/phar/tests/016b.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Phar::mapPhar invalid file (gzipped file length is too short)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not present"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+// file length is too short
+
+$files = array();
+$files['a'] = array('cont'=>'a','flags'=>0x00001000, 'clen' => 1);
+include 'files/phar_test.inc';
+
+echo file_get_contents($pname . '/a');
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+Warning: file_get_contents(phar://%s/a): failed to open stream: phar error: internal corruption of phar "%s" (actual filesize mismatch on file "a") in %s on line %d
diff --git a/ext/phar/tests/017.phpt b/ext/phar/tests/017.phpt
new file mode 100644
index 0000000..7c64c40
--- /dev/null
+++ b/ext/phar/tests/017.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Phar: opendir test - no dir specified at all
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php
+Phar::mapPhar('hio');
+var_dump(__FILE__);
+var_dump(substr(__FILE__, 0, 4) != 'phar');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = 'abc';
+include 'files/phar_test.inc';
+
+include $pname;
+$dir = opendir('phar://hio');
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+string(%d) "%s017.phar.php"
+bool(true)
+
+Warning: opendir(phar://hio): failed to open dir: phar error: no directory in "phar://hio", must have at least phar://hio/ for root directory (always use full path to a new phar)
+phar url "phar://hio" is unknown in %s017.php on line %d \ No newline at end of file
diff --git a/ext/phar/tests/017U.phpt b/ext/phar/tests/017U.phpt
new file mode 100644
index 0000000..af65b6d
--- /dev/null
+++ b/ext/phar/tests/017U.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Phar: opendir test - no dir specified at all
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = b"<?php
+Phar::mapPhar('hio');
+var_dump(__FILE__);
+var_dump(substr(__FILE__, 0, 4) != 'phar');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = 'abc';
+include 'files/phar_test.inc';
+
+include $pname;
+$dir = opendir('phar://hio');
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+unicode(%d) "%s017U.phar.php"
+bool(true)
+
+Warning: opendir(phar://hio): failed to open dir: phar error: no directory in "phar://hio", must have at least phar://hio/ for root directory (always use full path to a new phar)
+phar url "phar://hio" is unknown in %s017U.php on line %d
diff --git a/ext/phar/tests/018.phpt b/ext/phar/tests/018.phpt
new file mode 100644
index 0000000..2e2df47
--- /dev/null
+++ b/ext/phar/tests/018.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Phar: opendir test, root directory
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = 'a';
+$files['b/a'] = 'b';
+include 'files/phar_test.inc';
+
+include $fname;
+$dir = opendir('phar://hio/');
+while (false !== ($a = readdir($dir))) {
+ var_dump($a);
+ var_dump(is_dir('phar://hio/' . $a));
+}
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(1) "a"
+bool(false)
+string(1) "b"
+bool(true) \ No newline at end of file
diff --git a/ext/phar/tests/018U.phpt b/ext/phar/tests/018U.phpt
new file mode 100644
index 0000000..c8d798d
--- /dev/null
+++ b/ext/phar/tests/018U.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Phar: opendir test, root directory
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = b"<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = 'a';
+$files['b/a'] = 'b';
+include 'files/phar_test.inc';
+
+include $fname;
+$dir = opendir('phar://hio/');
+while (false !== ($a = readdir($dir))) {
+ var_dump($a);
+ var_dump(is_dir('phar://hio/' . $a));
+}
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+unicode(1) "a"
+bool(false)
+unicode(1) "b"
+bool(true)
diff --git a/ext/phar/tests/019.phpt b/ext/phar/tests/019.phpt
new file mode 100644
index 0000000..0a5a7d7
--- /dev/null
+++ b/ext/phar/tests/019.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Phar: opendir test, subdirectory
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = b"<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = 'a';
+$files['b/a'] = 'b';
+$files['b/c/d'] = 'c';
+$files['bad/c'] = 'd';
+
+include 'files/phar_test.inc';
+include $fname;
+
+$dir = opendir('phar://hio/b');
+
+if ($dir) {
+ while (false !== ($a = readdir($dir))) {
+ var_dump($a);
+ var_dump(is_dir('phar://hio/b/' . $a));
+ }
+}
+
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+%s(1) "a"
+bool(false)
+%s(1) "c"
+bool(true)
diff --git a/ext/phar/tests/019b.phpt b/ext/phar/tests/019b.phpt
new file mode 100644
index 0000000..5a0ef71
--- /dev/null
+++ b/ext/phar/tests/019b.phpt
@@ -0,0 +1,68 @@
+--TEST--
+Phar: opendir test, recurse into
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = 'a';
+$files['b/a'] = 'b';
+$files['b/c/d'] = 'c';
+$files['bad/c'] = 'd';
+include 'files/phar_test.inc';
+include $fname;
+
+function dump($phar, $base)
+{
+ var_dump($phar . $base);
+ $dir = opendir($phar . $base);
+ if ($base == '/')
+ {
+ $base = '';
+ }
+ while (false !== ($entry = readdir($dir))) {
+ $entry = $base . '/' . $entry;
+ var_dump($entry);
+ var_dump(is_dir($phar . $entry));
+ if (is_dir($phar . $entry))
+ {
+ dump($phar, $entry);
+ }
+ }
+}
+
+dump('phar://hio', '/');
+
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(11) "phar://hio/"
+string(2) "/a"
+bool(false)
+string(2) "/b"
+bool(true)
+string(12) "phar://hio/b"
+string(4) "/b/a"
+bool(false)
+string(4) "/b/c"
+bool(true)
+string(14) "phar://hio/b/c"
+string(6) "/b/c/d"
+bool(false)
+string(4) "/bad"
+bool(true)
+string(14) "phar://hio/bad"
+string(6) "/bad/c"
+bool(false)
diff --git a/ext/phar/tests/019bU.phpt b/ext/phar/tests/019bU.phpt
new file mode 100644
index 0000000..c0864aa
--- /dev/null
+++ b/ext/phar/tests/019bU.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Phar: opendir test, recurse into
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = b"<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = 'a';
+$files['b/a'] = 'b';
+$files['b/c/d'] = 'c';
+$files['bad/c'] = 'd';
+
+include 'files/phar_test.inc';
+include $fname;
+
+function dump($phar, $base)
+{
+ var_dump($phar . $base);
+ $dir = opendir($phar . $base);
+ if ($base == '/')
+ {
+ $base = '';
+ }
+ while (false !== ($entry = readdir($dir))) {
+ $entry = $base . '/' . $entry;
+ var_dump($entry);
+ var_dump(is_dir($phar . $entry));
+ if (is_dir($phar . $entry))
+ {
+ dump($phar, $entry);
+ }
+ }
+}
+
+dump('phar://hio', '/');
+
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+unicode(11) "phar://hio/"
+unicode(2) "/a"
+bool(false)
+unicode(2) "/b"
+bool(true)
+unicode(12) "phar://hio/b"
+unicode(4) "/b/a"
+bool(false)
+unicode(4) "/b/c"
+bool(true)
+unicode(14) "phar://hio/b/c"
+unicode(6) "/b/c/d"
+bool(false)
+unicode(4) "/bad"
+bool(true)
+unicode(14) "phar://hio/bad"
+unicode(6) "/bad/c"
+bool(false)
diff --git a/ext/phar/tests/019c.phpt b/ext/phar/tests/019c.phpt
new file mode 100644
index 0000000..2cb508c
--- /dev/null
+++ b/ext/phar/tests/019c.phpt
@@ -0,0 +1,76 @@
+--TEST--
+Phar: opendir test, recurse into
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = 'a';
+$files['b/a'] = 'b';
+$files['b/c/d'] = 'c';
+$files['bad/c'] = 'd';
+include 'files/phar_test.inc';
+include $fname;
+
+function dump($phar, $base)
+{
+ var_dump($phar . $base);
+ $dir = opendir($phar . $base);
+ if ($base == '/')
+ {
+ $base = '';
+ }
+ while (false !== ($entry = readdir($dir))) {
+ $entry = $base . '/' . $entry;
+ var_dump($entry);
+ var_dump(is_dir($phar . $entry));
+ if (is_dir($phar . $entry))
+ {
+ dump($phar, $entry);
+ }
+ else
+ {
+ var_dump(file_get_contents($phar . $entry));
+ }
+ }
+}
+
+dump('phar://hio', '/');
+
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(11) "phar://hio/"
+string(2) "/a"
+bool(false)
+string(1) "a"
+string(2) "/b"
+bool(true)
+string(12) "phar://hio/b"
+string(4) "/b/a"
+bool(false)
+string(1) "b"
+string(4) "/b/c"
+bool(true)
+string(14) "phar://hio/b/c"
+string(6) "/b/c/d"
+bool(false)
+string(1) "c"
+string(4) "/bad"
+bool(true)
+string(14) "phar://hio/bad"
+string(6) "/bad/c"
+bool(false)
+string(1) "d"
diff --git a/ext/phar/tests/019cU.phpt b/ext/phar/tests/019cU.phpt
new file mode 100644
index 0000000..36ef6d8
--- /dev/null
+++ b/ext/phar/tests/019cU.phpt
@@ -0,0 +1,76 @@
+--TEST--
+Phar: opendir test, recurse into
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = b"<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = 'a';
+$files['b/a'] = 'b';
+$files['b/c/d'] = 'c';
+$files['bad/c'] = 'd';
+include 'files/phar_test.inc';
+include $fname;
+
+function dump($phar, $base)
+{
+ var_dump($phar . $base);
+ $dir = opendir($phar . $base);
+ if ($base == '/')
+ {
+ $base = '';
+ }
+ while (false !== ($entry = readdir($dir))) {
+ $entry = $base . '/' . $entry;
+ var_dump($entry);
+ var_dump(is_dir($phar . $entry));
+ if (is_dir($phar . $entry))
+ {
+ dump($phar, $entry);
+ }
+ else
+ {
+ var_dump(file_get_contents($phar . $entry));
+ }
+ }
+}
+
+dump('phar://hio', '/');
+
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+unicode(11) "phar://hio/"
+unicode(2) "/a"
+bool(false)
+string(1) "a"
+unicode(2) "/b"
+bool(true)
+unicode(12) "phar://hio/b"
+unicode(4) "/b/a"
+bool(false)
+string(1) "b"
+unicode(4) "/b/c"
+bool(true)
+unicode(14) "phar://hio/b/c"
+unicode(6) "/b/c/d"
+bool(false)
+string(1) "c"
+unicode(4) "/bad"
+bool(true)
+unicode(14) "phar://hio/bad"
+unicode(6) "/bad/c"
+bool(false)
+string(1) "d"
diff --git a/ext/phar/tests/020.phpt b/ext/phar/tests/020.phpt
new file mode 100644
index 0000000..7d01681
--- /dev/null
+++ b/ext/phar/tests/020.phpt
@@ -0,0 +1,136 @@
+--TEST--
+Phar: url stat
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = b"<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$pfile = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$files = array();
+$files['a'] = 'a';
+$files['b/a'] = 'b';
+$files['b/c/d'] = 'c';
+$files['bad/c'] = 'd';
+include 'files/phar_test.inc';
+include $fname;
+
+var_dump(stat('phar://hio/a'), stat('phar://hio/b'));
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+array(26) {
+ [0]=>
+ int(12)
+ [1]=>
+ int(%d)
+ [2]=>
+ int(33060)
+ [3]=>
+ int(1)
+ [4]=>
+ int(0)
+ [5]=>
+ int(0)
+ [6]=>
+ int(-1)
+ [7]=>
+ int(1)
+ [8]=>
+ int(%d)
+ [9]=>
+ int(%d)
+ [10]=>
+ int(%d)
+ [11]=>
+ int(-1)
+ [12]=>
+ int(-1)
+ [%sdev"]=>
+ int(12)
+ [%sino"]=>
+ int(%d)
+ [%smode"]=>
+ int(33060)
+ [%snlink"]=>
+ int(1)
+ [%suid"]=>
+ int(0)
+ [%sgid"]=>
+ int(0)
+ [%srdev"]=>
+ int(-1)
+ [%ssize"]=>
+ int(1)
+ [%satime"]=>
+ int(%d)
+ [%smtime"]=>
+ int(%d)
+ [%sctime"]=>
+ int(%d)
+ [%sblksize"]=>
+ int(-1)
+ [%sblocks"]=>
+ int(-1)
+}
+array(26) {
+ [0]=>
+ int(12)
+ [1]=>
+ int(%d)
+ [2]=>
+ int(16749)
+ [3]=>
+ int(1)
+ [4]=>
+ int(0)
+ [5]=>
+ int(0)
+ [6]=>
+ int(-1)
+ [7]=>
+ int(0)
+ [8]=>
+ int(%d)
+ [9]=>
+ int(%d)
+ [10]=>
+ int(%d)
+ [11]=>
+ int(-1)
+ [12]=>
+ int(-1)
+ [%sdev"]=>
+ int(12)
+ [%sino"]=>
+ int(%d)
+ [%smode"]=>
+ int(16749)
+ [%snlink"]=>
+ int(1)
+ [%suid"]=>
+ int(0)
+ [%sgid"]=>
+ int(0)
+ [%srdev"]=>
+ int(-1)
+ [%ssize"]=>
+ int(0)
+ [%satime"]=>
+ int(%d)
+ [%smtime"]=>
+ int(%d)
+ [%sctime"]=>
+ int(%d)
+ [%sblksize"]=>
+ int(-1)
+ [%sblocks"]=>
+ int(-1)
+} \ No newline at end of file
diff --git a/ext/phar/tests/021.phpt b/ext/phar/tests/021.phpt
new file mode 100644
index 0000000..bfd6576
--- /dev/null
+++ b/ext/phar/tests/021.phpt
@@ -0,0 +1,85 @@
+--TEST--
+Phar: stream stat
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = b"<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = 'a';
+$files['b/a'] = 'b';
+$files['b/c/d'] = 'c';
+$files['bad/c'] = 'd';
+
+include 'files/phar_test.inc';
+
+include $fname;
+
+$fp = fopen('phar://hio/a', 'r');
+var_dump(fstat($fp));
+fclose($fp);
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+array(26) {
+ [0]=>
+ int(12)
+ [1]=>
+ int(%d)
+ [2]=>
+ int(33060)
+ [3]=>
+ int(1)
+ [4]=>
+ int(0)
+ [5]=>
+ int(0)
+ [6]=>
+ int(-1)
+ [7]=>
+ int(1)
+ [8]=>
+ int(%d)
+ [9]=>
+ int(%d)
+ [10]=>
+ int(%d)
+ [11]=>
+ int(-1)
+ [12]=>
+ int(-1)
+ [%sdev"]=>
+ int(12)
+ [%sino"]=>
+ int(%d)
+ [%smode"]=>
+ int(33060)
+ [%snlink"]=>
+ int(1)
+ [%suid"]=>
+ int(0)
+ [%sgid"]=>
+ int(0)
+ [%srdev"]=>
+ int(-1)
+ [%ssize"]=>
+ int(1)
+ [%satime"]=>
+ int(%d)
+ [%smtime"]=>
+ int(%d)
+ [%sctime"]=>
+ int(%d)
+ [%sblksize"]=>
+ int(-1)
+ [%sblocks"]=>
+ int(-1)
+} \ No newline at end of file
diff --git a/ext/phar/tests/022.phpt b/ext/phar/tests/022.phpt
new file mode 100644
index 0000000..20c24a0
--- /dev/null
+++ b/ext/phar/tests/022.phpt
@@ -0,0 +1,110 @@
+--TEST--
+Phar: stream stat
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = 'abcdefg';
+
+include 'files/phar_test.inc';
+
+include $fname;
+
+$fp = fopen('phar://hio/a', 'r');
+var_dump(ftell($fp));
+echo 'fseek($fp, 1)';var_dump(fseek($fp, 1));
+var_dump(ftell($fp));
+echo 'fseek($fp, 1, SEEK_CUR)';var_dump(fseek($fp, 1, SEEK_CUR));
+var_dump(ftell($fp));
+echo 'fseek($fp, -1, SEEK_CUR)';var_dump(fseek($fp, -1, SEEK_CUR));
+var_dump(ftell($fp));
+echo 'fseek($fp, -1, SEEK_END)';var_dump(fseek($fp, -1, SEEK_END));
+var_dump(ftell($fp));
+echo 'fseek($fp, -8, SEEK_END)';var_dump(fseek($fp, -8, SEEK_END));
+var_dump(ftell($fp));
+echo 'fseek($fp, -7, SEEK_END)';var_dump(fseek($fp, -7, SEEK_END));
+var_dump(ftell($fp));
+echo 'fseek($fp, 0, SEEK_END)';var_dump(fseek($fp, 0, SEEK_END));
+var_dump(ftell($fp));
+echo 'fseek($fp, 1, SEEK_END)';var_dump(fseek($fp, 1, SEEK_END));
+var_dump(ftell($fp));
+echo 'fseek($fp, -8, SEEK_END)';var_dump(fseek($fp, -8, SEEK_END));
+var_dump(ftell($fp));
+echo 'fseek($fp, 6)';var_dump(fseek($fp, 6));
+var_dump(ftell($fp));
+echo 'fseek($fp, 8)';var_dump(fseek($fp, 8));
+var_dump(ftell($fp));
+echo 'fseek($fp, -1)';var_dump(fseek($fp, -1));
+var_dump(ftell($fp));
+echo "next\n";
+fseek($fp, 4);
+var_dump(ftell($fp));
+echo 'fseek($fp, -5, SEEK_CUR)';var_dump(fseek($fp, -5, SEEK_CUR));
+var_dump(ftell($fp));
+fseek($fp, 4);
+var_dump(ftell($fp));
+echo 'fseek($fp, 5, SEEK_CUR)';var_dump(fseek($fp, 5, SEEK_CUR));
+var_dump(ftell($fp));
+fseek($fp, 4);
+var_dump(ftell($fp));
+echo 'fseek($fp, -4, SEEK_CUR)';var_dump(fseek($fp, -4, SEEK_CUR));
+var_dump(ftell($fp));
+fseek($fp, 4);
+var_dump(ftell($fp));
+echo 'fseek($fp, 3, SEEK_CUR)';var_dump(fseek($fp, 3, SEEK_CUR));
+var_dump(ftell($fp));
+fclose($fp);
+?>
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+exit(0);
+ ?>
+--EXPECT--
+int(0)
+fseek($fp, 1)int(0)
+int(1)
+fseek($fp, 1, SEEK_CUR)int(0)
+int(2)
+fseek($fp, -1, SEEK_CUR)int(0)
+int(1)
+fseek($fp, -1, SEEK_END)int(0)
+int(6)
+fseek($fp, -8, SEEK_END)int(-1)
+bool(false)
+fseek($fp, -7, SEEK_END)int(0)
+int(0)
+fseek($fp, 0, SEEK_END)int(0)
+int(7)
+fseek($fp, 1, SEEK_END)int(-1)
+bool(false)
+fseek($fp, -8, SEEK_END)int(-1)
+bool(false)
+fseek($fp, 6)int(0)
+int(6)
+fseek($fp, 8)int(-1)
+bool(false)
+fseek($fp, -1)int(-1)
+bool(false)
+next
+int(4)
+fseek($fp, -5, SEEK_CUR)int(-1)
+bool(false)
+int(4)
+fseek($fp, 5, SEEK_CUR)int(-1)
+bool(false)
+int(4)
+fseek($fp, -4, SEEK_CUR)int(0)
+int(0)
+int(4)
+fseek($fp, 3, SEEK_CUR)int(0)
+int(7)
diff --git a/ext/phar/tests/023.phpt b/ext/phar/tests/023.phpt
new file mode 100644
index 0000000..808f91d
--- /dev/null
+++ b/ext/phar/tests/023.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Phar: phar:// file_get_contents
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+include 'files/phar_test.inc';
+
+var_dump(file_get_contents($pname . '/a.php'));
+var_dump(file_get_contents($pname . '/b.php'));
+var_dump(file_get_contents($pname . '/b/c.php'));
+
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(28) "<?php echo "This is a\n"; ?>"
+string(28) "<?php echo "This is b\n"; ?>"
+string(30) "<?php echo "This is b/c\n"; ?>"
+===DONE===
diff --git a/ext/phar/tests/024.phpt b/ext/phar/tests/024.phpt
new file mode 100644
index 0000000..ad30d26
--- /dev/null
+++ b/ext/phar/tests/024.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Phar: phar:// include
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+include 'files/phar_test.inc';
+
+include $pname . '/a.php';
+include $pname . '/b.php';
+include $pname . '/b/c.php';
+
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+This is a
+This is b
+This is b/c
+===DONE===
diff --git a/ext/phar/tests/025.phpt b/ext/phar/tests/025.phpt
new file mode 100644
index 0000000..bbb5bc4
--- /dev/null
+++ b/ext/phar/tests/025.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Phar: phar:// include (repeated names)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = '<?php echo "This is a\n"; ?>';
+$files['b'] = '<?php echo "This is b\n"; ?>';
+$files['b/b'] = '<?php echo "This is b/b\n"; ?>';
+
+include 'files/phar_test.inc';
+
+include $pname . '/a';
+include $pname . '/b';
+include $pname . '/b/b';
+
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+This is a
+This is b
+This is b/b
+===DONE===
diff --git a/ext/phar/tests/026.phpt b/ext/phar/tests/026.phpt
new file mode 100644
index 0000000..696fbcf
--- /dev/null
+++ b/ext/phar/tests/026.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Phar: phar:// require from within
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; require \''.$pname.'/b.php\'; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; require \''.$pname.'/b/c.php\'; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; require \''.$pname.'/b/d.php\'; ?>';
+$files['b/d.php'] = '<?php echo "This is b/d\n"; require \''.$pname.'/e.php\'; ?>';
+$files['e.php'] = '<?php echo "This is e\n"; ?>';
+
+include 'files/phar_test.inc';
+
+require $pname . '/a.php';
+
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+This is a
+This is b
+This is b/c
+This is b/d
+This is e
+===DONE===
diff --git a/ext/phar/tests/027.phpt b/ext/phar/tests/027.phpt
new file mode 100644
index 0000000..8736efb
--- /dev/null
+++ b/ext/phar/tests/027.phpt
@@ -0,0 +1,97 @@
+--TEST--
+Phar: phar:// opendir
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; require \''.$pname.'/b.php\'; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; require \''.$pname.'/b/c.php\'; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; require \''.$pname.'/b/d.php\'; ?>';
+$files['b/d.php'] = '<?php echo "This is b/d\n"; require \''.$pname.'/e.php\'; ?>';
+$files['e.php'] = '<?php echo "This is e\n"; ?>';
+
+include 'files/phar_test.inc';
+
+function dump($phar, $base)
+{
+ var_dump(str_replace(dirname(__FILE__), '*', $phar) . $base);
+ $dir = opendir($phar . $base);
+ if ($base == '/')
+ {
+ $base = '';
+ }
+ while (false !== ($entry = readdir($dir))) {
+ $entry = $base . '/' . $entry;
+ var_dump($entry);
+ var_dump(is_dir($phar . $entry));
+ if (is_dir($phar . $entry))
+ {
+ dump($phar, $entry);
+ }
+ }
+}
+
+dump($pname, '/');
+
+$a = opendir($pname);
+// this may stop working in future versions, but is here for code coverage purposes
+echo "fseek on dir handle\n";
+var_dump(fseek($a, 0, SEEK_END), ftell($a));
+var_dump(fseek($a, -1), ftell($a));
+var_dump(fseek($a, 1), ftell($a));
+echo "fwrite on dir handle\n";
+var_dump(fwrite($a, 'hi'));
+var_dump(fstat($a));
+closedir($a);
+echo "opendir edge cases\n";
+var_dump(opendir("phar://"));
+var_dump(opendir("phar://foo.phar/hi"));
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+string(%d) "phar://*/027.phar.php/"
+string(6) "/a.php"
+bool(false)
+string(2) "/b"
+bool(true)
+string(%d) "phar://*/027.phar.php/b"
+string(8) "/b/c.php"
+bool(false)
+string(8) "/b/d.php"
+bool(false)
+string(6) "/b.php"
+bool(false)
+string(6) "/e.php"
+bool(false)
+fseek on dir handle
+int(0)
+int(4)
+int(-1)
+int(4)
+int(0)
+int(1)
+fwrite on dir handle
+int(0)
+bool(false)
+opendir edge cases
+
+Warning: opendir(phar://): failed to open dir: phar error: no directory in "phar://", must have at least phar:/// for root directory (always use full path to a new phar)
+phar url "phar://" is unknown in %s027.php on line %d
+bool(false)
+
+Warning: opendir(phar://foo.phar/hi): failed to open dir: phar error: invalid url or non-existent phar "phar://foo.phar/hi"
+phar url "phar://foo.phar/hi" is unknown in %s027.php on line %d
+bool(false)
+===DONE===
diff --git a/ext/phar/tests/027U.phpt b/ext/phar/tests/027U.phpt
new file mode 100644
index 0000000..6794c52
--- /dev/null
+++ b/ext/phar/tests/027U.phpt
@@ -0,0 +1,97 @@
+--TEST--
+Phar: phar:// opendir
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = b"<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; require \''.$pname.'/b.php\'; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; require \''.$pname.'/b/c.php\'; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; require \''.$pname.'/b/d.php\'; ?>';
+$files['b/d.php'] = '<?php echo "This is b/d\n"; require \''.$pname.'/e.php\'; ?>';
+$files['e.php'] = '<?php echo "This is e\n"; ?>';
+
+include 'files/phar_test.inc';
+
+function dump($phar, $base)
+{
+ var_dump(str_replace(dirname(__FILE__), '*', $phar) . $base);
+ $dir = opendir($phar . $base);
+ if ($base == '/')
+ {
+ $base = '';
+ }
+ while (false !== ($entry = readdir($dir))) {
+ $entry = $base . '/' . $entry;
+ var_dump($entry);
+ var_dump(is_dir($phar . $entry));
+ if (is_dir($phar . $entry))
+ {
+ dump($phar, $entry);
+ }
+ }
+}
+
+dump($pname, '/');
+
+$a = opendir($pname);
+// this may stop working in future versions, but is here for code coverage purposes
+echo "fseek on dir handle\n";
+var_dump(fseek($a, 0, SEEK_END), ftell($a));
+var_dump(fseek($a, -1), ftell($a));
+var_dump(fseek($a, 1), ftell($a));
+echo "fwrite on dir handle\n";
+var_dump(fwrite($a, b'hi'));
+var_dump(fstat($a));
+closedir($a);
+echo "opendir edge cases\n";
+var_dump(opendir("phar://"));
+var_dump(opendir("phar://foo.phar/hi"));
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+unicode(%d) "phar://*/027U.phar.php/"
+unicode(6) "/a.php"
+bool(false)
+unicode(2) "/b"
+bool(true)
+unicode(%d) "phar://*/027U.phar.php/b"
+unicode(8) "/b/c.php"
+bool(false)
+unicode(8) "/b/d.php"
+bool(false)
+unicode(6) "/b.php"
+bool(false)
+unicode(6) "/e.php"
+bool(false)
+fseek on dir handle
+int(0)
+int(4)
+int(-1)
+int(4)
+int(0)
+int(1)
+fwrite on dir handle
+int(0)
+bool(false)
+opendir edge cases
+
+Warning: opendir(phar://): failed to open dir: phar error: no directory in "phar://", must have at least phar:/// for root directory (always use full path to a new phar)
+phar url "phar://" is unknown in %s027U.php on line %d
+bool(false)
+
+Warning: opendir(phar://foo.phar/hi): failed to open dir: phar error: invalid url or non-existent phar "phar://foo.phar/hi"
+phar url "phar://foo.phar/hi" is unknown in %s027U.php on line %d
+bool(false)
+===DONE===
diff --git a/ext/phar/tests/028.phpt b/ext/phar/tests/028.phpt
new file mode 100644
index 0000000..087f822
--- /dev/null
+++ b/ext/phar/tests/028.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Phar::loadPhar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://hio';
+$file = '<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>';
+$alias = '';
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; include "'.$pname.'/b.php"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; include "'.$pname.'/b/c.php"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; include "'.$pname.'/b/d.php"; ?>';
+$files['b/d.php'] = '<?php echo "This is b/d\n"; include "'.$pname.'/e.php"; ?>';
+$files['e.php'] = '<?php echo "This is e\n"; ?>';
+
+include 'files/phar_test.inc';
+
+Phar::loadPhar($fname, 'hio');
+
+include $fname;
+
+echo "======\n";
+
+include $pname . '/a.php';
+
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+This is a
+This is b
+This is b/c
+This is b/d
+This is e
+======
+This is a
+This is b
+This is b/c
+This is b/d
+This is e
+===DONE===
diff --git a/ext/phar/tests/029.phpt b/ext/phar/tests/029.phpt
new file mode 100644
index 0000000..41fcec0
--- /dev/null
+++ b/ext/phar/tests/029.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Phar::loadPhar overloading alias names
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname1 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php';
+$fname = $fname1;
+$alias = '';
+$pname = 'phar://hio';
+$file = '<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; include "'.$pname.'/b.php"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; include "'.$pname.'/b/c.php"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; include "'.$pname.'/b/d.php"; ?>';
+$files['b/d.php'] = '<?php echo "This is b/d\n"; include "'.$pname.'/e.php"; ?>';
+$files['e.php'] = '<?php echo "This is e\n"; ?>';
+
+include 'files/phar_test.inc';
+
+copy($fname1, $fname2);
+
+var_dump(Phar::loadPhar($fname1, 'hio'));
+var_dump(Phar::loadPhar($fname1, 'copy'));
+$a = new Phar($fname1);
+try
+{
+ var_dump(Phar::loadPhar($fname2, 'copy'));
+}
+catch (Exception $e)
+{
+ echo $e->getMessage() . "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php');
+?>
+--EXPECTF--
+bool(true)
+bool(true)
+alias "copy" is already used for archive "%s029.1.phar.php" cannot be overloaded with "%s029.2.phar.php"
+===DONE===
diff --git a/ext/phar/tests/030.phpt b/ext/phar/tests/030.phpt
new file mode 100644
index 0000000..e1e94db
--- /dev/null
+++ b/ext/phar/tests/030.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Phar::loadPhar ignoring alias
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = '<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; include \''.$pname.'/b.php\'; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; include \''.$pname.'/b/c.php\'; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; include \''.$pname.'/b/d.php\'; ?>';
+$files['b/d.php'] = '<?php echo "This is b/d\n"; include \''.$pname.'/e.php\'; ?>';
+$files['e.php'] = '<?php echo "This is e\n"; ?>';
+$files['.phar/test'] = '<?php bad boy ?>';
+
+include 'files/phar_test.inc';
+
+Phar::loadPhar($fname);
+
+require $pname . '/a.php';
+
+$p = new Phar($fname);
+var_dump(isset($p['.phar/test']));
+try {
+$p['.phar/test'];
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+?>
+--EXPECTF--
+This is a
+This is b
+This is b/c
+This is b/d
+This is e
+bool(false)
+Cannot directly get any files or directories in magic ".phar" directory
+===DONE===
diff --git a/ext/phar/tests/031.phpt b/ext/phar/tests/031.phpt
new file mode 100644
index 0000000..4d59886
--- /dev/null
+++ b/ext/phar/tests/031.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Phar: include and parser error
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+$pharconfig = 3;
+
+require_once 'files/phar_oo_test.inc';
+
+Phar::loadPhar($fname);
+
+$pname = 'phar://' . $fname . '/a.php';
+
+var_dump(file_get_contents($pname));
+require $pname;
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECTF--
+string(25) "<?php echo new new class;"
+
+Parse error: %s in phar://%sphar_oo_test.phar.php/a.php on line %d
diff --git a/ext/phar/tests/032.phpt b/ext/phar/tests/032.phpt
new file mode 100644
index 0000000..faf3dcb
--- /dev/null
+++ b/ext/phar/tests/032.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Phar: require hash
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=1
+--FILE--
+<?php
+
+$pharconfig = 0;
+
+require_once 'files/phar_oo_test.inc';
+
+try {
+Phar::loadPhar($fname);
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECTF--
+
+phar "%sphar_oo_test.phar.php" does not have a signature===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/033.phpt b/ext/phar/tests/033.phpt
new file mode 100644
index 0000000..d53c7f5
--- /dev/null
+++ b/ext/phar/tests/033.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Phar::chmod
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php';
+$pname = 'phar://hio';
+$file = '<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; include "'.$pname.'/b.php"; ?>';
+$files['dir/'] = '';
+$hasdir = 1;
+include 'files/phar_test.inc';
+$a = new Phar($fname);
+var_dump($a['a.php']->isExecutable());
+$a['a.php']->chmod(0777);
+var_dump($a['a.php']->isExecutable());
+$a['a.php']->chmod(0666);
+var_dump($a['a.php']->isExecutable());
+echo "test dir\n";
+var_dump($a['dir']->isDir());
+var_dump($a['dir']->isReadable());
+$a['dir']->chmod(000);
+var_dump($a['dir']->isReadable());
+$a['dir']->chmod(0666);
+var_dump($a['dir']->isReadable());
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php');
+?>
+--EXPECT--
+bool(false)
+bool(true)
+bool(false)
+test dir
+bool(true)
+bool(true)
+bool(false)
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/033a.phpt b/ext/phar/tests/033a.phpt
new file mode 100644
index 0000000..4586f35
--- /dev/null
+++ b/ext/phar/tests/033a.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Phar::chmod
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php';
+$pname = 'phar://hio';
+$file = b'<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; include "'.$pname.'/b.php"; ?>';
+include 'files/phar_test.inc';
+try {
+ $a = new Phar($fname);
+ var_dump($a['a.php']->isExecutable());
+ $a['a.php']->chmod(0777);
+ var_dump($a['a.php']->isExecutable());
+ $a['a.php']->chmod(0666);
+ var_dump($a['a.php']->isExecutable());
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php');
+?>
+--EXPECTF--
+bool(false)
+Cannot modify permissions for file "a.php" in phar "%s033a.1.phar.php", write operations are prohibited
+===DONE===
diff --git a/ext/phar/tests/addfuncs.phpt b/ext/phar/tests/addfuncs.phpt
new file mode 100644
index 0000000..4312bff
--- /dev/null
+++ b/ext/phar/tests/addfuncs.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Phar: addFile/addFromString
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$phar = new Phar($fname);
+$phar->addFromString('a', 'hi');
+echo file_get_contents($pname . '/a') . "\n";
+$phar->addFile($pname . '/a', 'b');
+echo file_get_contents($pname . '/b') . "\n";
+try {
+$phar->addFile($pname . '/a');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$phar->addFile($pname . '/a', 'a');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$phar->addFile(dirname(__FILE__) . '/does/not/exist');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$phar->addFile($pname . '/a', '.phar/stub.php');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$phar->addFromString('.phar/stub.php', 'hi');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+hi
+hi
+Entry phar://%saddfuncs.phar.php/a does not exist and cannot be created: phar error: invalid path "phar://%saddfuncs.phar.php/a" contains double slash
+Entry a does not exist and cannot be created: phar error: file "a" in phar "%saddfuncs.phar.php" cannot be opened for writing, readable file pointers are open
+phar error: unable to open file "%s/does/not/exist" to add to phar archive
+Cannot create any files in magic ".phar" directory
+Cannot create any files in magic ".phar" directory
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/alias_acrobatics.phpt b/ext/phar/tests/alias_acrobatics.phpt
new file mode 100644
index 0000000..1bb20a4
--- /dev/null
+++ b/ext/phar/tests/alias_acrobatics.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Phar: alias edge cases
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar';
+
+$p = new Phar($fname);
+
+$p->setAlias('foo');
+$p['unused'] = 'hi';
+try {
+$a = new Phar($fname2, 0, 'foo');
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+copy($fname, $fname2);
+echo "2\n";
+try {
+$a = new Phar($fname2);
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+try {
+$b = new Phar($fname, 0, 'another');
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar');
+?>
+--EXPECTF--
+alias "foo" is already used for archive "%salias_acrobatics.phar" cannot be overloaded with "%salias_acrobatics.2.phar"
+2
+Cannot open archive "%salias_acrobatics.2.phar", alias is already in use by existing archive
+alias "another" is already used for archive "%salias_acrobatics.phar" cannot be overloaded with "%salias_acrobatics.phar"
+===DONE===
diff --git a/ext/phar/tests/badparameters.phpt b/ext/phar/tests/badparameters.phpt
new file mode 100644
index 0000000..3179697
--- /dev/null
+++ b/ext/phar/tests/badparameters.phpt
@@ -0,0 +1,186 @@
+--TEST--
+Phar: bad parameters to various methods
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+ini_set('phar.readonly', 1);
+Phar::mungServer('hi');
+Phar::createDefaultStub(array());
+Phar::loadPhar(array());
+Phar::canCompress('hi');
+$a = new Phar(array());
+$a = new Phar(dirname(__FILE__) . '/files/frontcontroller10.phar');
+$a->convertToExecutable(array());
+$a->convertToData(array());
+$b = new PharData(dirname(__FILE__) . '/whatever.tar');
+$c = new PharData(dirname(__FILE__) . '/whatever.zip');
+$b->delete(array());
+try {
+$a->delete('oops');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$b->delete('oops');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+echo $a->getPath() . "\n";
+try {
+$a->setAlias('oops');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$b->setAlias('oops');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+ini_set('phar.readonly', 0);
+$a->setAlias(array());
+ini_set('phar.readonly', 1);
+try {
+$b->stopBuffering();
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$a->setStub('oops');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$b->setStub('oops');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+ini_set('phar.readonly', 0);
+$a->setStub(array());
+ini_set('phar.readonly', 1);
+try {
+$b->setDefaultStub('oops');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+$a->setDefaultStub(array());
+try {
+$a->setDefaultStub('oops');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$a->setSignatureAlgorithm(Phar::MD5);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+$a->compress(array());
+try {
+$a->compress(1);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+$a->compressFiles(array());
+try {
+$a->decompressFiles();
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+$a->copy(array());
+try {
+$a->copy('a', 'b');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+$a->offsetExists(array());
+$a->offsetGet(array());
+ini_set('phar.readonly', 0);
+$a->offsetSet(array());
+ini_set('phar.readonly', 1);
+$b->offsetUnset(array());
+try {
+$a->offsetUnset('a');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+$a->addEmptyDir(array());
+$a->addFile(array());
+$a->addFromString(array());
+try {
+$a->setMetadata('a');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+ini_set('phar.readonly', 0);
+$a->setMetadata(1,2);
+ini_set('phar.readonly', 1);
+try {
+$a->delMetadata();
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECTF--
+Warning: Phar::mungServer() expects parameter 1 to be array, %string given in %sbadparameters.php on line %d
+
+Warning: Phar::createDefaultStub() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+
+Warning: Phar::loadPhar() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+
+Warning: Phar::canCompress() expects parameter 1 to be long, %string given in %sbadparameters.php on line %d
+
+Warning: Phar::__construct() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+
+Warning: Phar::convertToExecutable() expects parameter 1 to be long, array given in %sbadparameters.php on line %d
+
+Warning: Phar::convertToData() expects parameter 1 to be long, array given in %sbadparameters.php on line %d
+
+Warning: PharData::delete() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Cannot write out phar archive, phar is read-only
+Entry oops does not exist and cannot be deleted
+%sfiles/frontcontroller10.phar
+Cannot write out phar archive, phar is read-only
+A Phar alias cannot be set in a plain tar archive
+
+Warning: Phar::setAlias() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Cannot change stub, phar is read-only
+A Phar stub cannot be set in a plain tar archive
+
+Warning: Phar::setStub() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+A Phar stub cannot be set in a plain tar archive
+
+Warning: Phar::setDefaultStub() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Cannot change stub: phar.readonly=1
+Cannot set signature algorithm, phar is read-only
+
+Warning: Phar::compress() expects parameter 1 to be long, array given in %sbadparameters.php on line %d
+Cannot compress phar archive, phar is read-only
+
+Warning: Phar::compressFiles() expects parameter 1 to be long, array given in %sbadparameters.php on line %d
+Phar is readonly, cannot change compression
+
+Warning: Phar::copy() expects exactly 2 parameters, 1 given in %sbadparameters.php on line %d
+Cannot copy "a" to "b", phar is read-only
+
+Warning: Phar::offsetExists() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+
+Warning: Phar::offsetGet() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+
+Warning: Phar::offsetSet() expects exactly 2 parameters, 1 given in %sbadparameters.php on line %d
+
+Warning: PharData::offsetUnset() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Write operations disabled by the php.ini setting phar.readonly
+
+Warning: Phar::addEmptyDir() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+
+Warning: Phar::addFile() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+
+Warning: Phar::addFromString() expects exactly 2 parameters, 1 given in %sbadparameters.php on line %d
+Write operations disabled by the php.ini setting phar.readonly
+
+Warning: Phar::setMetadata() expects exactly 1 parameter, 2 given in %sbadparameters.php on line %d
+Write operations disabled by the php.ini setting phar.readonly
+===DONE===
diff --git a/ext/phar/tests/bug13727.phpt b/ext/phar/tests/bug13727.phpt
new file mode 100644
index 0000000..e742b95
--- /dev/null
+++ b/ext/phar/tests/bug13727.phpt
@@ -0,0 +1,4136 @@
+--TEST--
+Phar: SLOW TEST bug #13727: "Number of files in the Phar" limited to 2042
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (getenv('SKIP_SLOW_TESTS')) die('skip'); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$dirName = dirname(__FILE__);
+$pname = 'phar://' . $fname;
+$pArchive="DataArchive.phar";
+$p = new Phar($fname, 0, $pArchive);
+for ($i = 0; $i < 4*1024; $i++){
+ echo("$i\n");
+ if (!is_dir($fileDir="$dirName/test_data"))
+ mkdir($fileDir, 0777, true);
+ file_put_contents("$fileDir/$i", "");
+ $p->addFile("$fileDir/$i", "$dirName");
+}
+echo("\n Written Files($i)\n");
+?>
+===DONE===
+--CLEAN--
+<?php
+$dirName = dirname(__FILE__);
+$fileDir="$dirName/test_data";
+for ($i = 0; $i < 4*1024; $i++){
+ unlink("$fileDir/$i");
+}
+rmdir($fileDir);
+unlink($dirName . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+__HALT_COMPILER();
+?>
+--EXPECT--
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
+2903
+2904
+2905
+2906
+2907
+2908
+2909
+2910
+2911
+2912
+2913
+2914
+2915
+2916
+2917
+2918
+2919
+2920
+2921
+2922
+2923
+2924
+2925
+2926
+2927
+2928
+2929
+2930
+2931
+2932
+2933
+2934
+2935
+2936
+2937
+2938
+2939
+2940
+2941
+2942
+2943
+2944
+2945
+2946
+2947
+2948
+2949
+2950
+2951
+2952
+2953
+2954
+2955
+2956
+2957
+2958
+2959
+2960
+2961
+2962
+2963
+2964
+2965
+2966
+2967
+2968
+2969
+2970
+2971
+2972
+2973
+2974
+2975
+2976
+2977
+2978
+2979
+2980
+2981
+2982
+2983
+2984
+2985
+2986
+2987
+2988
+2989
+2990
+2991
+2992
+2993
+2994
+2995
+2996
+2997
+2998
+2999
+3000
+3001
+3002
+3003
+3004
+3005
+3006
+3007
+3008
+3009
+3010
+3011
+3012
+3013
+3014
+3015
+3016
+3017
+3018
+3019
+3020
+3021
+3022
+3023
+3024
+3025
+3026
+3027
+3028
+3029
+3030
+3031
+3032
+3033
+3034
+3035
+3036
+3037
+3038
+3039
+3040
+3041
+3042
+3043
+3044
+3045
+3046
+3047
+3048
+3049
+3050
+3051
+3052
+3053
+3054
+3055
+3056
+3057
+3058
+3059
+3060
+3061
+3062
+3063
+3064
+3065
+3066
+3067
+3068
+3069
+3070
+3071
+3072
+3073
+3074
+3075
+3076
+3077
+3078
+3079
+3080
+3081
+3082
+3083
+3084
+3085
+3086
+3087
+3088
+3089
+3090
+3091
+3092
+3093
+3094
+3095
+3096
+3097
+3098
+3099
+3100
+3101
+3102
+3103
+3104
+3105
+3106
+3107
+3108
+3109
+3110
+3111
+3112
+3113
+3114
+3115
+3116
+3117
+3118
+3119
+3120
+3121
+3122
+3123
+3124
+3125
+3126
+3127
+3128
+3129
+3130
+3131
+3132
+3133
+3134
+3135
+3136
+3137
+3138
+3139
+3140
+3141
+3142
+3143
+3144
+3145
+3146
+3147
+3148
+3149
+3150
+3151
+3152
+3153
+3154
+3155
+3156
+3157
+3158
+3159
+3160
+3161
+3162
+3163
+3164
+3165
+3166
+3167
+3168
+3169
+3170
+3171
+3172
+3173
+3174
+3175
+3176
+3177
+3178
+3179
+3180
+3181
+3182
+3183
+3184
+3185
+3186
+3187
+3188
+3189
+3190
+3191
+3192
+3193
+3194
+3195
+3196
+3197
+3198
+3199
+3200
+3201
+3202
+3203
+3204
+3205
+3206
+3207
+3208
+3209
+3210
+3211
+3212
+3213
+3214
+3215
+3216
+3217
+3218
+3219
+3220
+3221
+3222
+3223
+3224
+3225
+3226
+3227
+3228
+3229
+3230
+3231
+3232
+3233
+3234
+3235
+3236
+3237
+3238
+3239
+3240
+3241
+3242
+3243
+3244
+3245
+3246
+3247
+3248
+3249
+3250
+3251
+3252
+3253
+3254
+3255
+3256
+3257
+3258
+3259
+3260
+3261
+3262
+3263
+3264
+3265
+3266
+3267
+3268
+3269
+3270
+3271
+3272
+3273
+3274
+3275
+3276
+3277
+3278
+3279
+3280
+3281
+3282
+3283
+3284
+3285
+3286
+3287
+3288
+3289
+3290
+3291
+3292
+3293
+3294
+3295
+3296
+3297
+3298
+3299
+3300
+3301
+3302
+3303
+3304
+3305
+3306
+3307
+3308
+3309
+3310
+3311
+3312
+3313
+3314
+3315
+3316
+3317
+3318
+3319
+3320
+3321
+3322
+3323
+3324
+3325
+3326
+3327
+3328
+3329
+3330
+3331
+3332
+3333
+3334
+3335
+3336
+3337
+3338
+3339
+3340
+3341
+3342
+3343
+3344
+3345
+3346
+3347
+3348
+3349
+3350
+3351
+3352
+3353
+3354
+3355
+3356
+3357
+3358
+3359
+3360
+3361
+3362
+3363
+3364
+3365
+3366
+3367
+3368
+3369
+3370
+3371
+3372
+3373
+3374
+3375
+3376
+3377
+3378
+3379
+3380
+3381
+3382
+3383
+3384
+3385
+3386
+3387
+3388
+3389
+3390
+3391
+3392
+3393
+3394
+3395
+3396
+3397
+3398
+3399
+3400
+3401
+3402
+3403
+3404
+3405
+3406
+3407
+3408
+3409
+3410
+3411
+3412
+3413
+3414
+3415
+3416
+3417
+3418
+3419
+3420
+3421
+3422
+3423
+3424
+3425
+3426
+3427
+3428
+3429
+3430
+3431
+3432
+3433
+3434
+3435
+3436
+3437
+3438
+3439
+3440
+3441
+3442
+3443
+3444
+3445
+3446
+3447
+3448
+3449
+3450
+3451
+3452
+3453
+3454
+3455
+3456
+3457
+3458
+3459
+3460
+3461
+3462
+3463
+3464
+3465
+3466
+3467
+3468
+3469
+3470
+3471
+3472
+3473
+3474
+3475
+3476
+3477
+3478
+3479
+3480
+3481
+3482
+3483
+3484
+3485
+3486
+3487
+3488
+3489
+3490
+3491
+3492
+3493
+3494
+3495
+3496
+3497
+3498
+3499
+3500
+3501
+3502
+3503
+3504
+3505
+3506
+3507
+3508
+3509
+3510
+3511
+3512
+3513
+3514
+3515
+3516
+3517
+3518
+3519
+3520
+3521
+3522
+3523
+3524
+3525
+3526
+3527
+3528
+3529
+3530
+3531
+3532
+3533
+3534
+3535
+3536
+3537
+3538
+3539
+3540
+3541
+3542
+3543
+3544
+3545
+3546
+3547
+3548
+3549
+3550
+3551
+3552
+3553
+3554
+3555
+3556
+3557
+3558
+3559
+3560
+3561
+3562
+3563
+3564
+3565
+3566
+3567
+3568
+3569
+3570
+3571
+3572
+3573
+3574
+3575
+3576
+3577
+3578
+3579
+3580
+3581
+3582
+3583
+3584
+3585
+3586
+3587
+3588
+3589
+3590
+3591
+3592
+3593
+3594
+3595
+3596
+3597
+3598
+3599
+3600
+3601
+3602
+3603
+3604
+3605
+3606
+3607
+3608
+3609
+3610
+3611
+3612
+3613
+3614
+3615
+3616
+3617
+3618
+3619
+3620
+3621
+3622
+3623
+3624
+3625
+3626
+3627
+3628
+3629
+3630
+3631
+3632
+3633
+3634
+3635
+3636
+3637
+3638
+3639
+3640
+3641
+3642
+3643
+3644
+3645
+3646
+3647
+3648
+3649
+3650
+3651
+3652
+3653
+3654
+3655
+3656
+3657
+3658
+3659
+3660
+3661
+3662
+3663
+3664
+3665
+3666
+3667
+3668
+3669
+3670
+3671
+3672
+3673
+3674
+3675
+3676
+3677
+3678
+3679
+3680
+3681
+3682
+3683
+3684
+3685
+3686
+3687
+3688
+3689
+3690
+3691
+3692
+3693
+3694
+3695
+3696
+3697
+3698
+3699
+3700
+3701
+3702
+3703
+3704
+3705
+3706
+3707
+3708
+3709
+3710
+3711
+3712
+3713
+3714
+3715
+3716
+3717
+3718
+3719
+3720
+3721
+3722
+3723
+3724
+3725
+3726
+3727
+3728
+3729
+3730
+3731
+3732
+3733
+3734
+3735
+3736
+3737
+3738
+3739
+3740
+3741
+3742
+3743
+3744
+3745
+3746
+3747
+3748
+3749
+3750
+3751
+3752
+3753
+3754
+3755
+3756
+3757
+3758
+3759
+3760
+3761
+3762
+3763
+3764
+3765
+3766
+3767
+3768
+3769
+3770
+3771
+3772
+3773
+3774
+3775
+3776
+3777
+3778
+3779
+3780
+3781
+3782
+3783
+3784
+3785
+3786
+3787
+3788
+3789
+3790
+3791
+3792
+3793
+3794
+3795
+3796
+3797
+3798
+3799
+3800
+3801
+3802
+3803
+3804
+3805
+3806
+3807
+3808
+3809
+3810
+3811
+3812
+3813
+3814
+3815
+3816
+3817
+3818
+3819
+3820
+3821
+3822
+3823
+3824
+3825
+3826
+3827
+3828
+3829
+3830
+3831
+3832
+3833
+3834
+3835
+3836
+3837
+3838
+3839
+3840
+3841
+3842
+3843
+3844
+3845
+3846
+3847
+3848
+3849
+3850
+3851
+3852
+3853
+3854
+3855
+3856
+3857
+3858
+3859
+3860
+3861
+3862
+3863
+3864
+3865
+3866
+3867
+3868
+3869
+3870
+3871
+3872
+3873
+3874
+3875
+3876
+3877
+3878
+3879
+3880
+3881
+3882
+3883
+3884
+3885
+3886
+3887
+3888
+3889
+3890
+3891
+3892
+3893
+3894
+3895
+3896
+3897
+3898
+3899
+3900
+3901
+3902
+3903
+3904
+3905
+3906
+3907
+3908
+3909
+3910
+3911
+3912
+3913
+3914
+3915
+3916
+3917
+3918
+3919
+3920
+3921
+3922
+3923
+3924
+3925
+3926
+3927
+3928
+3929
+3930
+3931
+3932
+3933
+3934
+3935
+3936
+3937
+3938
+3939
+3940
+3941
+3942
+3943
+3944
+3945
+3946
+3947
+3948
+3949
+3950
+3951
+3952
+3953
+3954
+3955
+3956
+3957
+3958
+3959
+3960
+3961
+3962
+3963
+3964
+3965
+3966
+3967
+3968
+3969
+3970
+3971
+3972
+3973
+3974
+3975
+3976
+3977
+3978
+3979
+3980
+3981
+3982
+3983
+3984
+3985
+3986
+3987
+3988
+3989
+3990
+3991
+3992
+3993
+3994
+3995
+3996
+3997
+3998
+3999
+4000
+4001
+4002
+4003
+4004
+4005
+4006
+4007
+4008
+4009
+4010
+4011
+4012
+4013
+4014
+4015
+4016
+4017
+4018
+4019
+4020
+4021
+4022
+4023
+4024
+4025
+4026
+4027
+4028
+4029
+4030
+4031
+4032
+4033
+4034
+4035
+4036
+4037
+4038
+4039
+4040
+4041
+4042
+4043
+4044
+4045
+4046
+4047
+4048
+4049
+4050
+4051
+4052
+4053
+4054
+4055
+4056
+4057
+4058
+4059
+4060
+4061
+4062
+4063
+4064
+4065
+4066
+4067
+4068
+4069
+4070
+4071
+4072
+4073
+4074
+4075
+4076
+4077
+4078
+4079
+4080
+4081
+4082
+4083
+4084
+4085
+4086
+4087
+4088
+4089
+4090
+4091
+4092
+4093
+4094
+4095
+
+ Written Files(4096)
+===DONE===
diff --git a/ext/phar/tests/bug13786.phpt b/ext/phar/tests/bug13786.phpt
new file mode 100644
index 0000000..572d1eb
--- /dev/null
+++ b/ext/phar/tests/bug13786.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Phar: bug #13786: "PHP crashes on phar recreate after unlink"
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+try {
+for ($i = 0; $i < 2; $i++) {
+ $fname = "DataArchive.phar";
+ $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . $fname;
+ $phar = new Phar($path);
+ $phar->addFromString($i, "file $i in $fname");
+ var_dump(file_get_contents($phar[$i]));
+ unset($phar);
+ unlink($path);
+}
+
+echo("\nWritten files: $i\n");
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+
+?>
+===DONE===
+--EXPECTF--
+string(26) "file 0 in DataArchive.phar"
+unable to seek to start of file "0" while creating new phar "%sDataArchive.phar"
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/bug45218_SLOWTEST.phpt b/ext/phar/tests/bug45218_SLOWTEST.phpt
new file mode 100644
index 0000000..80356af
--- /dev/null
+++ b/ext/phar/tests/bug45218_SLOWTEST.phpt
@@ -0,0 +1,6092 @@
+--TEST--
+Phar::buildFromIterator() iterator, too many files for open file handles (Bug #45218)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.txt';
+file_put_contents($fname2, 'a');
+class myIterator implements Iterator
+{
+ var $a;
+ var $count = 1;
+
+ function next() {
+ return (++$this->count < 3000) ? 'f' . $this->count : false;
+ }
+ function current() {
+ if (($this->count % 100) === 0) {
+ echo $this->count, "\n";
+ }
+ return $GLOBALS['fname2'];
+ }
+ function key() {
+ return 'f' . $this->count;
+ }
+ function valid() {
+ return $this->count < 3000;
+ }
+ function rewind() {
+ $this->count = 1;
+ return $GLOBALS['fname2'];
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar($fname);
+ $ret = $phar->buildFromIterator(new myIterator);
+ foreach ($ret as $a => $val) {
+ $ret[$a] = str_replace(dirname($fname2) . DIRECTORY_SEPARATOR, '*', $val);
+ }
+ var_dump($ret);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.txt');
+__halt_compiler();
+?>
+--EXPECT--
+100
+200
+300
+400
+500
+600
+700
+800
+900
+1000
+1100
+1200
+1300
+1400
+1500
+1600
+1700
+1800
+1900
+2000
+2100
+2200
+2300
+2400
+2500
+2600
+2700
+2800
+2900
+array(2999) {
+ ["f1"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f3"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f4"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f5"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f6"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f7"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f8"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f9"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f10"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f11"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f12"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f13"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f14"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f15"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f16"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f17"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f18"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f19"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f20"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f21"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f22"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f23"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f24"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f25"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f26"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f27"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f28"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f29"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f30"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f31"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f32"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f33"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f34"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f35"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f36"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f37"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f38"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f39"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f40"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f41"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f42"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f43"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f44"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f45"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f46"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f47"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f48"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f49"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f50"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f51"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f52"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f53"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f54"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f55"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f56"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f57"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f58"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f59"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f60"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f61"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f62"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f63"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f64"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f65"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f66"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f67"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f68"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f69"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f70"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f71"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f72"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f73"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f74"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f75"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f76"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f77"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f78"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f79"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f80"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f81"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f82"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f83"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f84"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f85"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f86"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f87"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f88"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f89"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f90"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f91"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f92"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f93"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f94"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f95"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f96"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f97"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f98"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f99"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f100"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f101"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f102"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f103"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f104"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f105"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f106"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f107"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f108"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f109"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f110"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f111"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f112"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f113"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f114"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f115"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f116"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f117"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f118"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f119"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f120"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f121"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f122"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f123"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f124"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f125"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f126"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f127"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f128"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f129"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f130"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f131"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f132"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f133"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f134"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f135"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f136"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f137"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f138"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f139"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f140"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f141"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f142"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f143"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f144"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f145"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f146"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f147"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f148"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f149"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f150"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f151"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f152"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f153"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f154"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f155"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f156"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f157"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f158"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f159"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f160"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f161"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f162"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f163"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f164"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f165"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f166"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f167"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f168"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f169"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f170"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f171"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f172"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f173"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f174"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f175"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f176"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f177"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f178"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f179"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f180"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f181"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f182"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f183"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f184"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f185"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f186"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f187"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f188"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f189"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f190"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f191"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f192"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f193"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f194"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f195"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f196"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f197"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f198"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f199"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f200"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f201"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f202"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f203"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f204"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f205"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f206"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f207"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f208"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f209"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f210"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f211"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f212"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f213"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f214"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f215"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f216"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f217"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f218"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f219"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f220"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f221"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f222"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f223"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f224"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f225"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f226"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f227"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f228"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f229"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f230"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f231"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f232"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f233"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f234"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f235"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f236"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f237"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f238"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f239"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f240"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f241"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f242"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f243"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f244"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f245"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f246"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f247"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f248"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f249"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f250"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f251"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f252"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f253"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f254"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f255"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f256"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f257"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f258"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f259"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f260"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f261"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f262"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f263"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f264"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f265"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f266"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f267"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f268"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f269"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f270"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f271"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f272"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f273"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f274"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f275"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f276"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f277"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f278"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f279"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f280"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f281"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f282"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f283"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f284"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f285"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f286"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f287"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f288"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f289"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f290"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f291"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f292"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f293"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f294"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f295"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f296"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f297"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f298"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f299"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f300"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f301"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f302"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f303"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f304"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f305"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f306"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f307"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f308"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f309"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f310"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f311"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f312"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f313"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f314"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f315"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f316"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f317"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f318"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f319"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f320"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f321"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f322"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f323"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f324"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f325"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f326"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f327"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f328"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f329"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f330"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f331"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f332"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f333"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f334"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f335"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f336"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f337"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f338"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f339"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f340"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f341"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f342"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f343"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f344"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f345"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f346"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f347"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f348"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f349"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f350"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f351"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f352"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f353"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f354"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f355"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f356"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f357"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f358"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f359"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f360"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f361"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f362"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f363"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f364"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f365"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f366"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f367"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f368"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f369"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f370"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f371"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f372"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f373"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f374"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f375"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f376"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f377"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f378"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f379"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f380"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f381"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f382"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f383"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f384"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f385"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f386"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f387"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f388"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f389"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f390"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f391"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f392"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f393"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f394"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f395"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f396"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f397"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f398"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f399"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f400"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f401"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f402"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f403"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f404"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f405"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f406"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f407"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f408"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f409"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f410"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f411"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f412"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f413"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f414"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f415"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f416"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f417"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f418"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f419"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f420"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f421"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f422"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f423"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f424"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f425"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f426"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f427"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f428"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f429"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f430"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f431"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f432"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f433"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f434"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f435"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f436"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f437"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f438"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f439"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f440"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f441"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f442"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f443"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f444"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f445"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f446"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f447"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f448"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f449"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f450"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f451"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f452"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f453"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f454"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f455"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f456"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f457"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f458"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f459"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f460"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f461"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f462"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f463"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f464"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f465"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f466"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f467"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f468"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f469"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f470"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f471"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f472"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f473"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f474"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f475"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f476"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f477"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f478"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f479"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f480"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f481"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f482"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f483"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f484"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f485"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f486"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f487"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f488"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f489"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f490"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f491"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f492"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f493"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f494"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f495"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f496"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f497"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f498"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f499"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f500"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f501"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f502"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f503"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f504"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f505"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f506"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f507"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f508"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f509"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f510"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f511"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f512"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f513"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f514"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f515"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f516"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f517"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f518"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f519"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f520"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f521"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f522"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f523"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f524"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f525"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f526"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f527"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f528"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f529"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f530"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f531"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f532"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f533"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f534"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f535"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f536"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f537"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f538"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f539"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f540"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f541"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f542"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f543"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f544"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f545"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f546"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f547"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f548"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f549"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f550"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f551"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f552"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f553"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f554"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f555"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f556"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f557"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f558"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f559"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f560"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f561"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f562"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f563"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f564"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f565"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f566"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f567"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f568"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f569"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f570"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f571"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f572"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f573"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f574"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f575"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f576"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f577"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f578"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f579"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f580"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f581"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f582"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f583"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f584"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f585"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f586"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f587"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f588"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f589"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f590"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f591"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f592"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f593"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f594"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f595"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f596"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f597"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f598"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f599"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f600"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f601"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f602"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f603"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f604"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f605"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f606"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f607"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f608"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f609"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f610"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f611"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f612"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f613"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f614"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f615"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f616"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f617"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f618"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f619"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f620"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f621"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f622"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f623"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f624"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f625"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f626"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f627"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f628"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f629"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f630"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f631"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f632"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f633"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f634"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f635"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f636"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f637"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f638"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f639"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f640"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f641"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f642"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f643"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f644"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f645"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f646"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f647"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f648"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f649"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f650"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f651"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f652"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f653"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f654"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f655"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f656"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f657"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f658"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f659"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f660"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f661"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f662"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f663"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f664"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f665"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f666"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f667"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f668"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f669"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f670"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f671"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f672"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f673"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f674"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f675"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f676"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f677"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f678"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f679"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f680"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f681"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f682"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f683"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f684"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f685"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f686"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f687"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f688"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f689"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f690"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f691"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f692"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f693"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f694"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f695"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f696"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f697"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f698"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f699"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f700"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f701"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f702"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f703"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f704"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f705"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f706"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f707"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f708"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f709"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f710"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f711"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f712"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f713"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f714"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f715"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f716"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f717"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f718"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f719"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f720"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f721"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f722"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f723"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f724"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f725"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f726"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f727"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f728"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f729"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f730"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f731"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f732"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f733"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f734"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f735"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f736"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f737"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f738"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f739"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f740"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f741"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f742"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f743"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f744"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f745"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f746"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f747"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f748"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f749"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f750"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f751"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f752"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f753"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f754"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f755"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f756"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f757"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f758"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f759"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f760"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f761"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f762"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f763"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f764"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f765"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f766"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f767"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f768"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f769"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f770"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f771"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f772"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f773"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f774"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f775"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f776"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f777"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f778"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f779"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f780"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f781"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f782"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f783"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f784"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f785"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f786"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f787"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f788"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f789"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f790"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f791"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f792"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f793"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f794"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f795"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f796"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f797"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f798"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f799"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f800"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f801"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f802"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f803"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f804"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f805"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f806"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f807"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f808"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f809"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f810"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f811"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f812"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f813"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f814"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f815"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f816"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f817"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f818"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f819"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f820"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f821"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f822"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f823"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f824"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f825"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f826"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f827"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f828"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f829"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f830"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f831"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f832"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f833"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f834"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f835"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f836"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f837"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f838"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f839"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f840"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f841"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f842"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f843"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f844"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f845"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f846"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f847"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f848"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f849"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f850"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f851"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f852"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f853"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f854"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f855"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f856"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f857"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f858"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f859"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f860"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f861"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f862"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f863"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f864"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f865"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f866"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f867"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f868"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f869"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f870"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f871"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f872"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f873"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f874"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f875"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f876"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f877"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f878"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f879"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f880"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f881"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f882"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f883"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f884"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f885"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f886"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f887"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f888"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f889"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f890"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f891"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f892"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f893"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f894"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f895"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f896"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f897"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f898"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f899"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f900"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f901"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f902"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f903"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f904"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f905"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f906"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f907"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f908"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f909"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f910"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f911"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f912"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f913"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f914"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f915"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f916"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f917"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f918"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f919"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f920"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f921"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f922"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f923"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f924"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f925"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f926"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f927"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f928"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f929"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f930"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f931"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f932"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f933"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f934"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f935"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f936"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f937"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f938"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f939"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f940"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f941"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f942"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f943"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f944"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f945"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f946"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f947"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f948"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f949"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f950"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f951"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f952"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f953"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f954"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f955"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f956"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f957"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f958"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f959"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f960"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f961"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f962"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f963"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f964"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f965"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f966"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f967"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f968"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f969"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f970"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f971"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f972"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f973"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f974"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f975"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f976"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f977"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f978"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f979"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f980"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f981"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f982"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f983"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f984"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f985"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f986"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f987"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f988"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f989"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f990"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f991"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f992"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f993"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f994"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f995"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f996"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f997"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f998"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f999"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1000"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1001"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1002"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1003"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1004"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1005"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1006"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1007"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1008"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1009"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1010"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1011"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1012"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1013"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1014"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1015"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1016"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1017"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1018"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1019"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1020"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1021"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1022"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1023"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1024"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1025"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1026"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1027"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1028"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1029"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1030"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1031"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1032"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1033"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1034"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1035"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1036"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1037"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1038"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1039"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1040"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1041"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1042"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1043"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1044"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1045"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1046"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1047"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1048"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1049"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1050"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1051"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1052"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1053"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1054"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1055"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1056"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1057"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1058"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1059"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1060"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1061"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1062"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1063"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1064"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1065"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1066"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1067"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1068"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1069"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1070"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1071"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1072"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1073"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1074"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1075"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1076"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1077"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1078"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1079"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1080"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1081"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1082"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1083"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1084"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1085"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1086"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1087"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1088"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1089"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1090"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1091"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1092"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1093"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1094"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1095"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1096"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1097"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1098"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1099"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1100"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1101"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1102"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1103"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1104"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1105"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1106"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1107"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1108"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1109"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1110"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1111"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1112"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1113"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1114"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1115"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1116"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1117"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1118"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1119"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1120"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1121"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1122"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1123"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1124"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1125"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1126"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1127"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1128"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1129"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1130"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1131"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1132"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1133"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1134"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1135"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1136"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1137"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1138"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1139"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1140"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1141"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1142"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1143"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1144"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1145"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1146"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1147"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1148"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1149"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1150"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1151"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1152"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1153"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1154"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1155"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1156"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1157"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1158"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1159"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1160"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1161"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1162"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1163"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1164"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1165"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1166"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1167"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1168"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1169"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1170"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1171"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1172"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1173"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1174"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1175"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1176"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1177"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1178"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1179"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1180"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1181"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1182"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1183"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1184"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1185"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1186"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1187"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1188"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1189"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1190"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1191"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1192"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1193"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1194"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1195"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1196"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1197"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1198"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1199"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1200"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1201"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1202"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1203"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1204"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1205"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1206"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1207"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1208"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1209"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1210"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1211"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1212"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1213"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1214"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1215"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1216"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1217"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1218"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1219"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1220"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1221"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1222"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1223"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1224"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1225"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1226"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1227"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1228"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1229"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1230"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1231"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1232"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1233"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1234"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1235"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1236"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1237"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1238"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1239"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1240"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1241"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1242"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1243"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1244"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1245"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1246"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1247"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1248"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1249"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1250"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1251"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1252"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1253"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1254"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1255"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1256"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1257"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1258"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1259"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1260"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1261"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1262"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1263"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1264"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1265"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1266"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1267"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1268"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1269"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1270"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1271"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1272"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1273"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1274"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1275"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1276"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1277"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1278"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1279"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1280"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1281"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1282"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1283"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1284"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1285"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1286"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1287"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1288"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1289"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1290"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1291"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1292"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1293"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1294"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1295"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1296"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1297"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1298"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1299"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1300"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1301"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1302"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1303"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1304"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1305"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1306"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1307"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1308"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1309"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1310"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1311"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1312"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1313"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1314"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1315"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1316"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1317"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1318"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1319"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1320"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1321"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1322"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1323"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1324"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1325"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1326"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1327"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1328"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1329"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1330"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1331"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1332"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1333"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1334"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1335"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1336"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1337"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1338"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1339"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1340"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1341"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1342"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1343"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1344"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1345"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1346"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1347"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1348"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1349"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1350"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1351"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1352"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1353"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1354"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1355"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1356"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1357"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1358"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1359"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1360"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1361"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1362"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1363"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1364"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1365"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1366"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1367"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1368"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1369"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1370"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1371"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1372"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1373"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1374"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1375"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1376"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1377"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1378"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1379"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1380"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1381"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1382"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1383"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1384"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1385"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1386"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1387"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1388"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1389"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1390"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1391"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1392"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1393"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1394"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1395"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1396"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1397"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1398"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1399"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1400"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1401"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1402"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1403"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1404"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1405"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1406"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1407"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1408"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1409"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1410"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1411"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1412"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1413"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1414"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1415"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1416"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1417"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1418"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1419"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1420"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1421"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1422"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1423"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1424"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1425"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1426"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1427"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1428"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1429"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1430"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1431"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1432"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1433"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1434"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1435"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1436"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1437"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1438"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1439"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1440"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1441"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1442"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1443"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1444"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1445"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1446"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1447"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1448"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1449"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1450"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1451"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1452"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1453"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1454"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1455"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1456"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1457"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1458"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1459"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1460"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1461"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1462"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1463"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1464"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1465"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1466"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1467"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1468"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1469"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1470"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1471"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1472"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1473"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1474"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1475"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1476"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1477"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1478"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1479"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1480"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1481"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1482"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1483"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1484"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1485"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1486"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1487"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1488"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1489"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1490"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1491"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1492"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1493"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1494"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1495"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1496"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1497"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1498"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1499"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1500"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1501"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1502"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1503"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1504"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1505"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1506"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1507"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1508"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1509"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1510"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1511"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1512"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1513"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1514"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1515"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1516"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1517"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1518"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1519"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1520"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1521"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1522"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1523"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1524"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1525"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1526"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1527"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1528"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1529"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1530"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1531"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1532"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1533"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1534"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1535"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1536"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1537"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1538"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1539"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1540"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1541"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1542"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1543"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1544"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1545"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1546"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1547"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1548"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1549"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1550"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1551"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1552"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1553"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1554"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1555"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1556"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1557"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1558"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1559"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1560"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1561"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1562"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1563"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1564"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1565"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1566"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1567"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1568"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1569"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1570"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1571"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1572"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1573"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1574"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1575"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1576"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1577"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1578"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1579"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1580"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1581"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1582"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1583"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1584"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1585"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1586"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1587"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1588"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1589"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1590"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1591"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1592"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1593"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1594"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1595"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1596"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1597"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1598"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1599"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1600"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1601"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1602"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1603"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1604"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1605"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1606"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1607"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1608"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1609"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1610"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1611"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1612"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1613"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1614"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1615"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1616"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1617"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1618"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1619"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1620"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1621"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1622"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1623"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1624"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1625"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1626"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1627"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1628"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1629"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1630"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1631"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1632"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1633"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1634"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1635"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1636"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1637"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1638"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1639"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1640"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1641"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1642"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1643"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1644"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1645"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1646"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1647"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1648"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1649"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1650"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1651"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1652"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1653"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1654"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1655"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1656"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1657"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1658"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1659"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1660"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1661"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1662"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1663"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1664"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1665"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1666"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1667"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1668"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1669"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1670"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1671"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1672"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1673"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1674"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1675"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1676"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1677"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1678"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1679"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1680"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1681"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1682"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1683"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1684"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1685"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1686"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1687"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1688"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1689"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1690"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1691"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1692"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1693"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1694"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1695"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1696"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1697"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1698"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1699"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1700"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1701"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1702"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1703"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1704"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1705"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1706"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1707"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1708"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1709"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1710"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1711"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1712"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1713"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1714"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1715"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1716"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1717"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1718"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1719"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1720"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1721"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1722"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1723"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1724"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1725"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1726"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1727"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1728"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1729"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1730"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1731"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1732"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1733"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1734"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1735"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1736"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1737"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1738"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1739"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1740"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1741"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1742"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1743"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1744"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1745"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1746"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1747"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1748"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1749"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1750"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1751"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1752"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1753"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1754"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1755"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1756"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1757"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1758"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1759"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1760"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1761"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1762"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1763"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1764"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1765"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1766"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1767"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1768"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1769"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1770"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1771"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1772"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1773"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1774"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1775"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1776"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1777"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1778"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1779"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1780"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1781"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1782"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1783"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1784"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1785"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1786"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1787"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1788"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1789"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1790"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1791"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1792"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1793"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1794"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1795"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1796"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1797"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1798"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1799"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1800"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1801"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1802"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1803"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1804"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1805"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1806"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1807"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1808"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1809"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1810"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1811"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1812"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1813"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1814"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1815"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1816"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1817"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1818"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1819"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1820"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1821"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1822"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1823"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1824"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1825"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1826"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1827"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1828"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1829"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1830"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1831"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1832"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1833"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1834"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1835"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1836"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1837"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1838"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1839"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1840"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1841"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1842"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1843"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1844"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1845"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1846"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1847"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1848"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1849"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1850"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1851"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1852"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1853"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1854"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1855"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1856"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1857"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1858"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1859"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1860"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1861"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1862"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1863"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1864"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1865"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1866"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1867"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1868"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1869"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1870"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1871"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1872"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1873"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1874"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1875"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1876"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1877"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1878"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1879"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1880"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1881"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1882"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1883"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1884"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1885"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1886"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1887"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1888"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1889"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1890"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1891"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1892"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1893"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1894"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1895"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1896"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1897"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1898"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1899"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1900"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1901"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1902"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1903"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1904"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1905"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1906"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1907"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1908"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1909"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1910"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1911"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1912"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1913"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1914"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1915"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1916"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1917"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1918"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1919"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1920"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1921"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1922"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1923"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1924"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1925"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1926"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1927"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1928"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1929"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1930"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1931"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1932"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1933"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1934"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1935"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1936"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1937"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1938"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1939"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1940"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1941"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1942"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1943"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1944"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1945"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1946"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1947"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1948"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1949"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1950"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1951"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1952"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1953"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1954"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1955"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1956"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1957"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1958"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1959"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1960"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1961"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1962"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1963"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1964"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1965"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1966"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1967"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1968"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1969"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1970"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1971"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1972"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1973"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1974"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1975"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1976"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1977"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1978"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1979"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1980"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1981"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1982"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1983"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1984"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1985"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1986"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1987"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1988"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1989"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1990"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1991"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1992"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1993"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1994"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1995"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1996"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1997"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1998"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f1999"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2000"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2001"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2002"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2003"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2004"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2005"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2006"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2007"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2008"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2009"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2010"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2011"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2012"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2013"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2014"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2015"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2016"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2017"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2018"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2019"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2020"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2021"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2022"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2023"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2024"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2025"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2026"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2027"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2028"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2029"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2030"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2031"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2032"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2033"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2034"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2035"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2036"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2037"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2038"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2039"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2040"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2041"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2042"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2043"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2044"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2045"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2046"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2047"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2048"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2049"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2050"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2051"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2052"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2053"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2054"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2055"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2056"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2057"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2058"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2059"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2060"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2061"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2062"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2063"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2064"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2065"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2066"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2067"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2068"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2069"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2070"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2071"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2072"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2073"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2074"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2075"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2076"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2077"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2078"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2079"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2080"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2081"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2082"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2083"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2084"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2085"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2086"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2087"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2088"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2089"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2090"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2091"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2092"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2093"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2094"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2095"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2096"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2097"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2098"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2099"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2100"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2101"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2102"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2103"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2104"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2105"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2106"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2107"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2108"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2109"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2110"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2111"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2112"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2113"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2114"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2115"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2116"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2117"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2118"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2119"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2120"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2121"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2122"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2123"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2124"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2125"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2126"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2127"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2128"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2129"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2130"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2131"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2132"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2133"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2134"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2135"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2136"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2137"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2138"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2139"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2140"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2141"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2142"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2143"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2144"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2145"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2146"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2147"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2148"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2149"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2150"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2151"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2152"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2153"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2154"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2155"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2156"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2157"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2158"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2159"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2160"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2161"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2162"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2163"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2164"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2165"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2166"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2167"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2168"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2169"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2170"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2171"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2172"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2173"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2174"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2175"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2176"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2177"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2178"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2179"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2180"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2181"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2182"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2183"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2184"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2185"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2186"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2187"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2188"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2189"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2190"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2191"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2192"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2193"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2194"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2195"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2196"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2197"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2198"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2199"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2200"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2201"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2202"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2203"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2204"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2205"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2206"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2207"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2208"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2209"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2210"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2211"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2212"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2213"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2214"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2215"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2216"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2217"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2218"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2219"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2220"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2221"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2222"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2223"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2224"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2225"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2226"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2227"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2228"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2229"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2230"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2231"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2232"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2233"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2234"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2235"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2236"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2237"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2238"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2239"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2240"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2241"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2242"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2243"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2244"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2245"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2246"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2247"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2248"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2249"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2250"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2251"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2252"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2253"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2254"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2255"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2256"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2257"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2258"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2259"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2260"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2261"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2262"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2263"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2264"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2265"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2266"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2267"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2268"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2269"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2270"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2271"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2272"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2273"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2274"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2275"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2276"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2277"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2278"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2279"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2280"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2281"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2282"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2283"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2284"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2285"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2286"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2287"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2288"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2289"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2290"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2291"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2292"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2293"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2294"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2295"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2296"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2297"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2298"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2299"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2300"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2301"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2302"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2303"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2304"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2305"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2306"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2307"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2308"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2309"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2310"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2311"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2312"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2313"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2314"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2315"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2316"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2317"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2318"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2319"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2320"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2321"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2322"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2323"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2324"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2325"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2326"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2327"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2328"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2329"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2330"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2331"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2332"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2333"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2334"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2335"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2336"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2337"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2338"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2339"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2340"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2341"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2342"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2343"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2344"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2345"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2346"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2347"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2348"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2349"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2350"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2351"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2352"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2353"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2354"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2355"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2356"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2357"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2358"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2359"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2360"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2361"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2362"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2363"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2364"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2365"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2366"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2367"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2368"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2369"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2370"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2371"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2372"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2373"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2374"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2375"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2376"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2377"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2378"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2379"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2380"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2381"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2382"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2383"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2384"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2385"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2386"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2387"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2388"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2389"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2390"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2391"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2392"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2393"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2394"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2395"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2396"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2397"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2398"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2399"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2400"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2401"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2402"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2403"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2404"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2405"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2406"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2407"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2408"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2409"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2410"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2411"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2412"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2413"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2414"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2415"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2416"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2417"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2418"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2419"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2420"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2421"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2422"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2423"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2424"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2425"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2426"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2427"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2428"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2429"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2430"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2431"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2432"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2433"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2434"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2435"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2436"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2437"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2438"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2439"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2440"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2441"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2442"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2443"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2444"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2445"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2446"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2447"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2448"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2449"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2450"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2451"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2452"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2453"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2454"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2455"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2456"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2457"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2458"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2459"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2460"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2461"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2462"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2463"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2464"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2465"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2466"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2467"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2468"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2469"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2470"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2471"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2472"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2473"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2474"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2475"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2476"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2477"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2478"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2479"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2480"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2481"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2482"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2483"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2484"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2485"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2486"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2487"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2488"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2489"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2490"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2491"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2492"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2493"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2494"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2495"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2496"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2497"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2498"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2499"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2500"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2501"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2502"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2503"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2504"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2505"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2506"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2507"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2508"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2509"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2510"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2511"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2512"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2513"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2514"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2515"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2516"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2517"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2518"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2519"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2520"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2521"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2522"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2523"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2524"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2525"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2526"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2527"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2528"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2529"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2530"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2531"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2532"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2533"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2534"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2535"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2536"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2537"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2538"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2539"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2540"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2541"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2542"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2543"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2544"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2545"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2546"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2547"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2548"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2549"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2550"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2551"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2552"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2553"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2554"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2555"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2556"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2557"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2558"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2559"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2560"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2561"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2562"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2563"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2564"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2565"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2566"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2567"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2568"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2569"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2570"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2571"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2572"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2573"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2574"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2575"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2576"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2577"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2578"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2579"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2580"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2581"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2582"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2583"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2584"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2585"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2586"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2587"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2588"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2589"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2590"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2591"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2592"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2593"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2594"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2595"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2596"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2597"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2598"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2599"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2600"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2601"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2602"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2603"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2604"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2605"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2606"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2607"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2608"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2609"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2610"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2611"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2612"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2613"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2614"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2615"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2616"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2617"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2618"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2619"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2620"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2621"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2622"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2623"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2624"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2625"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2626"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2627"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2628"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2629"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2630"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2631"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2632"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2633"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2634"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2635"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2636"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2637"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2638"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2639"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2640"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2641"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2642"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2643"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2644"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2645"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2646"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2647"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2648"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2649"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2650"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2651"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2652"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2653"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2654"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2655"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2656"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2657"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2658"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2659"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2660"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2661"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2662"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2663"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2664"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2665"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2666"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2667"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2668"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2669"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2670"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2671"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2672"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2673"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2674"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2675"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2676"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2677"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2678"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2679"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2680"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2681"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2682"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2683"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2684"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2685"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2686"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2687"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2688"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2689"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2690"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2691"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2692"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2693"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2694"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2695"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2696"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2697"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2698"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2699"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2700"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2701"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2702"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2703"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2704"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2705"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2706"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2707"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2708"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2709"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2710"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2711"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2712"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2713"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2714"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2715"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2716"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2717"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2718"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2719"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2720"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2721"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2722"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2723"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2724"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2725"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2726"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2727"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2728"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2729"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2730"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2731"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2732"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2733"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2734"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2735"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2736"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2737"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2738"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2739"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2740"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2741"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2742"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2743"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2744"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2745"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2746"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2747"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2748"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2749"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2750"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2751"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2752"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2753"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2754"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2755"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2756"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2757"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2758"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2759"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2760"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2761"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2762"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2763"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2764"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2765"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2766"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2767"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2768"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2769"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2770"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2771"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2772"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2773"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2774"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2775"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2776"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2777"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2778"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2779"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2780"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2781"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2782"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2783"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2784"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2785"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2786"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2787"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2788"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2789"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2790"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2791"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2792"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2793"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2794"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2795"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2796"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2797"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2798"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2799"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2800"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2801"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2802"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2803"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2804"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2805"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2806"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2807"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2808"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2809"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2810"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2811"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2812"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2813"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2814"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2815"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2816"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2817"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2818"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2819"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2820"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2821"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2822"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2823"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2824"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2825"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2826"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2827"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2828"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2829"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2830"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2831"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2832"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2833"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2834"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2835"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2836"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2837"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2838"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2839"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2840"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2841"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2842"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2843"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2844"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2845"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2846"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2847"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2848"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2849"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2850"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2851"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2852"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2853"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2854"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2855"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2856"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2857"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2858"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2859"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2860"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2861"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2862"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2863"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2864"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2865"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2866"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2867"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2868"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2869"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2870"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2871"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2872"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2873"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2874"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2875"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2876"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2877"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2878"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2879"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2880"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2881"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2882"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2883"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2884"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2885"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2886"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2887"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2888"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2889"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2890"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2891"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2892"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2893"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2894"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2895"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2896"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2897"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2898"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2899"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2900"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2901"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2902"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2903"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2904"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2905"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2906"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2907"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2908"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2909"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2910"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2911"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2912"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2913"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2914"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2915"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2916"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2917"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2918"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2919"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2920"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2921"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2922"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2923"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2924"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2925"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2926"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2927"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2928"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2929"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2930"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2931"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2932"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2933"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2934"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2935"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2936"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2937"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2938"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2939"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2940"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2941"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2942"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2943"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2944"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2945"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2946"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2947"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2948"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2949"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2950"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2951"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2952"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2953"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2954"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2955"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2956"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2957"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2958"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2959"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2960"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2961"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2962"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2963"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2964"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2965"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2966"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2967"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2968"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2969"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2970"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2971"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2972"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2973"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2974"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2975"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2976"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2977"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2978"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2979"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2980"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2981"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2982"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2983"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2984"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2985"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2986"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2987"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2988"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2989"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2990"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2991"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2992"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2993"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2994"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2995"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2996"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2997"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2998"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+ ["f2999"]=>
+ string(22) "*bug45218_SLOWTEST.txt"
+}
+===DONE===
diff --git a/ext/phar/tests/bug45218_SLOWTESTU.phpt b/ext/phar/tests/bug45218_SLOWTESTU.phpt
new file mode 100644
index 0000000..1639691
--- /dev/null
+++ b/ext/phar/tests/bug45218_SLOWTESTU.phpt
@@ -0,0 +1,6092 @@
+--TEST--
+Phar::buildFromIterator() iterator, too many files for open file handles (Bug #45218)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+if (getenv("SKIP_SLOW_TESTS")) die("skip slow tests excluded by request");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.txt';
+file_put_contents($fname2, 'a');
+class myIterator implements Iterator
+{
+ var $a;
+ var $count = 1;
+
+ function next() {
+ return (++$this->count < 3000) ? 'f' . $this->count : false;
+ }
+ function current() {
+ if (($this->count % 100) === 0) {
+ echo $this->count, "\n";
+ }
+ return $GLOBALS['fname2'];
+ }
+ function key() {
+ return 'f' . $this->count;
+ }
+ function valid() {
+ return $this->count < 3000;
+ }
+ function rewind() {
+ $this->count = 1;
+ return $GLOBALS['fname2'];
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar($fname);
+ $ret = $phar->buildFromIterator(new myIterator);
+ foreach ($ret as $a => $val) {
+ $ret[$a] = str_replace(dirname($fname2) . DIRECTORY_SEPARATOR, '*', $val);
+ }
+ var_dump($ret);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.txt');
+__halt_compiler();
+?>
+--EXPECT--
+100
+200
+300
+400
+500
+600
+700
+800
+900
+1000
+1100
+1200
+1300
+1400
+1500
+1600
+1700
+1800
+1900
+2000
+2100
+2200
+2300
+2400
+2500
+2600
+2700
+2800
+2900
+array(2999) {
+ ["f1"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f3"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f4"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f5"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f6"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f7"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f8"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f9"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f10"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f11"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f12"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f13"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f14"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f15"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f16"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f17"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f18"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f19"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f20"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f21"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f22"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f23"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f24"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f25"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f26"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f27"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f28"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f29"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f30"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f31"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f32"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f33"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f34"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f35"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f36"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f37"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f38"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f39"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f40"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f41"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f42"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f43"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f44"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f45"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f46"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f47"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f48"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f49"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f50"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f51"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f52"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f53"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f54"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f55"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f56"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f57"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f58"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f59"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f60"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f61"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f62"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f63"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f64"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f65"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f66"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f67"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f68"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f69"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f70"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f71"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f72"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f73"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f74"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f75"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f76"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f77"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f78"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f79"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f80"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f81"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f82"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f83"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f84"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f85"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f86"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f87"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f88"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f89"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f90"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f91"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f92"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f93"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f94"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f95"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f96"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f97"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f98"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f99"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f100"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f101"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f102"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f103"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f104"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f105"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f106"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f107"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f108"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f109"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f110"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f111"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f112"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f113"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f114"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f115"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f116"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f117"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f118"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f119"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f120"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f121"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f122"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f123"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f124"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f125"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f126"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f127"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f128"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f129"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f130"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f131"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f132"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f133"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f134"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f135"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f136"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f137"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f138"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f139"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f140"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f141"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f142"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f143"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f144"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f145"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f146"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f147"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f148"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f149"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f150"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f151"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f152"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f153"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f154"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f155"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f156"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f157"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f158"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f159"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f160"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f161"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f162"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f163"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f164"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f165"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f166"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f167"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f168"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f169"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f170"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f171"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f172"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f173"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f174"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f175"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f176"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f177"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f178"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f179"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f180"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f181"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f182"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f183"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f184"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f185"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f186"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f187"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f188"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f189"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f190"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f191"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f192"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f193"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f194"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f195"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f196"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f197"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f198"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f199"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f200"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f201"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f202"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f203"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f204"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f205"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f206"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f207"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f208"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f209"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f210"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f211"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f212"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f213"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f214"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f215"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f216"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f217"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f218"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f219"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f220"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f221"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f222"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f223"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f224"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f225"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f226"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f227"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f228"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f229"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f230"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f231"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f232"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f233"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f234"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f235"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f236"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f237"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f238"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f239"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f240"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f241"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f242"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f243"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f244"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f245"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f246"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f247"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f248"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f249"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f250"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f251"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f252"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f253"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f254"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f255"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f256"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f257"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f258"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f259"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f260"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f261"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f262"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f263"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f264"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f265"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f266"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f267"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f268"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f269"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f270"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f271"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f272"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f273"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f274"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f275"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f276"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f277"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f278"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f279"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f280"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f281"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f282"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f283"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f284"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f285"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f286"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f287"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f288"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f289"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f290"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f291"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f292"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f293"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f294"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f295"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f296"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f297"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f298"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f299"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f300"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f301"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f302"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f303"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f304"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f305"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f306"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f307"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f308"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f309"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f310"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f311"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f312"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f313"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f314"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f315"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f316"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f317"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f318"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f319"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f320"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f321"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f322"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f323"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f324"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f325"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f326"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f327"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f328"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f329"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f330"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f331"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f332"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f333"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f334"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f335"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f336"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f337"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f338"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f339"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f340"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f341"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f342"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f343"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f344"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f345"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f346"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f347"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f348"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f349"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f350"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f351"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f352"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f353"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f354"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f355"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f356"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f357"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f358"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f359"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f360"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f361"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f362"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f363"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f364"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f365"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f366"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f367"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f368"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f369"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f370"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f371"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f372"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f373"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f374"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f375"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f376"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f377"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f378"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f379"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f380"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f381"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f382"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f383"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f384"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f385"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f386"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f387"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f388"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f389"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f390"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f391"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f392"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f393"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f394"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f395"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f396"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f397"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f398"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f399"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f400"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f401"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f402"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f403"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f404"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f405"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f406"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f407"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f408"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f409"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f410"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f411"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f412"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f413"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f414"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f415"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f416"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f417"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f418"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f419"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f420"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f421"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f422"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f423"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f424"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f425"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f426"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f427"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f428"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f429"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f430"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f431"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f432"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f433"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f434"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f435"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f436"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f437"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f438"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f439"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f440"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f441"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f442"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f443"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f444"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f445"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f446"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f447"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f448"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f449"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f450"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f451"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f452"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f453"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f454"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f455"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f456"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f457"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f458"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f459"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f460"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f461"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f462"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f463"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f464"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f465"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f466"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f467"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f468"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f469"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f470"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f471"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f472"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f473"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f474"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f475"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f476"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f477"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f478"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f479"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f480"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f481"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f482"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f483"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f484"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f485"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f486"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f487"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f488"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f489"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f490"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f491"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f492"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f493"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f494"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f495"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f496"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f497"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f498"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f499"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f500"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f501"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f502"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f503"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f504"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f505"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f506"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f507"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f508"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f509"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f510"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f511"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f512"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f513"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f514"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f515"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f516"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f517"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f518"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f519"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f520"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f521"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f522"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f523"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f524"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f525"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f526"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f527"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f528"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f529"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f530"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f531"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f532"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f533"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f534"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f535"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f536"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f537"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f538"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f539"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f540"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f541"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f542"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f543"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f544"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f545"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f546"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f547"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f548"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f549"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f550"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f551"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f552"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f553"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f554"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f555"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f556"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f557"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f558"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f559"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f560"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f561"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f562"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f563"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f564"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f565"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f566"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f567"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f568"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f569"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f570"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f571"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f572"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f573"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f574"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f575"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f576"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f577"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f578"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f579"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f580"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f581"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f582"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f583"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f584"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f585"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f586"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f587"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f588"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f589"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f590"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f591"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f592"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f593"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f594"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f595"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f596"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f597"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f598"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f599"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f600"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f601"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f602"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f603"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f604"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f605"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f606"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f607"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f608"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f609"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f610"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f611"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f612"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f613"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f614"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f615"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f616"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f617"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f618"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f619"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f620"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f621"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f622"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f623"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f624"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f625"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f626"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f627"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f628"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f629"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f630"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f631"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f632"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f633"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f634"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f635"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f636"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f637"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f638"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f639"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f640"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f641"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f642"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f643"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f644"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f645"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f646"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f647"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f648"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f649"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f650"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f651"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f652"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f653"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f654"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f655"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f656"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f657"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f658"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f659"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f660"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f661"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f662"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f663"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f664"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f665"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f666"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f667"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f668"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f669"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f670"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f671"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f672"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f673"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f674"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f675"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f676"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f677"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f678"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f679"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f680"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f681"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f682"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f683"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f684"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f685"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f686"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f687"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f688"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f689"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f690"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f691"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f692"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f693"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f694"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f695"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f696"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f697"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f698"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f699"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f700"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f701"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f702"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f703"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f704"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f705"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f706"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f707"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f708"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f709"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f710"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f711"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f712"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f713"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f714"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f715"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f716"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f717"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f718"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f719"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f720"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f721"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f722"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f723"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f724"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f725"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f726"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f727"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f728"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f729"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f730"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f731"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f732"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f733"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f734"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f735"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f736"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f737"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f738"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f739"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f740"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f741"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f742"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f743"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f744"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f745"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f746"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f747"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f748"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f749"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f750"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f751"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f752"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f753"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f754"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f755"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f756"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f757"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f758"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f759"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f760"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f761"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f762"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f763"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f764"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f765"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f766"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f767"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f768"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f769"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f770"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f771"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f772"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f773"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f774"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f775"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f776"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f777"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f778"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f779"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f780"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f781"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f782"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f783"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f784"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f785"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f786"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f787"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f788"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f789"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f790"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f791"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f792"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f793"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f794"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f795"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f796"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f797"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f798"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f799"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f800"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f801"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f802"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f803"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f804"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f805"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f806"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f807"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f808"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f809"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f810"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f811"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f812"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f813"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f814"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f815"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f816"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f817"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f818"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f819"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f820"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f821"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f822"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f823"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f824"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f825"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f826"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f827"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f828"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f829"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f830"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f831"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f832"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f833"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f834"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f835"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f836"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f837"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f838"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f839"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f840"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f841"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f842"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f843"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f844"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f845"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f846"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f847"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f848"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f849"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f850"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f851"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f852"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f853"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f854"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f855"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f856"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f857"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f858"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f859"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f860"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f861"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f862"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f863"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f864"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f865"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f866"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f867"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f868"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f869"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f870"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f871"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f872"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f873"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f874"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f875"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f876"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f877"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f878"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f879"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f880"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f881"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f882"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f883"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f884"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f885"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f886"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f887"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f888"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f889"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f890"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f891"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f892"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f893"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f894"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f895"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f896"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f897"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f898"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f899"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f900"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f901"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f902"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f903"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f904"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f905"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f906"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f907"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f908"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f909"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f910"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f911"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f912"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f913"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f914"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f915"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f916"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f917"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f918"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f919"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f920"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f921"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f922"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f923"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f924"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f925"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f926"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f927"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f928"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f929"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f930"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f931"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f932"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f933"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f934"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f935"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f936"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f937"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f938"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f939"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f940"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f941"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f942"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f943"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f944"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f945"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f946"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f947"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f948"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f949"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f950"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f951"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f952"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f953"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f954"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f955"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f956"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f957"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f958"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f959"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f960"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f961"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f962"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f963"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f964"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f965"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f966"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f967"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f968"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f969"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f970"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f971"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f972"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f973"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f974"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f975"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f976"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f977"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f978"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f979"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f980"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f981"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f982"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f983"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f984"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f985"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f986"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f987"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f988"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f989"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f990"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f991"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f992"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f993"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f994"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f995"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f996"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f997"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f998"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f999"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1000"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1001"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1002"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1003"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1004"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1005"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1006"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1007"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1008"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1009"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1010"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1011"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1012"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1013"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1014"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1015"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1016"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1017"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1018"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1019"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1020"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1021"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1022"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1023"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1024"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1025"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1026"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1027"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1028"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1029"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1030"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1031"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1032"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1033"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1034"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1035"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1036"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1037"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1038"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1039"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1040"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1041"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1042"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1043"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1044"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1045"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1046"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1047"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1048"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1049"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1050"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1051"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1052"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1053"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1054"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1055"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1056"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1057"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1058"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1059"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1060"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1061"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1062"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1063"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1064"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1065"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1066"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1067"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1068"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1069"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1070"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1071"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1072"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1073"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1074"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1075"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1076"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1077"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1078"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1079"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1080"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1081"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1082"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1083"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1084"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1085"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1086"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1087"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1088"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1089"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1090"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1091"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1092"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1093"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1094"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1095"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1096"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1097"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1098"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1099"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1100"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1101"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1102"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1103"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1104"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1105"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1106"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1107"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1108"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1109"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1110"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1111"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1112"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1113"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1114"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1115"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1116"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1117"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1118"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1119"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1120"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1121"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1122"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1123"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1124"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1125"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1126"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1127"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1128"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1129"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1130"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1131"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1132"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1133"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1134"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1135"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1136"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1137"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1138"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1139"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1140"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1141"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1142"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1143"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1144"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1145"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1146"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1147"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1148"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1149"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1150"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1151"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1152"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1153"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1154"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1155"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1156"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1157"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1158"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1159"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1160"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1161"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1162"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1163"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1164"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1165"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1166"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1167"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1168"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1169"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1170"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1171"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1172"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1173"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1174"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1175"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1176"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1177"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1178"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1179"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1180"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1181"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1182"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1183"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1184"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1185"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1186"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1187"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1188"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1189"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1190"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1191"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1192"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1193"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1194"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1195"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1196"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1197"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1198"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1199"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1200"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1201"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1202"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1203"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1204"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1205"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1206"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1207"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1208"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1209"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1210"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1211"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1212"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1213"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1214"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1215"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1216"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1217"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1218"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1219"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1220"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1221"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1222"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1223"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1224"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1225"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1226"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1227"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1228"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1229"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1230"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1231"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1232"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1233"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1234"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1235"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1236"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1237"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1238"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1239"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1240"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1241"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1242"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1243"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1244"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1245"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1246"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1247"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1248"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1249"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1250"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1251"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1252"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1253"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1254"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1255"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1256"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1257"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1258"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1259"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1260"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1261"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1262"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1263"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1264"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1265"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1266"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1267"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1268"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1269"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1270"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1271"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1272"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1273"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1274"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1275"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1276"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1277"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1278"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1279"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1280"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1281"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1282"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1283"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1284"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1285"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1286"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1287"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1288"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1289"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1290"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1291"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1292"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1293"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1294"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1295"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1296"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1297"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1298"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1299"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1300"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1301"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1302"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1303"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1304"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1305"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1306"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1307"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1308"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1309"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1310"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1311"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1312"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1313"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1314"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1315"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1316"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1317"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1318"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1319"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1320"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1321"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1322"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1323"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1324"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1325"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1326"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1327"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1328"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1329"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1330"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1331"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1332"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1333"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1334"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1335"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1336"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1337"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1338"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1339"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1340"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1341"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1342"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1343"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1344"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1345"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1346"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1347"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1348"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1349"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1350"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1351"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1352"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1353"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1354"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1355"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1356"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1357"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1358"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1359"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1360"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1361"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1362"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1363"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1364"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1365"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1366"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1367"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1368"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1369"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1370"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1371"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1372"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1373"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1374"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1375"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1376"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1377"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1378"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1379"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1380"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1381"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1382"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1383"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1384"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1385"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1386"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1387"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1388"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1389"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1390"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1391"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1392"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1393"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1394"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1395"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1396"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1397"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1398"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1399"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1400"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1401"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1402"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1403"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1404"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1405"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1406"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1407"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1408"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1409"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1410"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1411"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1412"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1413"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1414"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1415"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1416"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1417"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1418"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1419"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1420"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1421"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1422"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1423"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1424"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1425"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1426"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1427"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1428"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1429"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1430"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1431"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1432"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1433"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1434"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1435"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1436"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1437"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1438"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1439"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1440"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1441"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1442"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1443"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1444"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1445"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1446"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1447"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1448"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1449"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1450"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1451"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1452"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1453"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1454"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1455"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1456"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1457"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1458"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1459"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1460"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1461"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1462"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1463"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1464"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1465"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1466"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1467"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1468"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1469"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1470"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1471"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1472"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1473"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1474"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1475"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1476"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1477"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1478"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1479"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1480"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1481"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1482"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1483"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1484"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1485"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1486"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1487"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1488"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1489"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1490"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1491"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1492"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1493"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1494"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1495"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1496"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1497"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1498"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1499"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1500"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1501"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1502"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1503"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1504"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1505"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1506"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1507"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1508"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1509"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1510"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1511"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1512"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1513"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1514"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1515"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1516"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1517"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1518"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1519"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1520"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1521"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1522"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1523"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1524"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1525"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1526"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1527"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1528"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1529"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1530"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1531"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1532"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1533"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1534"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1535"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1536"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1537"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1538"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1539"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1540"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1541"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1542"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1543"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1544"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1545"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1546"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1547"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1548"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1549"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1550"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1551"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1552"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1553"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1554"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1555"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1556"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1557"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1558"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1559"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1560"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1561"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1562"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1563"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1564"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1565"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1566"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1567"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1568"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1569"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1570"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1571"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1572"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1573"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1574"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1575"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1576"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1577"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1578"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1579"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1580"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1581"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1582"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1583"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1584"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1585"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1586"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1587"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1588"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1589"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1590"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1591"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1592"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1593"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1594"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1595"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1596"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1597"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1598"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1599"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1600"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1601"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1602"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1603"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1604"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1605"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1606"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1607"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1608"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1609"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1610"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1611"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1612"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1613"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1614"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1615"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1616"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1617"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1618"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1619"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1620"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1621"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1622"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1623"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1624"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1625"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1626"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1627"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1628"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1629"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1630"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1631"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1632"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1633"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1634"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1635"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1636"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1637"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1638"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1639"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1640"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1641"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1642"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1643"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1644"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1645"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1646"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1647"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1648"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1649"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1650"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1651"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1652"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1653"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1654"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1655"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1656"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1657"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1658"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1659"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1660"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1661"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1662"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1663"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1664"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1665"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1666"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1667"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1668"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1669"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1670"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1671"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1672"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1673"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1674"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1675"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1676"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1677"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1678"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1679"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1680"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1681"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1682"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1683"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1684"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1685"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1686"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1687"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1688"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1689"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1690"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1691"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1692"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1693"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1694"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1695"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1696"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1697"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1698"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1699"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1700"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1701"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1702"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1703"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1704"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1705"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1706"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1707"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1708"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1709"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1710"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1711"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1712"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1713"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1714"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1715"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1716"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1717"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1718"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1719"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1720"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1721"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1722"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1723"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1724"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1725"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1726"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1727"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1728"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1729"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1730"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1731"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1732"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1733"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1734"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1735"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1736"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1737"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1738"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1739"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1740"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1741"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1742"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1743"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1744"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1745"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1746"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1747"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1748"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1749"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1750"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1751"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1752"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1753"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1754"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1755"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1756"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1757"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1758"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1759"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1760"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1761"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1762"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1763"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1764"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1765"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1766"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1767"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1768"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1769"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1770"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1771"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1772"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1773"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1774"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1775"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1776"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1777"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1778"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1779"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1780"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1781"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1782"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1783"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1784"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1785"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1786"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1787"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1788"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1789"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1790"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1791"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1792"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1793"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1794"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1795"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1796"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1797"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1798"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1799"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1800"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1801"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1802"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1803"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1804"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1805"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1806"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1807"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1808"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1809"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1810"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1811"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1812"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1813"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1814"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1815"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1816"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1817"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1818"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1819"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1820"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1821"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1822"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1823"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1824"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1825"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1826"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1827"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1828"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1829"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1830"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1831"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1832"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1833"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1834"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1835"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1836"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1837"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1838"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1839"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1840"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1841"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1842"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1843"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1844"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1845"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1846"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1847"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1848"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1849"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1850"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1851"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1852"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1853"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1854"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1855"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1856"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1857"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1858"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1859"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1860"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1861"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1862"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1863"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1864"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1865"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1866"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1867"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1868"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1869"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1870"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1871"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1872"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1873"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1874"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1875"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1876"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1877"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1878"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1879"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1880"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1881"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1882"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1883"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1884"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1885"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1886"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1887"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1888"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1889"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1890"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1891"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1892"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1893"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1894"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1895"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1896"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1897"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1898"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1899"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1900"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1901"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1902"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1903"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1904"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1905"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1906"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1907"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1908"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1909"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1910"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1911"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1912"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1913"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1914"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1915"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1916"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1917"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1918"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1919"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1920"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1921"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1922"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1923"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1924"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1925"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1926"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1927"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1928"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1929"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1930"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1931"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1932"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1933"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1934"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1935"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1936"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1937"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1938"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1939"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1940"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1941"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1942"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1943"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1944"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1945"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1946"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1947"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1948"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1949"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1950"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1951"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1952"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1953"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1954"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1955"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1956"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1957"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1958"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1959"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1960"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1961"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1962"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1963"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1964"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1965"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1966"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1967"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1968"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1969"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1970"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1971"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1972"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1973"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1974"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1975"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1976"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1977"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1978"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1979"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1980"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1981"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1982"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1983"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1984"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1985"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1986"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1987"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1988"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1989"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1990"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1991"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1992"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1993"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1994"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1995"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1996"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1997"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1998"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f1999"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2000"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2001"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2002"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2003"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2004"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2005"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2006"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2007"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2008"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2009"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2010"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2011"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2012"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2013"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2014"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2015"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2016"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2017"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2018"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2019"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2020"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2021"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2022"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2023"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2024"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2025"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2026"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2027"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2028"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2029"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2030"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2031"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2032"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2033"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2034"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2035"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2036"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2037"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2038"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2039"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2040"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2041"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2042"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2043"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2044"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2045"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2046"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2047"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2048"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2049"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2050"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2051"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2052"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2053"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2054"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2055"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2056"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2057"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2058"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2059"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2060"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2061"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2062"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2063"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2064"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2065"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2066"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2067"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2068"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2069"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2070"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2071"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2072"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2073"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2074"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2075"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2076"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2077"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2078"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2079"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2080"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2081"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2082"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2083"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2084"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2085"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2086"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2087"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2088"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2089"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2090"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2091"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2092"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2093"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2094"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2095"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2096"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2097"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2098"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2099"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2100"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2101"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2102"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2103"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2104"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2105"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2106"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2107"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2108"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2109"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2110"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2111"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2112"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2113"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2114"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2115"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2116"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2117"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2118"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2119"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2120"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2121"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2122"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2123"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2124"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2125"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2126"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2127"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2128"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2129"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2130"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2131"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2132"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2133"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2134"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2135"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2136"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2137"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2138"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2139"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2140"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2141"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2142"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2143"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2144"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2145"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2146"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2147"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2148"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2149"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2150"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2151"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2152"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2153"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2154"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2155"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2156"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2157"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2158"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2159"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2160"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2161"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2162"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2163"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2164"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2165"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2166"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2167"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2168"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2169"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2170"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2171"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2172"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2173"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2174"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2175"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2176"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2177"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2178"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2179"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2180"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2181"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2182"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2183"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2184"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2185"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2186"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2187"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2188"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2189"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2190"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2191"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2192"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2193"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2194"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2195"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2196"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2197"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2198"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2199"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2200"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2201"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2202"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2203"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2204"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2205"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2206"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2207"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2208"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2209"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2210"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2211"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2212"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2213"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2214"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2215"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2216"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2217"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2218"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2219"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2220"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2221"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2222"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2223"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2224"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2225"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2226"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2227"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2228"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2229"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2230"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2231"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2232"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2233"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2234"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2235"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2236"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2237"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2238"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2239"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2240"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2241"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2242"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2243"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2244"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2245"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2246"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2247"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2248"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2249"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2250"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2251"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2252"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2253"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2254"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2255"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2256"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2257"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2258"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2259"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2260"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2261"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2262"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2263"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2264"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2265"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2266"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2267"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2268"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2269"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2270"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2271"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2272"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2273"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2274"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2275"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2276"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2277"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2278"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2279"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2280"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2281"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2282"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2283"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2284"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2285"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2286"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2287"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2288"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2289"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2290"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2291"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2292"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2293"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2294"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2295"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2296"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2297"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2298"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2299"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2300"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2301"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2302"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2303"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2304"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2305"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2306"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2307"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2308"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2309"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2310"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2311"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2312"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2313"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2314"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2315"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2316"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2317"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2318"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2319"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2320"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2321"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2322"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2323"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2324"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2325"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2326"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2327"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2328"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2329"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2330"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2331"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2332"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2333"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2334"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2335"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2336"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2337"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2338"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2339"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2340"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2341"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2342"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2343"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2344"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2345"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2346"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2347"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2348"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2349"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2350"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2351"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2352"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2353"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2354"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2355"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2356"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2357"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2358"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2359"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2360"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2361"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2362"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2363"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2364"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2365"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2366"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2367"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2368"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2369"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2370"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2371"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2372"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2373"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2374"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2375"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2376"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2377"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2378"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2379"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2380"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2381"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2382"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2383"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2384"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2385"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2386"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2387"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2388"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2389"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2390"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2391"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2392"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2393"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2394"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2395"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2396"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2397"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2398"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2399"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2400"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2401"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2402"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2403"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2404"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2405"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2406"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2407"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2408"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2409"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2410"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2411"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2412"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2413"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2414"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2415"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2416"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2417"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2418"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2419"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2420"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2421"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2422"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2423"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2424"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2425"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2426"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2427"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2428"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2429"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2430"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2431"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2432"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2433"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2434"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2435"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2436"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2437"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2438"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2439"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2440"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2441"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2442"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2443"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2444"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2445"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2446"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2447"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2448"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2449"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2450"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2451"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2452"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2453"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2454"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2455"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2456"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2457"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2458"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2459"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2460"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2461"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2462"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2463"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2464"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2465"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2466"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2467"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2468"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2469"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2470"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2471"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2472"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2473"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2474"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2475"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2476"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2477"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2478"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2479"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2480"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2481"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2482"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2483"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2484"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2485"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2486"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2487"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2488"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2489"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2490"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2491"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2492"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2493"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2494"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2495"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2496"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2497"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2498"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2499"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2500"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2501"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2502"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2503"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2504"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2505"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2506"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2507"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2508"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2509"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2510"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2511"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2512"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2513"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2514"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2515"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2516"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2517"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2518"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2519"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2520"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2521"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2522"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2523"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2524"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2525"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2526"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2527"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2528"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2529"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2530"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2531"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2532"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2533"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2534"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2535"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2536"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2537"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2538"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2539"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2540"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2541"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2542"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2543"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2544"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2545"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2546"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2547"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2548"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2549"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2550"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2551"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2552"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2553"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2554"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2555"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2556"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2557"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2558"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2559"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2560"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2561"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2562"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2563"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2564"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2565"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2566"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2567"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2568"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2569"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2570"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2571"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2572"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2573"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2574"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2575"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2576"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2577"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2578"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2579"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2580"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2581"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2582"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2583"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2584"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2585"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2586"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2587"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2588"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2589"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2590"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2591"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2592"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2593"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2594"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2595"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2596"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2597"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2598"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2599"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2600"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2601"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2602"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2603"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2604"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2605"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2606"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2607"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2608"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2609"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2610"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2611"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2612"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2613"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2614"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2615"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2616"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2617"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2618"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2619"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2620"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2621"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2622"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2623"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2624"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2625"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2626"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2627"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2628"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2629"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2630"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2631"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2632"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2633"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2634"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2635"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2636"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2637"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2638"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2639"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2640"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2641"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2642"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2643"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2644"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2645"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2646"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2647"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2648"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2649"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2650"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2651"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2652"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2653"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2654"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2655"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2656"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2657"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2658"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2659"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2660"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2661"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2662"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2663"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2664"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2665"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2666"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2667"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2668"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2669"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2670"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2671"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2672"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2673"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2674"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2675"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2676"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2677"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2678"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2679"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2680"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2681"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2682"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2683"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2684"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2685"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2686"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2687"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2688"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2689"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2690"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2691"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2692"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2693"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2694"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2695"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2696"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2697"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2698"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2699"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2700"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2701"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2702"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2703"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2704"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2705"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2706"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2707"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2708"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2709"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2710"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2711"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2712"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2713"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2714"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2715"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2716"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2717"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2718"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2719"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2720"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2721"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2722"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2723"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2724"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2725"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2726"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2727"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2728"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2729"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2730"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2731"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2732"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2733"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2734"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2735"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2736"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2737"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2738"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2739"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2740"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2741"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2742"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2743"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2744"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2745"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2746"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2747"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2748"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2749"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2750"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2751"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2752"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2753"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2754"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2755"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2756"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2757"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2758"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2759"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2760"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2761"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2762"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2763"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2764"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2765"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2766"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2767"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2768"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2769"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2770"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2771"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2772"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2773"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2774"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2775"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2776"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2777"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2778"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2779"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2780"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2781"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2782"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2783"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2784"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2785"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2786"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2787"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2788"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2789"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2790"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2791"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2792"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2793"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2794"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2795"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2796"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2797"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2798"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2799"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2800"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2801"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2802"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2803"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2804"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2805"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2806"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2807"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2808"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2809"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2810"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2811"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2812"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2813"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2814"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2815"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2816"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2817"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2818"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2819"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2820"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2821"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2822"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2823"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2824"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2825"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2826"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2827"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2828"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2829"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2830"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2831"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2832"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2833"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2834"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2835"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2836"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2837"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2838"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2839"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2840"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2841"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2842"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2843"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2844"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2845"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2846"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2847"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2848"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2849"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2850"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2851"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2852"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2853"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2854"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2855"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2856"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2857"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2858"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2859"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2860"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2861"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2862"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2863"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2864"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2865"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2866"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2867"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2868"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2869"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2870"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2871"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2872"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2873"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2874"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2875"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2876"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2877"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2878"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2879"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2880"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2881"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2882"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2883"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2884"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2885"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2886"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2887"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2888"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2889"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2890"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2891"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2892"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2893"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2894"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2895"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2896"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2897"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2898"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2899"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2900"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2901"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2902"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2903"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2904"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2905"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2906"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2907"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2908"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2909"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2910"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2911"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2912"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2913"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2914"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2915"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2916"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2917"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2918"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2919"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2920"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2921"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2922"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2923"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2924"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2925"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2926"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2927"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2928"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2929"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2930"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2931"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2932"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2933"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2934"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2935"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2936"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2937"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2938"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2939"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2940"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2941"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2942"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2943"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2944"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2945"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2946"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2947"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2948"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2949"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2950"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2951"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2952"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2953"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2954"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2955"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2956"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2957"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2958"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2959"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2960"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2961"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2962"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2963"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2964"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2965"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2966"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2967"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2968"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2969"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2970"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2971"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2972"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2973"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2974"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2975"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2976"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2977"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2978"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2979"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2980"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2981"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2982"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2983"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2984"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2985"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2986"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2987"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2988"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2989"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2990"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2991"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2992"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2993"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2994"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2995"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2996"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2997"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2998"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+ ["f2999"]=>
+ unicode(23) "*bug45218_SLOWTESTU.txt"
+}
+===DONE===
diff --git a/ext/phar/tests/bug46032.phpt b/ext/phar/tests/bug46032.phpt
new file mode 100644
index 0000000..7700e9b
--- /dev/null
+++ b/ext/phar/tests/bug46032.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Phar: bug #46032: PharData::__construct wrong memory read
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (getenv('SKIP_SLOW_TESTS')) die('skip'); ?>
+--FILE--
+<?php
+
+$a = dirname(__FILE__) .'/mytest';
+
+try {
+ new phar($a);
+} catch (exception $e) { }
+
+var_dump($a);
+
+try {
+ new phar($a);
+} catch (exception $e) { }
+
+var_dump($a);
+
+new phardata('0000000000000000000');
+?>
+===DONE===
+--EXPECTF--
+%string|unicode%(%d) "%smytest"
+%string|unicode%(%d) "%smytest"
+
+Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Cannot create phar '0000000000000000000', file extension (or combination) not recognised or the directory does not exist' in %sbug46032.php:%d
+Stack trace:
+#0 %sbug46032.php(%d): PharData->__construct('000000000000000...')
+#1 {main}
+ thrown in %sbug46032.php on line %d
diff --git a/ext/phar/tests/bug46060.phpt b/ext/phar/tests/bug46060.phpt
new file mode 100644
index 0000000..1ca346e
--- /dev/null
+++ b/ext/phar/tests/bug46060.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Phar: Bug #46060: addEmptyDir() breaks
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (getenv('SKIP_SLOW_TESTS')) die('skip'); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.tar';
+
+$phar = new PharData($fname);
+$phar->addEmptyDir('blah/');
+$phar->addFromString('test/', '');
+
+copy($fname, $fname2);
+$phar = new PharData($fname2);
+
+var_dump($phar['blah']->isDir(), $phar['test']->isDir());
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.tar');
+__HALT_COMPILER();
+?>
+--EXPECT--
+bool(true)
+bool(false)
+===DONE===
diff --git a/ext/phar/tests/bug46178.phpt b/ext/phar/tests/bug46178.phpt
new file mode 100644
index 0000000..9dab621
--- /dev/null
+++ b/ext/phar/tests/bug46178.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Phar: PHP bug #46178: "memory leak in ext/phar"
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+
+$phar = new Phar($fname);
+$phar['long/path/name.txt'] = 'hi';
+$phar->addEmptyDir('long/path');
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');?>
+--EXPECT--
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/bug47085.phpt b/ext/phar/tests/bug47085.phpt
new file mode 100644
index 0000000..9aaaed0
--- /dev/null
+++ b/ext/phar/tests/bug47085.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Phar: PHP bug #47085: "rename() returns true even if the file in PHAR does not exist"
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+
+$phar = new Phar($fname, 0, 'a.phar');
+$phar['x'] = 'hi';
+unset($phar);
+rename("phar://a.phar/x", "phar://a.phar/y");
+var_dump(rename("phar://a.phar/x", "phar://a.phar/y"));
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');?>
+--EXPECTF--
+Warning: rename(): phar error: cannot rename "phar://a.phar/x" to "phar://a.phar/y" from extracted phar archive, source does not exist in %sbug47085.php on line %d
+bool(false)
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/bug48377.2.phpt b/ext/phar/tests/bug48377.2.phpt
new file mode 100644
index 0000000..be2a0e1
--- /dev/null
+++ b/ext/phar/tests/bug48377.2.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Phar: PHP bug #48377 "error message unclear on converting phar with existing file" test #2
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.zip';
+
+$phar = new PharData($fname);
+$phar['x'] = 'hi';
+try {
+ $phar->convertToData(Phar::ZIP, Phar::NONE, '.2.phar.zip');
+} catch (BadMethodCallException $e) {
+ echo $e->getMessage(),"\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip');?>
+--EXPECTF--
+data phar "%sbug48377.2.phar.zip" has invalid extension 2.phar.zip
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/bug48377.phpt b/ext/phar/tests/bug48377.phpt
new file mode 100644
index 0000000..6282a15
--- /dev/null
+++ b/ext/phar/tests/bug48377.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Phar: PHP bug #48377 "error message unclear on converting phar with existing file"
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.zip';
+
+touch($fname2);
+
+$phar = new Phar($fname, 0, 'a.phar');
+$phar['x'] = 'hi';
+try {
+ $phar->convertToData(Phar::ZIP, Phar::NONE, 'zip');
+} catch (BadMethodCallException $e) {
+ echo $e->getMessage(),"\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip');?>
+--EXPECTF--
+phar "%sbug48377.zip" exists and must be unlinked prior to conversion
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/bug52013.phpt b/ext/phar/tests/bug52013.phpt
new file mode 100644
index 0000000..5ee37e7
--- /dev/null
+++ b/ext/phar/tests/bug52013.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test for bug 52013 about Phar::decompressFiles().
+--DESCRIPTION--
+Test for a bug where Phar::decompressFiles() mistakenly throws BadMethodCallException.
+http://bugs.php.net/bug.php?id=52013
+--CREDITS--
+Frederic Hardy frederic.hardy@mageekbox.net
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("zlib")) die("skip test needs zlib extension enabled to compress archives with gzip");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+open_basedir=
+--FILE--
+<?php
+mkdir(dirname(__FILE__) . '/testdir');
+file_put_contents(dirname(__FILE__) . '/testdir/1.php', str_repeat(' ', 1455));
+
+$phar = new Phar(dirname(__FILE__) . '/compressed.phar');
+$phar->buildFromDirectory(dirname(__FILE__) . '/testdir', '/\.php$/');
+$phar->setSignatureAlgorithm(Phar::SHA1);
+$phar->compressFiles(Phar::GZ);
+$phar->decompressFiles();
+
+echo 'ok';
+?>
+--CLEAN--
+<?php
+if (is_file(dirname(__FILE__) . '/testdir/1.php'))
+ unlink(dirname(__FILE__) . '/testdir/1.php');
+if (is_dir(dirname(__FILE__) . '/testdir'))
+ rmdir(dirname(__FILE__) . '/testdir');
+if (is_file(dirname(__FILE__) . '/compressed.phar'))
+ unlink(dirname(__FILE__) . '/compressed.phar');
+?>
+--EXPECT--
+ok
diff --git a/ext/phar/tests/bug53872.phpt b/ext/phar/tests/bug53872.phpt
new file mode 100644
index 0000000..fd332fd
--- /dev/null
+++ b/ext/phar/tests/bug53872.phpt
@@ -0,0 +1,28 @@
+--TEST--
+bug#53872 (internal corruption of phar)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("zlib")) die("skip Test needs ext/zlib");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$p=new Phar('bug53872-phar.phar');
+$p->buildFromDirectory(__DIR__ . "/bug53872/");
+$p->setStub('<?php __HALT_COMPILER();?\>');
+$p->compressFiles(Phar::GZ);
+
+print(file_get_contents('phar://bug53872-phar.phar/first.txt'));
+print(file_get_contents('phar://bug53872-phar.phar/second.txt'));
+print(file_get_contents('phar://bug53872-phar.phar/third.txt'));
+?>
+--CLEAN--
+<?php
+unlink("bug53872-phar.phar");
+?>
+--EXPECT--
+content of first.txt
+content of third.txt
+
diff --git a/ext/phar/tests/bug53872/first.txt b/ext/phar/tests/bug53872/first.txt
new file mode 100644
index 0000000..90a4d1f
--- /dev/null
+++ b/ext/phar/tests/bug53872/first.txt
@@ -0,0 +1 @@
+content of first.txt
diff --git a/ext/phar/tests/bug53872/second.txt b/ext/phar/tests/bug53872/second.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ext/phar/tests/bug53872/second.txt
diff --git a/ext/phar/tests/bug53872/third.txt b/ext/phar/tests/bug53872/third.txt
new file mode 100644
index 0000000..4f283cd
--- /dev/null
+++ b/ext/phar/tests/bug53872/third.txt
@@ -0,0 +1 @@
+content of third.txt
diff --git a/ext/phar/tests/bug54395.phpt b/ext/phar/tests/bug54395.phpt
new file mode 100644
index 0000000..091ed32
--- /dev/null
+++ b/ext/phar/tests/bug54395.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #54395 (Phar::mount() crashes when calling with wrong parameters)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+
+try {
+ phar::mount(1,1);
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+}
+
+?>
+--EXPECTF--
+string(25) "Mounting of 1 to 1 failed"
diff --git a/ext/phar/tests/bug60164.phpt b/ext/phar/tests/bug60164.phpt
new file mode 100644
index 0000000..8fd5de5
--- /dev/null
+++ b/ext/phar/tests/bug60164.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar: verify stub of specific length does not break __HALT_COMPILER(); scanning in php
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$phar = __DIR__ . '/files/stuboflength1041.phar';
+foreach (new RecursiveIteratorIterator(new Phar($phar, null, 'stuboflength1041.phar')) as $item) {
+ var_dump($item->getFileName());
+}
+?>
+===DONE===
+--EXPECT--
+string(5) "a.php"
+string(5) "b.php"
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/bug60261.phpt b/ext/phar/tests/bug60261.phpt
new file mode 100644
index 0000000..1b6cd7a
--- /dev/null
+++ b/ext/phar/tests/bug60261.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #60261 (phar dos null pointer)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+
+$nx = new Phar();
+try {
+ $nx->getLinkTarget();
+} catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+?>
+--EXPECTF--
+
+Warning: Phar::__construct() expects at least 1 parameter, 0 given in %s on line %d
+SplFileInfo::getLinkTarget(): Empty filename
diff --git a/ext/phar/tests/cache_list/copyonwrite1.phar.phpt b/ext/phar/tests/cache_list/copyonwrite1.phar.phpt
new file mode 100644
index 0000000..90b0a8f
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite1.phar.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar: copy-on-write test 1 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite1.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write.phar
+--EXPECT--
+hi
+changed
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite10.phar.phpt b/ext/phar/tests/cache_list/copyonwrite10.phar.phpt
new file mode 100644
index 0000000..3d5b7fe
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite10.phar.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Phar: copy-on-write test 10 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite10.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write10.phar
+--EXPECTF--
+string(214) "<?php
+$p = new Phar(__FILE__);
+var_dump($p->getStub());
+$p2 = new Phar(__FILE__);
+$a = fopen("phar://" . __FILE__ . "/test.txt", "r");
+$p->setStub($a);
+echo $p2->getStub(),"\n";
+echo "ok\n";
+__HALT_COMPILER(); ?>
+"
+<?php __HALT_COMPILER(); ?>
+
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite11.phar.phpt b/ext/phar/tests/cache_list/copyonwrite11.phar.phpt
new file mode 100644
index 0000000..6538816
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite11.phar.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Phar: copy-on-write test 11 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite11.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write11.phar
+--EXPECTF--
+string(174) "<?php
+$p = new Phar(__FILE__);
+var_dump($p->getStub());
+$p2 = new Phar(__FILE__);
+$p->setDefaultStub();
+echo strlen($p2->getStub()),"\n";
+echo "ok\n";
+__HALT_COMPILER(); ?>
+"
+6685
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite12.phar.phpt b/ext/phar/tests/cache_list/copyonwrite12.phar.phpt
new file mode 100644
index 0000000..40b5441
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite12.phar.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Phar: copy-on-write test 12 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite12.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write12.phar
+--EXPECTF--
+array(2) {
+ ["hash"]=>
+ string(40) "0163F471460EA74F7636268D28289BF5A1E8BD72"
+ ["hash_type"]=>
+ string(5) "SHA-1"
+}
+array(2) {
+ ["hash"]=>
+ string(32) "%s"
+ ["hash_type"]=>
+ string(3) "MD5"
+}
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite13.phar.phpt b/ext/phar/tests/cache_list/copyonwrite13.phar.phpt
new file mode 100644
index 0000000..fc47174
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite13.phar.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar: copy-on-write test 13 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite13.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
+--FILE_EXTERNAL--
+files/write13.phar
+--EXPECTF--
+bool(false)
+bool(true)
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite14.phar.phpt b/ext/phar/tests/cache_list/copyonwrite14.phar.phpt
new file mode 100644
index 0000000..11201ac
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite14.phar.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar: copy-on-write test 14 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite14.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
+--FILE_EXTERNAL--
+files/write14.phar
+--EXPECTF--
+bool(true)
+bool(false)
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite15.phar.phpt b/ext/phar/tests/cache_list/copyonwrite15.phar.phpt
new file mode 100644
index 0000000..6e46289
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite15.phar.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar: copy-on-write test 15 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite15.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write15.phar
+--EXPECTF--
+bool(false)
+bool(true)
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite16.phar.phpt b/ext/phar/tests/cache_list/copyonwrite16.phar.phpt
new file mode 100644
index 0000000..f17784c
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite16.phar.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar: copy-on-write test 16 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite16.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write16.phar
+--EXPECTF--
+bool(true)
+bool(false)
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite17.phar.phpt b/ext/phar/tests/cache_list/copyonwrite17.phar.phpt
new file mode 100644
index 0000000..158c049
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite17.phar.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar: copy-on-write test 17 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite17.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write17.phar
+--EXPECTF--
+NULL
+%string|unicode%(2) "hi"
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite18.phar.phpt b/ext/phar/tests/cache_list/copyonwrite18.phar.phpt
new file mode 100644
index 0000000..3e65f5a
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite18.phar.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar: copy-on-write test 18 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite18.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write18.phar
+--EXPECTF--
+100666
+100444
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite19.phar.phpt b/ext/phar/tests/cache_list/copyonwrite19.phar.phpt
new file mode 100644
index 0000000..6e03554
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite19.phar.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar: copy-on-write test 19 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite19.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write19.phar
+--EXPECTF--
+string(2) "hi"
+%string|unicode%(3) "hi2"
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite2.phar.phpt b/ext/phar/tests/cache_list/copyonwrite2.phar.phpt
new file mode 100644
index 0000000..8d21c81
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite2.phar.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar: copy-on-write test 2 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite2.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write2.phar
+--EXPECT--
+string(2) "hi"
+bool(true)
+string(2) "hi"
+bool(true)
+bool(true)
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite20.phar.phpt b/ext/phar/tests/cache_list/copyonwrite20.phar.phpt
new file mode 100644
index 0000000..acce574
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite20.phar.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar: copy-on-write test 20 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite20.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write20.phar
+--EXPECTF--
+string(2) "hi"
+NULL
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite21.phar.phpt b/ext/phar/tests/cache_list/copyonwrite21.phar.phpt
new file mode 100644
index 0000000..8960ea7
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite21.phar.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar: copy-on-write test 21 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite21.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
+--FILE_EXTERNAL--
+files/write21.phar
+--EXPECTF--
+bool(false)
+bool(true)
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite22.phar.phpt b/ext/phar/tests/cache_list/copyonwrite22.phar.phpt
new file mode 100644
index 0000000..7cba216
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite22.phar.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar: copy-on-write test 22 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite22.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
+--FILE_EXTERNAL--
+files/write22.phar
+--EXPECTF--
+bool(true)
+bool(false)
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite23.phar.phpt b/ext/phar/tests/cache_list/copyonwrite23.phar.phpt
new file mode 100644
index 0000000..292e5af
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite23.phar.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar: copy-on-write test 23 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite23.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
+--FILE_EXTERNAL--
+files/write23.phar
+--EXPECTF--
+bool(true)
+bool(false)
+bool(false)
+bool(true)
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite24.phar.phpt b/ext/phar/tests/cache_list/copyonwrite24.phar.phpt
new file mode 100644
index 0000000..69197f2
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite24.phar.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar: copy-on-write test 24 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite24.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
+--FILE_EXTERNAL--
+files/write24.phar
+--EXPECTF--
+bool(false)
+bool(true)
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite25.phar.phpt b/ext/phar/tests/cache_list/copyonwrite25.phar.phpt
new file mode 100644
index 0000000..b661cb6
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite25.phar.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar: copy-on-write test 25 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite25.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
+--FILE_EXTERNAL--
+files/write25.phar
+--EXPECTF--
+bool(false)
+bool(true)
+<?php __HALT_COMPILER();
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite3.phar.phpt b/ext/phar/tests/cache_list/copyonwrite3.phar.phpt
new file mode 100644
index 0000000..7e2c94c
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite3.phar.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar: copy-on-write test 3 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite3.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write3.phar
+--EXPECT--
+bool(true)
+bool(true)
+bool(false)
+bool(false)
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite4.phar.phpt b/ext/phar/tests/cache_list/copyonwrite4.phar.phpt
new file mode 100644
index 0000000..20ff78e
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite4.phar.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar: copy-on-write test 4 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite4.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write4.phar
+--EXPECT--
+bool(false)
+bool(true)
+string(2) "hi"
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite4a.phpt b/ext/phar/tests/cache_list/copyonwrite4a.phpt
new file mode 100644
index 0000000..1945e31
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite4a.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Phar: copy-on-write test 4a [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite4.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+var_dump(file_exists('phar://' . dirname(__FILE__) . '/files/write4.phar/testit.txt'));
+Phar::mount('phar://' . dirname(__FILE__) . '/files/write4.phar/testit.txt', 'phar://' . dirname(__FILE__) . '/files/write4.phar/tobemounted');
+var_dump(file_exists('phar://' . dirname(__FILE__) . '/files/write4.phar/testit.txt'), file_get_contents('phar://' . dirname(__FILE__) . '/files/write4.phar/testit.txt'));
+?>
+===DONE===
+--EXPECT--
+bool(false)
+bool(true)
+string(2) "hi"
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite5.phar.phpt b/ext/phar/tests/cache_list/copyonwrite5.phar.phpt
new file mode 100644
index 0000000..89990a7
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite5.phar.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Phar: copy-on-write test 5 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite5.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write5.phar
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/copyonwrite5/file1');
+unlink(dirname(__FILE__) . '/copyonwrite5/file2');
+rmdir(dirname(__FILE__) . '/copyonwrite5');
+?>
+--EXPECTF--
+array(2) {
+ ["file1"]=>
+ string(%d) "%sfile1"
+ ["file2"]=>
+ string(%d) "%sfile2"
+}
+phar://%scopyonwrite5.phar.php%cfile1 file1
+phar://%scopyonwrite5.phar.php%cfile2 file2
+phar://%scopyonwrite5.phar.php%chi hi
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite6.phar.phpt b/ext/phar/tests/cache_list/copyonwrite6.phar.phpt
new file mode 100644
index 0000000..661fef4
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite6.phar.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Phar: copy-on-write test 6 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite6.phar.php
+phar.readonly=0
+open_basedir=
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", "<")) die("skip PHP 5.3+ required"); ?>
+--FILE_EXTERNAL--
+files/write6.phar
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/copyonwrite6/file1');
+unlink(dirname(__FILE__) . '/copyonwrite6/file2');
+rmdir(dirname(__FILE__) . '/copyonwrite6');
+?>
+--EXPECTF--
+array(2) {
+ ["file1"]=>
+ string(%d) "%sfile1"
+ ["file2"]=>
+ string(%d) "%sfile2"
+}
+phar://%scopyonwrite6.phar.php%cfile1 file1
+phar://%scopyonwrite6.phar.php%cfile2 file2
+phar://%scopyonwrite6.phar.php%chi hi
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite7.phar.phpt b/ext/phar/tests/cache_list/copyonwrite7.phar.phpt
new file mode 100644
index 0000000..d6faded
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite7.phar.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar: copy-on-write test 7 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite7.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write7.phar
+--EXPECT--
+bool(true)
+bool(false)
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite8.phar.phpt b/ext/phar/tests/cache_list/copyonwrite8.phar.phpt
new file mode 100644
index 0000000..7217d33
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite8.phar.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar: copy-on-write test 8 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite8.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write8.phar
+--EXPECTF--
+string(%s) "%scopyonwrite8.phar.php"
+hi
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/copyonwrite9.phar.phpt b/ext/phar/tests/cache_list/copyonwrite9.phar.phpt
new file mode 100644
index 0000000..ffda956
--- /dev/null
+++ b/ext/phar/tests/cache_list/copyonwrite9.phar.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Phar: copy-on-write test 9 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/copyonwrite9.phar.php
+phar.readonly=0
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/write9.phar
+--EXPECTF--
+string(188) "<?php
+$p = new Phar(__FILE__);
+var_dump($p->getStub());
+$p2 = new Phar(__FILE__);
+$p->setStub("<?php __HALT"."_COMPILER();");
+echo $p2->getStub(),"\n";
+echo "ok\n";
+__HALT_COMPILER(); ?>
+"
+<?php __HALT_COMPILER(); ?>
+
+ok \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/files/blog.phar b/ext/phar/tests/cache_list/files/blog.phar
new file mode 100644
index 0000000..58c8a3b
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/blog.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/blog.phar.inc b/ext/phar/tests/cache_list/files/blog.phar.inc
new file mode 100644
index 0000000..62d86c5
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/blog.phar.inc
@@ -0,0 +1,20 @@
+<?php
+
+$fname = dirname(__FILE__) . '/blog.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php if(file_exists(dirname(__FILE__) . "/files/config.xml")) {
+ Phar::mount("config.xml", dirname(__FILE__) . "/files/config.xml");
+}
+Phar::webPhar("blog", "index.php");
+__HALT_COMPILER(); ?>');
+$phar['index.php'] = '<?php if (!file_exists("config.xml")) {
+ include "install.php";
+ exit;
+}
+var_dump(file_get_contents("config.xml"));
+?>';
+$phar['install.php'] = '<?php echo "install\n"; ?>';
+
+?>
diff --git a/ext/phar/tests/cache_list/files/config.xml b/ext/phar/tests/cache_list/files/config.xml
new file mode 100644
index 0000000..cf0dbc5
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/config.xml
@@ -0,0 +1,9 @@
+<xml version="1.0" encoding="UTF-8">
+<config>
+ <database>
+ <host>localhost</name>
+ <user>squirrel</user>
+ <pass>nuts</pass>
+ <db>hoard</db>
+ </database>
+</config>
diff --git a/ext/phar/tests/cache_list/files/extracted.inc b/ext/phar/tests/cache_list/files/extracted.inc
new file mode 100644
index 0000000..a6e5224
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/extracted.inc
@@ -0,0 +1 @@
+<?php var_dump(__FILE__); ?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller.phar b/ext/phar/tests/cache_list/files/frontcontroller.phar
new file mode 100644
index 0000000..626bf48
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller.phar.inc
new file mode 100644
index 0000000..80d42e8
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller.phar.inc
@@ -0,0 +1,13 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a['index.php'] = 'here is my index';
+$a->setStub('<?php
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller10.phar b/ext/phar/tests/cache_list/files/frontcontroller10.phar
new file mode 100644
index 0000000..078ce75
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller10.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller10.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller10.phar.inc
new file mode 100644
index 0000000..4c139db
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller10.phar.inc
@@ -0,0 +1,20 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller10.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller10.phar');
+$a['index.php'] = '<?php
+var_dump($_SERVER["PHP_SELF"]);
+var_dump($_SERVER["SCRIPT_NAME"]);
+var_dump($_SERVER["SCRIPT_FILENAME"]);
+var_dump($_SERVER["REQUEST_URI"]);
+var_dump($_SERVER["PHAR_PHP_SELF"]);
+var_dump($_SERVER["PHAR_SCRIPT_NAME"]);
+var_dump($_SERVER["PHAR_SCRIPT_FILENAME"]);
+var_dump($_SERVER["PHAR_REQUEST_URI"]);
+';
+$a->setStub('<?php
+Phar::mungServer(array("PHP_SELF", "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI", "OOPSIE"));
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller11.phar b/ext/phar/tests/cache_list/files/frontcontroller11.phar
new file mode 100644
index 0000000..61ea843
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller11.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller11.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller11.phar.inc
new file mode 100644
index 0000000..0863508
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller11.phar.inc
@@ -0,0 +1,20 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller11.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller11.phar');
+$a['index.php'] = '<?php
+var_dump($_SERVER["PHP_SELF"]);
+var_dump($_SERVER["SCRIPT_NAME"]);
+var_dump($_SERVER["SCRIPT_FILENAME"]);
+var_dump($_SERVER["REQUEST_URI"]);
+var_dump($_SERVER["PHAR_PHP_SELF"]);
+var_dump($_SERVER["PHAR_SCRIPT_NAME"]);
+var_dump($_SERVER["PHAR_SCRIPT_FILENAME"]);
+var_dump($_SERVER["PHAR_REQUEST_URI"]);
+';
+$a->setStub('<?php
+Phar::mungServer(array(array(), "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI"));
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller12.phar b/ext/phar/tests/cache_list/files/frontcontroller12.phar
new file mode 100644
index 0000000..1cf3629
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller12.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller12.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller12.phar.inc
new file mode 100644
index 0000000..f1e4645
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller12.phar.inc
@@ -0,0 +1,20 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller12.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller12.phar');
+$a['index.php'] = '<?php
+var_dump($_SERVER["PHP_SELF"]);
+var_dump($_SERVER[b"SCRIPT_NAME"]);
+var_dump($_SERVER[b"SCRIPT_FILENAME"]);
+var_dump($_SERVER[b"REQUEST_URI"]);
+var_dump($_SERVER[b"PHAR_PHP_SELF"]);
+var_dump($_SERVER[b"PHAR_SCRIPT_NAME"]);
+var_dump($_SERVER[b"PHAR_SCRIPT_FILENAME"]);
+var_dump($_SERVER[b"PHAR_REQUEST_URI"]);
+';
+$a->setStub('<?php
+Phar::mungServer(array("PHP_SELF", "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI"));
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller13.phar b/ext/phar/tests/cache_list/files/frontcontroller13.phar
new file mode 100644
index 0000000..750ff27
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller13.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller13.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller13.phar.inc
new file mode 100644
index 0000000..0bfef46
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller13.phar.inc
@@ -0,0 +1,14 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller13.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller13.phar');
+$a['index.php'] = '<?php
+var_dump("test");
+include "oof/test.php";';
+$a['oof/test.php'] = '<?php
+var_dump("oof/test.php");
+include "./hi.php";';
+$a['oof/hi.php'] = '<?php
+var_dump("hi");';
+$a->setStub('<?php
+Phar::webPhar();
+__HALT_COMPILER();'); \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/files/frontcontroller14.phar b/ext/phar/tests/cache_list/files/frontcontroller14.phar
new file mode 100644
index 0000000..ebc3e9b
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller14.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller14.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller14.phar.inc
new file mode 100644
index 0000000..23104a6
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller14.phar.inc
@@ -0,0 +1,19 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller14.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller14.phar');
+$a['html/index.php'] = '<?php
+var_dump($_SERVER[b"PATH_INFO"]);
+var_dump($_SERVER[b"PATH_TRANSLATED"]);
+';
+$a->setStub('<?php
+function s($a)
+{
+ return "/html/index.php";
+}
+Phar::interceptFileFuncs();
+Phar::mungServer(array("PHP_SELF", "REQUEST_URI"));
+Phar::webPhar("whatever", "/html/index.php", null, array(), "s");
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller16.phar b/ext/phar/tests/cache_list/files/frontcontroller16.phar
new file mode 100644
index 0000000..cce5db5
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller16.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller16.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller16.phar.inc
new file mode 100644
index 0000000..3c9986d
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller16.phar.inc
@@ -0,0 +1,16 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller16.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller16.phar');
+$a['index.php'] = '<?php
+echo "hi";
+';
+$a->setStub('<?php
+try {
+Phar::webPhar("test.phar", "/index.php", null, array(), array("fail", "here"));
+} catch (Exception $e) {
+die($e->getMessage() . "\n");
+}
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller17.phar b/ext/phar/tests/cache_list/files/frontcontroller17.phar
new file mode 100644
index 0000000..b83d41f
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller17.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller17.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller17.phar.inc
new file mode 100644
index 0000000..85b8729
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller17.phar.inc
@@ -0,0 +1,16 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller17.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller17.phar');
+$a['index.php'] = '<?php
+echo "hi";
+';
+$a->setStub('<?php
+try {
+Phar::webPhar("test.phar", "/index.php", null, array(), "sort");
+} catch (Exception $e) {
+die($e->getMessage() . "\n");
+}
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller18.phar b/ext/phar/tests/cache_list/files/frontcontroller18.phar
new file mode 100644
index 0000000..c447f39
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller18.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller18.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller18.phar.inc
new file mode 100644
index 0000000..847a713
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller18.phar.inc
@@ -0,0 +1,19 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller18.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller18.phar');
+$a['index.php'] = '<?php
+echo "hi";
+';
+$a->setStub('<?php
+function s($a)
+{
+}
+try {
+Phar::webPhar("test.phar", "/index.php", null, array(), "s");
+} catch (Exception $e) {
+die($e->getMessage() . "\n");
+}
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller19.phar b/ext/phar/tests/cache_list/files/frontcontroller19.phar
new file mode 100644
index 0000000..bdf8ee1
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller19.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller19.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller19.phar.inc
new file mode 100644
index 0000000..ba84ac4
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller19.phar.inc
@@ -0,0 +1,25 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller19.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller19.phar');
+$a['start/index.php'] = '<?php
+echo "start/index.php\n";
+include "./another.php";
+';
+$a['start/another.php'] = '<?php
+echo "start/another.php\n";
+include "../another.php";
+?>';
+$a['another.php'] = '<?php
+echo "another.php\n";
+?>';
+$a->setStub('<?php
+set_include_path("phar://" . __FILE__);
+try {
+Phar::webPhar("test.phar", "/start/index.php");
+} catch (Exception $e) {
+die($e->getMessage() . "\n");
+}
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller2.phar b/ext/phar/tests/cache_list/files/frontcontroller2.phar
new file mode 100644
index 0000000..0dd0e7f
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller2.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller2.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller2.phar.inc
new file mode 100644
index 0000000..653c796
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller2.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller2.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller2.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "a.php");
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller3.phar b/ext/phar/tests/cache_list/files/frontcontroller3.phar
new file mode 100644
index 0000000..35a23ea
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller3.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller3.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller3.phar.inc
new file mode 100644
index 0000000..6f9126f
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller3.phar.inc
@@ -0,0 +1,18 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller3.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller3.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+function s($a)
+{
+ static $b = array(b"/hi" => "a.phps");
+ if (isset($b[$a])) return $b[$a];
+ return $a;
+}
+Phar::webPhar("whatever", "/index.php", null, array(), "s");
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller4.phar b/ext/phar/tests/cache_list/files/frontcontroller4.phar
new file mode 100644
index 0000000..8359461
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller4.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller4.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller4.phar.inc
new file mode 100644
index 0000000..daf807e
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller4.phar.inc
@@ -0,0 +1,18 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller4.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller4.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+function s($a)
+{
+ static $b = array(b"/hi" => false);
+ if (isset($b[$a])) return $b[$a];
+ return $a;
+}
+Phar::webPhar("whatever", "index.php", null, array(), "s");
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller5.phar b/ext/phar/tests/cache_list/files/frontcontroller5.phar
new file mode 100644
index 0000000..f206b59
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller5.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller5.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller5.phar.inc
new file mode 100644
index 0000000..d2d810c
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller5.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller5.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller5.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", null, array(0 => "oops"));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller6.phar b/ext/phar/tests/cache_list/files/frontcontroller6.phar
new file mode 100644
index 0000000..f4a8265
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller6.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller6.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller6.phar.inc
new file mode 100644
index 0000000..5c900eb
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller6.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller6.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller6.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", null, array("blah" => 100));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller7.phar b/ext/phar/tests/cache_list/files/frontcontroller7.phar
new file mode 100644
index 0000000..07884b2
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller7.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller7.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller7.phar.inc
new file mode 100644
index 0000000..6849702
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller7.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller7.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller7.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", null, array("blah" => null));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller8.phar b/ext/phar/tests/cache_list/files/frontcontroller8.phar
new file mode 100644
index 0000000..c9c0e40
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller8.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller8.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller8.phar.inc
new file mode 100644
index 0000000..8629f08
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller8.phar.inc
@@ -0,0 +1,19 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller8.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller8.phar');
+$a['a.phps'] = 'hio1';
+$a['a1.phps'] = '<?php var_dump($_SERVER[b"REQUEST_URI"], $_SERVER[b"PATH_INFO"]);';
+$a['a.jpg'] = 'hio2';
+$a['a.php'] = '<?php function hio(){}';
+$a['fronk.gronk'] = 'hio3';
+$a['404.php'] = 'My 404 is rawesome';
+$a['noext'] = 'hi';
+$a['unknown.ext'] = '<?php var_dump("hi");';
+$a['bigfile.txt'] = str_repeat('a', 8193);
+$a['fatalerror.phps'] = '<?php oopsie_daisy();';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", "404.php", array("jpg" => "foo/bar", "phps" => Phar::PHP, "php" => Phar::PHPS));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/frontcontroller9.phar b/ext/phar/tests/cache_list/files/frontcontroller9.phar
new file mode 100644
index 0000000..39ca28c
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller9.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller9.phar.inc b/ext/phar/tests/cache_list/files/frontcontroller9.phar.inc
new file mode 100644
index 0000000..00861f6
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/frontcontroller9.phar.inc
@@ -0,0 +1,14 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller9.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller9.phar');
+$a['a.phps'] = 'hio1';
+$a['a.jpg'] = 'hio2';
+$a['a.php'] = '<?php function hio(){}';
+$a['fronk.gronk'] = 'hio3';
+$a->setStub('<?php
+Phar::mungServer(array());
+Phar::webPhar("whatever", "index.php", null, array("jpg" => "foo/bar", "phps" => Phar::PHP, "php" => Phar::PHPS));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/cache_list/files/md5.phar b/ext/phar/tests/cache_list/files/md5.phar
new file mode 100644
index 0000000..8ca2f84
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/md5.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/nophar.phar b/ext/phar/tests/cache_list/files/nophar.phar
new file mode 100644
index 0000000..4eb3083
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/nophar.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/nophar.phar.inc b/ext/phar/tests/cache_list/files/nophar.phar.inc
new file mode 100644
index 0000000..36d5628
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/nophar.phar.inc
@@ -0,0 +1,10 @@
+<?php
+$fname = dirname(__FILE__) . '/nophar.phar';
+@unlink($fname);
+$p = new Phar($fname);
+$p['index.php'] = '<?php include "b/c.php";' . "\n";
+$p['web.php'] = '<?php echo "web\n";';
+$p['b/c.php'] = '<?php echo "in b\n";$a = fopen("index.php", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";';
+$p['d'] = "in d\n";
+$p->setStub($p->createDefaultStub('index.php', 'web.php'));
+?> \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/files/openssl.phar b/ext/phar/tests/cache_list/files/openssl.phar
new file mode 100644
index 0000000..f3864d7
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/openssl.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/openssl.phar.pubkey b/ext/phar/tests/cache_list/files/openssl.phar.pubkey
new file mode 100644
index 0000000..7dd79ac
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/openssl.phar.pubkey
@@ -0,0 +1,6 @@
+-----BEGIN PUBLIC KEY-----
+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA3ADUiKZIEhekYShzPCZ3LFbg
+rDuV44jH94OdJQfqaCQBvZXqMoG1bWOeYfbc3iO0gHWW3SKB27Sf1ZBnc5c1+YzB
+mx9bFipOX2W2ouKS2YoHeIoR9leDNu4yqwBsuggFPGVPxM9ikEI+YAOGVTCd4mV5
+agpkVsHLNJWbz/nPVwIDAQAB
+-----END PUBLIC KEY-----
diff --git a/ext/phar/tests/cache_list/files/phar_oo_test.inc b/ext/phar/tests/cache_list/files/phar_oo_test.inc
new file mode 100644
index 0000000..9863e8d
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/phar_oo_test.inc
@@ -0,0 +1,49 @@
+<?php
+
+ini_set('date.timezone', 'GMT');
+
+$fname = dirname(__FILE__) . '/phar_oo_test.phar.php';
+$pname = 'phar://' . $fname;
+$file = '<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>';
+
+$files = array();
+
+if (!isset($pharconfig)) $pharconfig = 0;
+
+switch($pharconfig)
+{
+ default:
+ case 0:
+ $files['a.php'] = '<?php echo "This is a.php\n"; ?>';
+ $files['b.php'] = '<?php echo "This is b.php\n"; ?>';
+ $files['b/c.php'] = '<?php echo "This is b/c.php\n"; ?>';
+ $files['b/d.php'] = '<?php echo "This is b/d.php\n"; ?>';
+ $files['e.php'] = '<?php echo "This is e.php\n"; ?>';
+ break;
+ case 1:
+ $files['a.csv'] =<<<EOF
+1,2,3
+2,a,b
+3,"c","'e'"
+EOF;
+ break;
+ case 2:
+ $files['a.csv'] =<<<EOF
+1,2,3
+2,a,b
+3,"c","'e'"
+4
+5,5
+
+7,777
+EOF;
+ break;
+ case 3:
+ $files['a.php'] = '<?php echo new new class;';
+ break;
+}
+
+$ftime = mktime(12, 0, 0, 3, 1, 2006);
+include 'phar_test.inc';
+
+?> \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/files/phar_test.inc b/ext/phar/tests/cache_list/files/phar_test.inc
new file mode 100644
index 0000000..f82471d
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/phar_test.inc
@@ -0,0 +1,78 @@
+<?php
+
+if (function_exists('date_default_timezone_set')) {
+ date_default_timezone_set('UTC');
+}
+
+$manifest = (binary)'';
+$glags = 0;
+
+foreach($files as $name => $cont)
+{
+ global $gflags, $files;
+
+ $comp = NULL;
+ $crc32= NULL;
+ $clen = NULL;
+ $ulen = NULL;
+ $time = isset($ftime) ? $ftime : @mktime(12, 0, 0, 3, 1, 2006);
+ $flags= 0;
+ $perm = 0x000001B6;
+ $meta = NULL;
+
+ // overwrite if array
+ if (is_array($cont))
+ {
+ foreach(array('comp','crc32','clen','ulen','time','flags','perm','meta','cont') as $what)
+ {
+ if (isset($cont[$what]))
+ {
+ $$what = $cont[$what];
+ }
+ }
+ }
+
+ // create if not yet done
+ if (empty($comp)) $comp = $cont;
+ if (empty($ulen)) $ulen = strlen($cont);
+ if (empty($clen)) $clen = strlen($comp);
+ if (empty($crc32))$crc32= crc32((binary)$cont);
+ if (isset($meta)) $meta = serialize($meta);
+
+ // write manifest entry
+ $manifest .= pack('V', strlen($name)) . (binary)$name;
+ $manifest .= pack('VVVVVV', $ulen, $time, $clen, $crc32, $flags|$perm, strlen($meta)) . (binary)$meta;
+
+ // globals
+ $gflags |= $flags;
+ $files[$name] = $comp;
+}
+
+if (!isset($alias)) $alias = 'hio';
+
+if (isset($pmeta)) $pmeta = serialize($pmeta); else $pmeta = '';
+
+$manifest = pack('VnVV', count($files), isset($hasdir) ? 0x1110 : 0x1000, $gflags, strlen($alias)) . (binary)$alias . pack('V', strlen($pmeta)) . (binary)$pmeta . $manifest;
+$file = (binary)$file;
+$file .= pack('V', strlen($manifest)) . $manifest;
+
+foreach($files as $cont)
+{
+ $file .= (binary)$cont;
+}
+
+file_put_contents($fname, $file);
+
+if (@$gzip) {
+ $fp = gzopen($fname, 'w');
+ fwrite($fp, $file);
+ fclose($fp);
+}
+
+if (@$bz2) {
+ $fp = bzopen($fname, 'w');
+ fwrite($fp, $file);
+ fclose($fp);
+}
+
+?> \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/files/private.pem b/ext/phar/tests/cache_list/files/private.pem
new file mode 100644
index 0000000..e4f4883
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/private.pem
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDA3ADUiKZIEhekYShzPCZ3LFbgrDuV44jH94OdJQfqaCQBvZXq
+MoG1bWOeYfbc3iO0gHWW3SKB27Sf1ZBnc5c1+YzBmx9bFipOX2W2ouKS2YoHeIoR
+9leDNu4yqwBsuggFPGVPxM9ikEI+YAOGVTCd4mV5agpkVsHLNJWbz/nPVwIDAQAB
+AoGAGiS4qBbuE48ATXQuO5DH1hfYnxQ575Oskw7mdIL0k74SQ3ojvF+kXae6fVni
+UQZ76JgRWKYZa2kRDymwLZXpxVbiGL9dDvQY8ZENDtWOy9s7TDtxNixbZloKBopg
+J7G1B05LgetR3dgFnQOwt+e3kOu72RpS7thyBaUm8zHCRSECQQDw+h5uxE7i9CC8
+KHyJlwGoR28KZgrSpo74yWhQ+b1lzxQ+rk2wToFD/p+WNe/nf78YUl/cq0LngCKH
+Y7t228VLAkEAzOHzAjuDlGGzK6Kpe67iKgXd+GpKwPr9iaFfmzABOkRwQug4LCN7
+skmzCX5pzxqMZW1xNICjeDjWsMA3d4EypQJBAJyXPA1onYaXc2oxuPPD3/zVJpAQ
+TTojp8Z9Qr9T+kJdNV+h7rQB37gqjtOSiynY9nm8lbSUya4bstRd96S+HU8CQQCp
+yBAd6H2oZ7IXVeuHACyRUF1ab5LVCukxtVXJ/2T1CSPSfieWhC0MWMCR/HzoUALK
+RoBKVtOgW9GllRQh5yG1AkARVYbvj0XBy6XUpe5WZsLNWwpw1JreRsygcPXYh8bs
+nxhCdHNHJQ01lRDMjvNLtI8a5YjJE/IeW76T2mPCiJZI
+-----END RSA PRIVATE KEY-----
diff --git a/ext/phar/tests/cache_list/files/sha1.phar b/ext/phar/tests/cache_list/files/sha1.phar
new file mode 100644
index 0000000..c7e9e7e
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/sha1.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/sha256.phar b/ext/phar/tests/cache_list/files/sha256.phar
new file mode 100644
index 0000000..81459ee
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/sha256.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/sha512.phar b/ext/phar/tests/cache_list/files/sha512.phar
new file mode 100644
index 0000000..a747381
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/sha512.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write.phar b/ext/phar/tests/cache_list/files/write.phar
new file mode 100644
index 0000000..7acdaa6
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write.phar.inc b/ext/phar/tests/cache_list/files/write.phar.inc
new file mode 100644
index 0000000..eb722af
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write.phar.inc
@@ -0,0 +1,20 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$phar = new Phar(__FILE__);
+echo $phar["test.txt"]->getContent();
+$phar["test.txt"] = "changed
+";
+echo $phar["test.txt"]->getContent();
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar->setMetadata('hi');
+$phar['test.txt'] = "hi
+";
+$phar['test.txt']->setMetadata('hi');
+?>
diff --git a/ext/phar/tests/cache_list/files/write10.phar b/ext/phar/tests/cache_list/files/write10.phar
new file mode 100644
index 0000000..473f0a1
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write10.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write10.phar.inc b/ext/phar/tests/cache_list/files/write10.phar.inc
new file mode 100644
index 0000000..a23b5e5
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write10.phar.inc
@@ -0,0 +1,18 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write10.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump($p->getStub());
+$p2 = new Phar(__FILE__);
+$a = fopen("phar://" . __FILE__ . "/test.txt", "r");
+$p->setStub($a);
+echo $p2->getStub(),"\n";
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+?>
diff --git a/ext/phar/tests/cache_list/files/write11.phar b/ext/phar/tests/cache_list/files/write11.phar
new file mode 100644
index 0000000..bb8d33f
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write11.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write11.phar.inc b/ext/phar/tests/cache_list/files/write11.phar.inc
new file mode 100644
index 0000000..d255264
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write11.phar.inc
@@ -0,0 +1,17 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write11.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump($p->getStub());
+$p2 = new Phar(__FILE__);
+$p->setDefaultStub();
+echo strlen($p2->getStub()),"\n";
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+?>
diff --git a/ext/phar/tests/cache_list/files/write12.phar b/ext/phar/tests/cache_list/files/write12.phar
new file mode 100644
index 0000000..bff1456
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write12.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write12.phar.inc b/ext/phar/tests/cache_list/files/write12.phar.inc
new file mode 100644
index 0000000..f0c01eb
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write12.phar.inc
@@ -0,0 +1,17 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write12.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump($p->getSignature());
+$p2 = new Phar(__FILE__);
+$p->setSignatureAlgorithm(Phar::MD5);
+var_dump($p->getSignature());
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+?>
diff --git a/ext/phar/tests/cache_list/files/write13.phar b/ext/phar/tests/cache_list/files/write13.phar
new file mode 100644
index 0000000..46ca14d
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write13.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write13.phar.inc b/ext/phar/tests/cache_list/files/write13.phar.inc
new file mode 100644
index 0000000..e8b6f33
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write13.phar.inc
@@ -0,0 +1,17 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write13.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump($p["test.txt"]->isCompressed());
+$p2 = new Phar(__FILE__);
+$p->compressFiles(Phar::GZ);
+var_dump($p["test.txt"]->isCompressed());
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+?>
diff --git a/ext/phar/tests/cache_list/files/write14.phar b/ext/phar/tests/cache_list/files/write14.phar
new file mode 100644
index 0000000..4482752
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write14.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write14.phar.inc b/ext/phar/tests/cache_list/files/write14.phar.inc
new file mode 100644
index 0000000..c2b0448
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write14.phar.inc
@@ -0,0 +1,18 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write14.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump($p["test.txt"]->isCompressed());
+$p2 = new Phar(__FILE__);
+$p->decompressFiles();
+var_dump($p["test.txt"]->isCompressed());
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+$phar->compressFiles(Phar::GZ);
+?>
diff --git a/ext/phar/tests/cache_list/files/write15.phar b/ext/phar/tests/cache_list/files/write15.phar
new file mode 100644
index 0000000..c6190b7
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write15.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write15.phar.inc b/ext/phar/tests/cache_list/files/write15.phar.inc
new file mode 100644
index 0000000..d30f6c8
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write15.phar.inc
@@ -0,0 +1,16 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write15.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump(isset($p["copied"]));
+$p->copy("test.txt","copied");
+var_dump(isset($p["copied"]));
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+?>
diff --git a/ext/phar/tests/cache_list/files/write16.phar b/ext/phar/tests/cache_list/files/write16.phar
new file mode 100644
index 0000000..05106ea
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write16.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write16.phar.inc b/ext/phar/tests/cache_list/files/write16.phar.inc
new file mode 100644
index 0000000..b7a1b38
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write16.phar.inc
@@ -0,0 +1,17 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write16.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump(isset($p["test.txt"]));
+unset($p["test.txt"]);
+var_dump(isset($p["test.txt"]));
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+$phar['test2.txt'] = "<?php __HALT"."_COMPILER();";
+?>
diff --git a/ext/phar/tests/cache_list/files/write17.phar b/ext/phar/tests/cache_list/files/write17.phar
new file mode 100644
index 0000000..52ddb5e
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write17.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write17.phar.inc b/ext/phar/tests/cache_list/files/write17.phar.inc
new file mode 100644
index 0000000..47f5ea3
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write17.phar.inc
@@ -0,0 +1,16 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write17.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump($p->getMetadata());
+$p->setMetadata("hi");
+var_dump($p->getMetadata());
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+?>
diff --git a/ext/phar/tests/cache_list/files/write18.phar b/ext/phar/tests/cache_list/files/write18.phar
new file mode 100644
index 0000000..3fc9fe1
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write18.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write18.phar.inc b/ext/phar/tests/cache_list/files/write18.phar.inc
new file mode 100644
index 0000000..fca867d
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write18.phar.inc
@@ -0,0 +1,17 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write18.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+echo decoct(fileperms("phar://" . __FILE__ . "/test.txt")),"\n";
+$p["test.txt"]->chmod(0444);
+echo decoct(fileperms("phar://" . __FILE__ . "/test.txt")),"\n";
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+$phar["test.txt"]->chmod(0666);
+?>
diff --git a/ext/phar/tests/cache_list/files/write19.phar b/ext/phar/tests/cache_list/files/write19.phar
new file mode 100644
index 0000000..9e8b7ee
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write19.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write19.phar.inc b/ext/phar/tests/cache_list/files/write19.phar.inc
new file mode 100644
index 0000000..55115ad
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write19.phar.inc
@@ -0,0 +1,17 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write19.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump($p["test.txt"]->getMetadata());
+$p["test.txt"]->setMetadata("hi2");
+var_dump($p["test.txt"]->getMetadata());
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+$phar["test.txt"]->setMetadata("hi");
+?>
diff --git a/ext/phar/tests/cache_list/files/write2.phar b/ext/phar/tests/cache_list/files/write2.phar
new file mode 100644
index 0000000..0941025
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write2.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write2.phar.inc b/ext/phar/tests/cache_list/files/write2.phar.inc
new file mode 100644
index 0000000..7a4e2e3
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write2.phar.inc
@@ -0,0 +1,23 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write2.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$phar = new Phar(__FILE__);
+var_dump($phar->getMetadata());
+mkdir("phar://" . __FILE__ . "/test");
+var_dump(is_dir("phar://" . __FILE__ . "/test"));
+$phar2 = new Phar(__FILE__);
+var_dump($phar2->getMetadata());
+var_dump(isset($phar["test"]));
+var_dump(isset($phar2["test"]));
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar->setMetadata('hi');
+$phar['test.txt'] = "hi
+";
+$phar['test.txt']->setMetadata('hi');
+?>
diff --git a/ext/phar/tests/cache_list/files/write20.phar b/ext/phar/tests/cache_list/files/write20.phar
new file mode 100644
index 0000000..6109264
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write20.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write20.phar.inc b/ext/phar/tests/cache_list/files/write20.phar.inc
new file mode 100644
index 0000000..d356bfb
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write20.phar.inc
@@ -0,0 +1,17 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write20.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump($p["test.txt"]->getMetadata());
+$p["test.txt"]->delMetadata();
+var_dump($p["test.txt"]->getMetadata());
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+$phar["test.txt"]->setMetadata("hi");
+?>
diff --git a/ext/phar/tests/cache_list/files/write21.phar b/ext/phar/tests/cache_list/files/write21.phar
new file mode 100644
index 0000000..fad2165
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write21.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write21.phar.inc b/ext/phar/tests/cache_list/files/write21.phar.inc
new file mode 100644
index 0000000..79bfb20
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write21.phar.inc
@@ -0,0 +1,16 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write21.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump($p["test.txt"]->isCompressed());
+$p["test.txt"]->compress(Phar::GZ);
+var_dump($p["test.txt"]->isCompressed());
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+?>
diff --git a/ext/phar/tests/cache_list/files/write22.phar b/ext/phar/tests/cache_list/files/write22.phar
new file mode 100644
index 0000000..c3c5ce1
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write22.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write22.phar.inc b/ext/phar/tests/cache_list/files/write22.phar.inc
new file mode 100644
index 0000000..861cabb
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write22.phar.inc
@@ -0,0 +1,17 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write22.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump($p["test.txt"]->isCompressed());
+$p["test.txt"]->decompress();
+var_dump($p["test.txt"]->isCompressed());
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+$phar['test.txt']->compress(Phar::GZ);
+?>
diff --git a/ext/phar/tests/cache_list/files/write23.phar b/ext/phar/tests/cache_list/files/write23.phar
new file mode 100644
index 0000000..2246f61
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write23.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write23.phar.inc b/ext/phar/tests/cache_list/files/write23.phar.inc
new file mode 100644
index 0000000..ac92a85
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write23.phar.inc
@@ -0,0 +1,16 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write23.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump(isset($p["test.txt"]), isset($p["newname"]));
+rename("phar://" . __FILE__ . "/test.txt", "phar://" . __FILE__ . "/newname");
+var_dump(isset($p["test.txt"]), isset($p["newname"]));
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+?>
diff --git a/ext/phar/tests/cache_list/files/write24.phar b/ext/phar/tests/cache_list/files/write24.phar
new file mode 100644
index 0000000..36972f3
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write24.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write24.phar.inc b/ext/phar/tests/cache_list/files/write24.phar.inc
new file mode 100644
index 0000000..216f7c4
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write24.phar.inc
@@ -0,0 +1,18 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write24.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump(isset($p["newname"]));
+$fp = fopen("phar://" . __FILE__ . "/newname", "w");
+fwrite($fp, b"hi");
+fclose($fp);
+var_dump(isset($p["newname"]));
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+?>
diff --git a/ext/phar/tests/cache_list/files/write25.phar b/ext/phar/tests/cache_list/files/write25.phar
new file mode 100644
index 0000000..93b301c
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write25.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write25.phar.inc b/ext/phar/tests/cache_list/files/write25.phar.inc
new file mode 100644
index 0000000..60a6978
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write25.phar.inc
@@ -0,0 +1,16 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write25.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump(isset($p["mounted"]));
+Phar::mount("mounted", "phar://" . __FILE__ . "/test.txt");
+var_dump(isset($p["mounted"]));
+echo $p["mounted"]->getContent(),"\nok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
+?>
diff --git a/ext/phar/tests/cache_list/files/write3.phar b/ext/phar/tests/cache_list/files/write3.phar
new file mode 100644
index 0000000..5ce4a95
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write3.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write3.phar.inc b/ext/phar/tests/cache_list/files/write3.phar.inc
new file mode 100644
index 0000000..686c065
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write3.phar.inc
@@ -0,0 +1,21 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write3.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+clearstatcache();
+var_dump(file_exists("phar://" . __FILE__ . "/test"), is_dir("phar://" . __FILE__ . "/test"));
+rmdir("phar://" . __FILE__ . "/test");
+clearstatcache();
+var_dump(file_exists("phar://" . __FILE__ . "/test"), is_dir("phar://" . __FILE__ . "/test"));
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar->setMetadata('hi');
+$phar['test.txt'] = "hi
+";
+$phar['test.txt']->setMetadata('hi');
+$phar->addEmptyDir('test');
+?>
diff --git a/ext/phar/tests/cache_list/files/write4.phar b/ext/phar/tests/cache_list/files/write4.phar
new file mode 100644
index 0000000..c267bab
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write4.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write4.phar.inc b/ext/phar/tests/cache_list/files/write4.phar.inc
new file mode 100644
index 0000000..5b476ed
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write4.phar.inc
@@ -0,0 +1,16 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write4.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+var_dump(file_exists("phar://" . __FILE__ . "/test.txt"));
+clearstatcache();
+Phar::mount("test.txt", "phar://" . __FILE__ . "/tobemounted");
+var_dump(file_exists("phar://" . __FILE__ . "/test.txt"), file_get_contents("phar://" . __FILE__ . "/test.txt"));
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['tobemounted'] = "hi";
+?>
diff --git a/ext/phar/tests/cache_list/files/write5.phar b/ext/phar/tests/cache_list/files/write5.phar
new file mode 100644
index 0000000..52635b4
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write5.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write5.phar.inc b/ext/phar/tests/cache_list/files/write5.phar.inc
new file mode 100644
index 0000000..5e7b9bb
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write5.phar.inc
@@ -0,0 +1,29 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write5.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$phar = new Phar(__FILE__);
+$d = dirname(__FILE__) . "/copyonwrite5";
+mkdir($d);
+file_put_contents($d . "/file1", "file1\n");
+file_put_contents($d . "/file2", "file2\n");
+$arr = $phar->buildFromDirectory($d);
+ksort($arr);
+var_dump($arr);
+$phar2 = new Phar(__FILE__);
+$arr = array();
+foreach ($phar2 as $name => $file) {
+ $arr[$name] = $file->getContent();
+}
+ksort($arr);
+foreach ($arr as $name => $content) {
+ echo $name, " ", $content;
+}
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['hi'] = "hi\n";
+?>
diff --git a/ext/phar/tests/cache_list/files/write6.phar b/ext/phar/tests/cache_list/files/write6.phar
new file mode 100644
index 0000000..e3e4341
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write6.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write6.phar.inc b/ext/phar/tests/cache_list/files/write6.phar.inc
new file mode 100644
index 0000000..3ba5db3
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write6.phar.inc
@@ -0,0 +1,30 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write6.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$phar = new Phar(__FILE__);
+$d = dirname(__FILE__) . "/copyonwrite6";
+mkdir($d);
+file_put_contents($d . "/file1", "file1\n");
+file_put_contents($d . "/file2", "file2\n");
+$arr = $phar->buildFromIterator(new RecursiveDirectoryIterator($d, RecursiveDirectoryIterator::SKIP_DOTS),$d);
+$arr = $phar->buildFromDirectory($d);
+ksort($arr);
+var_dump($arr);
+$phar2 = new Phar(__FILE__);
+$arr = array();
+foreach ($phar2 as $name => $file) {
+ $arr[$name] = $file->getContent();
+}
+ksort($arr);
+foreach ($arr as $name => $content) {
+ echo $name, " ", $content;
+}
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['hi'] = "hi\n";
+?>
diff --git a/ext/phar/tests/cache_list/files/write7.phar b/ext/phar/tests/cache_list/files/write7.phar
new file mode 100644
index 0000000..e5854ec
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write7.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write7.phar.inc b/ext/phar/tests/cache_list/files/write7.phar.inc
new file mode 100644
index 0000000..ef5b8b2
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write7.phar.inc
@@ -0,0 +1,18 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write7.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump(file_exists("phar://" . __FILE__ . "/test.txt"));
+$p->delete("test.txt");
+clearstatcache();
+var_dump(file_exists("phar://" . __FILE__ . "/test.txt"));
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "hi
+";
+?>
diff --git a/ext/phar/tests/cache_list/files/write8.phar b/ext/phar/tests/cache_list/files/write8.phar
new file mode 100644
index 0000000..d5d63be
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write8.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write8.phar.inc b/ext/phar/tests/cache_list/files/write8.phar.inc
new file mode 100644
index 0000000..2b733a7
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write8.phar.inc
@@ -0,0 +1,18 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write8.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump($p->getAlias());
+$p2 = new Phar(__FILE__);
+$p->setAlias("hi");
+echo $p2->getAlias(),"\n";
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "hi
+";
+?>
diff --git a/ext/phar/tests/cache_list/files/write9.phar b/ext/phar/tests/cache_list/files/write9.phar
new file mode 100644
index 0000000..c012c17
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write9.phar
Binary files differ
diff --git a/ext/phar/tests/cache_list/files/write9.phar.inc b/ext/phar/tests/cache_list/files/write9.phar.inc
new file mode 100644
index 0000000..ed3e681
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/write9.phar.inc
@@ -0,0 +1,18 @@
+<?php
+
+$fname = dirname(__FILE__) . '/write9.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+$p = new Phar(__FILE__);
+var_dump($p->getStub());
+$p2 = new Phar(__FILE__);
+$p->setStub("<?php __HALT"."_COMPILER();");
+echo $p2->getStub(),"\n";
+echo "ok\n";
+__HALT_COMPILER();
+?>');
+$phar['test.txt'] = "hi
+";
+?>
diff --git a/ext/phar/tests/cache_list/files/zfapp.tgz b/ext/phar/tests/cache_list/files/zfapp.tgz
new file mode 100644
index 0000000..fcaec86
--- /dev/null
+++ b/ext/phar/tests/cache_list/files/zfapp.tgz
Binary files differ
diff --git a/ext/phar/tests/cache_list/frontcontroller1.phpt b/ext/phar/tests/cache_list/frontcontroller1.phpt
new file mode 100644
index 0000000..d0d5552
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller1.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller other
+--INI--
+phar.cache_list={PWD}/frontcontroller1.php [cache_list]
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller1.php
+REQUEST_URI=/frontcontroller1.php/a.jpg
+PATH_INFO=/a.jpg
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Content-type: image/jpeg
+Content-length: 3
+--EXPECT--
+hio
diff --git a/ext/phar/tests/cache_list/frontcontroller10.phpt b/ext/phar/tests/cache_list/frontcontroller10.phpt
new file mode 100644
index 0000000..00177d4
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller10.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Phar front controller rewrite access denied [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller10.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller10.php
+REQUEST_URI=/frontcontroller10.php/hi
+PATH_INFO=/hi
+--FILE_EXTERNAL--
+files/frontcontroller4.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+Status: 403 Access Denied
+--EXPECT--
+<html>
+ <head>
+ <title>Access Denied</title>
+ </head>
+ <body>
+ <h1>403 - File /hi Access Denied</h1>
+ </body>
+</html>
diff --git a/ext/phar/tests/cache_list/frontcontroller11.phpt b/ext/phar/tests/cache_list/frontcontroller11.phpt
new file mode 100644
index 0000000..25b147e
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller11.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Phar front controller mime type extension is not a string [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller11.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller11.php
+REQUEST_URI=/frontcontroller11.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller5.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Key of MIME type overrides array must be a file extension, was "0"' in %sfrontcontroller11.php:2
+Stack trace:
+#0 %sfrontcontroller11.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+ thrown in %sfrontcontroller11.php on line 2 \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller12.phpt b/ext/phar/tests/cache_list/frontcontroller12.phpt
new file mode 100644
index 0000000..cfc7d0e
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller12.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller mime type unknown int [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller12.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller12.php
+REQUEST_URI=/frontcontroller12.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller6.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Unknown mime type specifier used, only Phar::PHP, Phar::PHPS and a mime type string are allowed' in %sfrontcontroller12.php:2
+Stack trace:
+#0 %sfrontcontroller12.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+ thrown in %sfrontcontroller12.php on line 2 \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller13.phpt b/ext/phar/tests/cache_list/frontcontroller13.phpt
new file mode 100644
index 0000000..e6c9dee
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller13.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller mime type not string/int [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller13.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller13.php
+REQUEST_URI=/frontcontroller13.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller7.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Unknown mime type specifier used (not a string or int), only Phar::PHP, Phar::PHPS and a mime type string are allowed' in %sfrontcontroller13.php:2
+Stack trace:
+#0 %sfrontcontroller13.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+ thrown in %sfrontcontroller13.php on line 2 \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller14.phpt b/ext/phar/tests/cache_list/frontcontroller14.phpt
new file mode 100644
index 0000000..bbd9637
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller14.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller mime type override, other [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller14.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller14.php
+REQUEST_URI=/frontcontroller14.php/a.jpg
+PATH_INFO=/a.jpg
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: foo/bar
+Content-length: 4
+--EXPECT--
+hio2
diff --git a/ext/phar/tests/cache_list/frontcontroller15.phpt b/ext/phar/tests/cache_list/frontcontroller15.phpt
new file mode 100644
index 0000000..d142a5d
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller15.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller mime type override, Phar::PHPS [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller15.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller15.php
+REQUEST_URI=/frontcontroller15.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+<code><span style="color: #000000">
+<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
+</span>
+</code>
+
diff --git a/ext/phar/tests/cache_list/frontcontroller16.phpt b/ext/phar/tests/cache_list/frontcontroller16.phpt
new file mode 100644
index 0000000..10bebdc
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller16.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller mime type override, Phar::PHP [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller16.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller16.php
+REQUEST_URI=/frontcontroller16.php/a.phps
+PATH_INFO=/a.phps
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+hio1
+
diff --git a/ext/phar/tests/cache_list/frontcontroller17.phpt b/ext/phar/tests/cache_list/frontcontroller17.phpt
new file mode 100644
index 0000000..35d3ae4
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller17.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller mime type unknown [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller17.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller17.php
+REQUEST_URI=/frontcontroller17.php/fronk.gronk
+PATH_INFO=/fronk.gronk
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: application/octet-stream
+Content-length: 4
+--EXPECT--
+hio3
+
diff --git a/ext/phar/tests/cache_list/frontcontroller18.phpt b/ext/phar/tests/cache_list/frontcontroller18.phpt
new file mode 100644
index 0000000..5e94bf6
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller18.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller $_SERVER munging failure [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller18.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller18.php
+REQUEST_URI=/frontcontroller18.php/fronk.gronk
+PATH_INFO=/fronk.gronk
+--FILE_EXTERNAL--
+files/frontcontroller9.phar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'No values passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller18.php:2
+Stack trace:
+#0 %sfrontcontroller18.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller18.php on line 2
diff --git a/ext/phar/tests/cache_list/frontcontroller19.phpt b/ext/phar/tests/cache_list/frontcontroller19.phpt
new file mode 100644
index 0000000..bed0b1d
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller19.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller $_SERVER munging failure 2 [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller19.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller19.php
+REQUEST_URI=/frontcontroller19.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller10.phar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Too many values passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller19.php:2
+Stack trace:
+#0 %sfrontcontroller19.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller19.php on line 2
diff --git a/ext/phar/tests/cache_list/frontcontroller2.phpt b/ext/phar/tests/cache_list/frontcontroller2.phpt
new file mode 100644
index 0000000..67ccfc1
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller2.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller PHP test [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list=frontcontroller2.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller2.php
+REQUEST_URI=/frontcontroller2.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+hio
diff --git a/ext/phar/tests/cache_list/frontcontroller20.phpt b/ext/phar/tests/cache_list/frontcontroller20.phpt
new file mode 100644
index 0000000..bf333c7
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller20.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller $_SERVER munging failure 3 [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller20.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller20.php
+REQUEST_URI=/frontcontroller20.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller11.phar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Non-string value passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller20.php:2
+Stack trace:
+#0 %sfrontcontroller20.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller20.php on line 2
diff --git a/ext/phar/tests/cache_list/frontcontroller21.phpt b/ext/phar/tests/cache_list/frontcontroller21.phpt
new file mode 100644
index 0000000..829f298
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller21.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Phar front controller $_SERVER munging success [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller21.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller21.php
+REQUEST_URI=/frontcontroller21.php/index.php?test=hi
+PATH_INFO=/index.php
+QUERY_STRING=test=hi
+--FILE_EXTERNAL--
+files/frontcontroller12.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+%unicode|string%(10) "/index.php"
+string(10) "/index.php"
+string(%d) "phar://%sfrontcontroller21.php/index.php"
+string(18) "/index.php?test=hi"
+string(32) "/frontcontroller21.php/index.php"
+string(22) "/frontcontroller21.php"
+string(%d) "%sfrontcontroller21.php"
+string(40) "/frontcontroller21.php/index.php?test=hi" \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller22.phpt b/ext/phar/tests/cache_list/frontcontroller22.phpt
new file mode 100644
index 0000000..2769b01
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller22.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Phar front controller include from cwd test 1 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller22.phpt
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller22.php
+REQUEST_URI=/frontcontroller22.php/index.php
+PATH_INFO=/index.php
+--FILE_EXTERNAL--
+files/frontcontroller13.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+%string|unicode%(4) "test"
+%string|unicode%(12) "oof/test.php"
+
+Warning: include(./hi.php): failed to open stream: No such file or directory in phar://%s/oof/test.php on line %d
+
+Warning: include(): Failed opening './hi.php' for inclusion (include_path='%s') in phar://%soof/test.php on line %d \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller23.phpt b/ext/phar/tests/cache_list/frontcontroller23.phpt
new file mode 100644
index 0000000..3da9631
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller23.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller with generic action router test [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller23.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller23.php
+REQUEST_URI=/frontcontroller23.php/hi/there
+PATH_INFO=/hi/there
+--FILE_EXTERNAL--
+files/frontcontroller14.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+string(9) "/hi/there"
+string(%d) "phar://%sfrontcontroller23.php/html/index.php" \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller24.phpt b/ext/phar/tests/cache_list/frontcontroller24.phpt
new file mode 100644
index 0000000..561826b
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller24.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller with custom 404 php script [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller24.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller24.php
+REQUEST_URI=/frontcontroller24.php/unknown/file
+PATH_INFO=/unknown/file
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+My 404 is rawesome \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller25.phpt b/ext/phar/tests/cache_list/frontcontroller25.phpt
new file mode 100644
index 0000000..a877939
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller25.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller with extra path_info [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller25.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller25.php
+REQUEST_URI=/frontcontroller25.php/a1.phps/extra/stuff
+PATH_INFO=/a1.phps/extra/stuff
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+string(42) "/frontcontroller25.php/a1.phps/extra/stuff"
+string(12) "/extra/stuff" \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller26.phpt b/ext/phar/tests/cache_list/frontcontroller26.phpt
new file mode 100644
index 0000000..86a1c14
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller26.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with unknown extension mime type [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller26.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller26.php
+REQUEST_URI=/frontcontroller26.php/unknown.ext
+PATH_INFO=/unknown.ext
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: application/octet-stream
+--EXPECTF--
+<?php var_dump("hi"); \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller27.phpt b/ext/phar/tests/cache_list/frontcontroller27.phpt
new file mode 100644
index 0000000..4a76e02
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller27.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller with no extension [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller27.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller27.php
+REQUEST_URI=/frontcontroller27.php/noext
+PATH_INFO=/noext
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/plain;charset=UTF-8
+--EXPECTF--
+hi \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller28.phpt b/ext/phar/tests/cache_list/frontcontroller28.phpt
new file mode 100644
index 0000000..80059a9
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller28.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller with huge file [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller28.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller28.php
+REQUEST_URI=/frontcontroller28.php/bigfile.txt
+PATH_INFO=/bigfile.txt
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/plain;charset=UTF-8
+--EXPECT--
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
diff --git a/ext/phar/tests/cache_list/frontcontroller29.phpt b/ext/phar/tests/cache_list/frontcontroller29.phpt
new file mode 100644
index 0000000..1cd8f96
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller29.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller with fatal error in php file [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller29.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller29.php
+REQUEST_URI=/frontcontroller29.php/fatalerror.phps
+PATH_INFO=/fatalerror.phps
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps on line 1 \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller3.phpt b/ext/phar/tests/cache_list/frontcontroller3.phpt
new file mode 100644
index 0000000..1c1b479
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller3.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Phar front controller phps [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller3.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller3.php
+REQUEST_URI=/frontcontroller3.php/a.phps
+PATH_INFO=/a.phps
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+<code><span style="color: #000000">
+<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
+</span>
+</code>
diff --git a/ext/phar/tests/cache_list/frontcontroller30.phpt b/ext/phar/tests/cache_list/frontcontroller30.phpt
new file mode 100644
index 0000000..5a63da8
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller30.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar front controller with weird SCRIPT_NAME [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller30.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/huh?
+REQUEST_URI=/huh?
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTF--
+oops did not run
+%a \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller31.phpt b/ext/phar/tests/cache_list/frontcontroller31.phpt
new file mode 100644
index 0000000..9ef1221
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller31.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with invalid callback for rewrites [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller31.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller31.php
+REQUEST_URI=/frontcontroller31.php
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--FILE_EXTERNAL--
+files/frontcontroller16.phar
+--EXPECT--
+phar error: invalid rewrite callback \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller32.phpt b/ext/phar/tests/cache_list/frontcontroller32.phpt
new file mode 100644
index 0000000..5911690
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller32.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with valid callback that is not good [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller32.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller32.php
+REQUEST_URI=/frontcontroller32.php
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--FILE_EXTERNAL--
+files/frontcontroller17.phar
+--EXPECTF--
+%ahar error: failed to call rewrite callback \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller33.phpt b/ext/phar/tests/cache_list/frontcontroller33.phpt
new file mode 100644
index 0000000..9573854
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller33.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with valid callback that does not return any value [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller33.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller33.php
+REQUEST_URI=/frontcontroller33.php
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--FILE_EXTERNAL--
+files/frontcontroller18.phar
+--EXPECTF--
+phar error: rewrite callback must return a string or false \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller34.phpt b/ext/phar/tests/cache_list/frontcontroller34.phpt
new file mode 100644
index 0000000..83c22f5
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller34.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Phar front controller with cwd [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller34.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller34.php
+REQUEST_URI=/frontcontroller34.php/start/index.php
+PATH_INFO=/start/index.php
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--FILE_EXTERNAL--
+files/frontcontroller19.phar
+--EXPECT--
+start/index.php
+start/another.php
+another.php
diff --git a/ext/phar/tests/cache_list/frontcontroller4.phpt b/ext/phar/tests/cache_list/frontcontroller4.phpt
new file mode 100644
index 0000000..5cf3682
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller4.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar front controller index.php relocate (no /) [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller4.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller4.php
+REQUEST_URI=/frontcontroller4.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller4.php/index.php
+--EXPECT--
diff --git a/ext/phar/tests/cache_list/frontcontroller5.phpt b/ext/phar/tests/cache_list/frontcontroller5.phpt
new file mode 100644
index 0000000..2c738d7
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller5.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller index.php relocate [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller5.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller5.php
+REQUEST_URI=/frontcontroller5.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller5.php/index.php
+--EXPECT--
diff --git a/ext/phar/tests/cache_list/frontcontroller6.phpt b/ext/phar/tests/cache_list/frontcontroller6.phpt
new file mode 100644
index 0000000..2480be4
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller6.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Phar front controller 404 [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller6.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller6.php
+REQUEST_URI=/frontcontroller6.php/notfound.php
+PATH_INFO=/notfound.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Status: 404 Not Found
+--EXPECT--
+<html>
+ <head>
+ <title>File Not Found</title>
+ </head>
+ <body>
+ <h1>404 - File /notfound.php Not Found</h1>
+ </body>
+</html> \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller7.phpt b/ext/phar/tests/cache_list/frontcontroller7.phpt
new file mode 100644
index 0000000..a8a88a9
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller7.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller alternate index file [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller7.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller7.php
+REQUEST_URI=/frontcontroller7.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller2.phar
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller7.php/a.php
+--EXPECT--
diff --git a/ext/phar/tests/cache_list/frontcontroller8.phpt b/ext/phar/tests/cache_list/frontcontroller8.phpt
new file mode 100644
index 0000000..bf9b390
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller8.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Phar front controller no index file 404 [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller8.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller8.php
+REQUEST_URI=/frontcontroller8.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller3.phar
+--EXPECTHEADERS--
+Status: 404 Not Found
+--EXPECT--
+<html>
+ <head>
+ <title>File Not Found</title>
+ </head>
+ <body>
+ <h1>404 - File /index.php Not Found</h1>
+ </body>
+</html> \ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller9.phpt b/ext/phar/tests/cache_list/frontcontroller9.phpt
new file mode 100644
index 0000000..1a8b916
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller9.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Phar front controller rewrite array [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller9.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller9.php
+REQUEST_URI=/frontcontroller9.php/hi
+PATH_INFO=/hi
+--FILE_EXTERNAL--
+files/frontcontroller3.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+<code><span style="color: #000000">
+<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
+</span>
+</code> \ No newline at end of file
diff --git a/ext/phar/tests/cached_manifest_1.phpt b/ext/phar/tests/cached_manifest_1.phpt
new file mode 100644
index 0000000..af58523
--- /dev/null
+++ b/ext/phar/tests/cached_manifest_1.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Phar: phar.cache_list basic read test
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.cache_list={PWD}/files/nophar.phar
+--FILE--
+<?php
+$pname = 'phar://' . dirname(__FILE__) . '/files/nophar.phar';
+var_dump(file_get_contents($pname . '/b/c.php'));
+$a = opendir($pname);
+while (false !== ($b = readdir($a))) {
+var_dump($b);
+}
+foreach (new RecursiveIteratorIterator(new Phar($pname)) as $f) {
+ var_dump($f->getPathName());
+}
+var_dump(is_dir($pname . '/b'));
+var_dump(is_dir($pname . '/d'));
+var_dump(is_dir($pname . '/b/c.php'));
+?>
+===DONE===
+--EXPECTF--
+string(131) "<?php echo "in b\n";$a = fopen("index.php", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";"
+string(1) "b"
+string(1) "d"
+string(9) "index.php"
+string(7) "web.php"
+string(%d) "phar://%snophar.phar/b%cc.php"
+string(%d) "phar://%snophar.phar%cd"
+string(%d) "phar://%snophar.phar%cindex.php"
+string(%d) "phar://%snophar.phar%cweb.php"
+bool(true)
+bool(false)
+bool(false)
+===DONE===
diff --git a/ext/phar/tests/cached_manifest_1U.phpt b/ext/phar/tests/cached_manifest_1U.phpt
new file mode 100644
index 0000000..df77f07
--- /dev/null
+++ b/ext/phar/tests/cached_manifest_1U.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Phar: phar.cache_list basic read test
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.cache_list={PWD}/files/nophar.phar
+--FILE--
+<?php
+$pname = 'phar://' . dirname(__FILE__) . '/files/nophar.phar';
+var_dump(file_get_contents($pname . '/b/c.php'));
+$a = opendir($pname);
+while (false !== ($b = readdir($a))) {
+var_dump($b);
+}
+foreach (new RecursiveIteratorIterator(new Phar($pname)) as $f) {
+ var_dump($f->getPathName());
+}
+var_dump(is_dir($pname . '/b'));
+var_dump(is_dir($pname . '/d'));
+var_dump(is_dir($pname . '/b/c.php'));
+?>
+===DONE===
+--EXPECTF--
+string(131) "<?php echo "in b\n";$a = fopen("index.php", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";"
+unicode(1) "b"
+unicode(1) "d"
+unicode(9) "index.php"
+unicode(7) "web.php"
+string(%d) "phar://%snophar.phar/b%cc.php"
+string(%d) "phar://%snophar.phar%cd"
+string(%d) "phar://%snophar.phar%cindex.php"
+string(%d) "phar://%snophar.phar%cweb.php"
+bool(true)
+bool(false)
+bool(false)
+===DONE===
diff --git a/ext/phar/tests/create_new_and_modify.phpt b/ext/phar/tests/create_new_and_modify.phpt
new file mode 100644
index 0000000..d6c469d
--- /dev/null
+++ b/ext/phar/tests/create_new_and_modify.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Phar: create and modify phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=1
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+
+@unlink($fname);
+
+file_put_contents($pname . '/a.php', "brand new!\n");
+
+$phar = new Phar($fname);
+$sig1 = $phar->getSignature();
+
+include $pname . '/a.php';
+
+file_put_contents($pname .'/a.php', "modified!\n");
+file_put_contents($pname .'/b.php', "another!\n");
+
+$phar = new Phar($fname);
+$sig2 = $phar->getSignature();
+
+var_dump($sig1[b'hash']);
+var_dump($sig2[b'hash']);
+var_dump($sig1[b'hash'] != $sig2[b'hash']);
+
+include $pname . '/a.php';
+include $pname . '/b.php';
+
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+brand new!
+string(40) "%s"
+string(40) "%s"
+bool(true)
+modified!
+another!
+===DONE===
diff --git a/ext/phar/tests/create_new_phar.phpt b/ext/phar/tests/create_new_phar.phpt
new file mode 100644
index 0000000..ec57c27
--- /dev/null
+++ b/ext/phar/tests/create_new_phar.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar: create a completely new phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=1
+--FILE--
+<?php
+
+file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php',
+ 'brand new!');
+include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+brand new!
+===DONE===
diff --git a/ext/phar/tests/create_new_phar_b.phpt b/ext/phar/tests/create_new_phar_b.phpt
new file mode 100644
index 0000000..39fc31e
--- /dev/null
+++ b/ext/phar/tests/create_new_phar_b.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Phar: create a completely new phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=1
+--FILE--
+<?php
+
+file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php',
+ 'brand new!');
+include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+
+Warning: file_put_contents(phar://%screate_new_phar_b.phar.php/a.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %screate_new_phar_b.php on line %d
+
+Warning: include(phar://%screate_new_phar_b.phar.php/a.php): failed to open stream: %s in %screate_new_phar_b.php on line %d
+
+Warning: include(): Failed opening 'phar://%screate_new_phar_b.phar.php/a.php' for inclusion (include_path='%s') in %screate_new_phar_b.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/create_new_phar_c.phpt b/ext/phar/tests/create_new_phar_c.phpt
new file mode 100644
index 0000000..6beaa2e
--- /dev/null
+++ b/ext/phar/tests/create_new_phar_c.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Phar: create a completely new phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=1
+--FILE--
+<?php
+
+file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php',
+ 'brand new!');
+
+$phar = new Phar(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php');
+
+var_dump($phar->getSignature());
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+array(2) {
+ ["hash"]=>
+ string(40) "%s"
+ ["hash_type"]=>
+ string(5) "SHA-1"
+}
+===DONE===
diff --git a/ext/phar/tests/create_path_error.phpt b/ext/phar/tests/create_path_error.phpt
new file mode 100644
index 0000000..d3fc035
--- /dev/null
+++ b/ext/phar/tests/create_path_error.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Phar: create with illegal path
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=1
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+
+@unlink($fname);
+
+file_put_contents($pname . '/a.php?', "query");
+file_put_contents($pname . '/b.php?bla', "query");
+
+var_dump(file_get_contents($pname . '/a.php'));
+var_dump(file_get_contents($pname . '/b.php'));
+
+function error_handler($errno, $errmsg)
+{
+ echo "Error: $errmsg\n";
+}
+
+set_error_handler('error_handler');
+
+$checks = array('/', '.', '../', 'a/..', 'a/', 'b//a.php');
+foreach($checks as $check)
+{
+ file_put_contents($pname . '/' . $check, "error");
+}
+
+$phar = new Phar($fname);
+$checks = array("a\0");
+foreach($checks as $check)
+{
+ try
+ {
+ $phar[$check] = 'error';
+ }
+ catch(Exception $e)
+ {
+ echo 'Exception: ' . $e->getMessage() . "\n";
+ }
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+string(5) "query"
+string(5) "query"
+Error: file_put_contents(phar://%s//): failed to open stream: phar error: file "" in phar "%s" cannot be empty
+Error: file_put_contents(phar://%s/.): failed to open stream: phar error: file "" in phar "%s" cannot be empty
+Error: file_put_contents(phar://%s/../): failed to open stream: phar error: file "" in phar "%s" cannot be empty
+Error: file_put_contents(phar://%s/a/..): failed to open stream: phar error: file "" in phar "%s" cannot be empty
+Exception: Entry a does not exist and cannot be created: phar error: invalid path "a" contains illegal character
+===DONE===
diff --git a/ext/phar/tests/delete.phpt b/ext/phar/tests/delete.phpt
new file mode 100644
index 0000000..1d98509
--- /dev/null
+++ b/ext/phar/tests/delete.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Phar: delete test
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = 'a';
+include 'files/phar_test.inc';
+include $fname;
+$phar = new Phar($fname);
+
+echo file_get_contents($pname . '/a') . "\n";
+$phar->delete('a');
+echo file_get_contents($pname . '/a') . "\n";
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+a
+
+Warning: file_get_contents(phar://%sdelete.phar.php/a): failed to open stream: phar error: "a" is not a file in phar "%sdelete.phar.php" in %sdelete.php on line 16 \ No newline at end of file
diff --git a/ext/phar/tests/delete_in_phar.phpt b/ext/phar/tests/delete_in_phar.phpt
new file mode 100644
index 0000000..4842d27
--- /dev/null
+++ b/ext/phar/tests/delete_in_phar.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Phar: delete a file within a .phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+include 'files/phar_test.inc';
+
+include $pname . '/a.php';
+include $pname . '/b.php';
+include $pname . '/b/c.php';
+unlink($pname . '/b/c.php');
+?>
+===AFTER===
+<?php
+include $pname . '/a.php';
+include $pname . '/b.php';
+include $pname . '/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+This is a
+This is b
+This is b/c
+===AFTER===
+This is a
+This is b
+
+Warning: include(%sdelete_in_phar.phar.php/b/c.php): failed to open stream: phar error: "b/c.php" is not a file in phar "%sdelete_in_phar.phar.php" in %sdelete_in_phar.php on line %d
+
+Warning: include(): Failed opening 'phar://%sdelete_in_phar.phar.php/b/c.php' for inclusion (include_path='%s') in %sdelete_in_phar.php on line %d
+
+===DONE===
+ \ No newline at end of file
diff --git a/ext/phar/tests/delete_in_phar_b.phpt b/ext/phar/tests/delete_in_phar_b.phpt
new file mode 100644
index 0000000..a6d5b3a
--- /dev/null
+++ b/ext/phar/tests/delete_in_phar_b.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Phar: delete a file within a .phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+include 'files/phar_test.inc';
+
+include $pname . '/a.php';
+include $pname . '/b.php';
+include $pname . '/b/c.php';
+unlink($pname . '/b/c.php');
+?>
+===AFTER===
+<?php
+include $pname . '/a.php';
+include $pname . '/b.php';
+include $pname . '/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+This is a
+This is b
+This is b/c
+
+Warning: unlink(): phar error: write operations disabled by the php.ini setting phar.readonly in %sdelete_in_phar_b.php on line %d
+===AFTER===
+This is a
+This is b
+This is b/c
+
+===DONE===
diff --git a/ext/phar/tests/delete_in_phar_confirm.phpt b/ext/phar/tests/delete_in_phar_confirm.phpt
new file mode 100644
index 0000000..13a8d0d
--- /dev/null
+++ b/ext/phar/tests/delete_in_phar_confirm.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Phar: delete a file within a .phar (confirm disk file is changed)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+include 'files/phar_test.inc';
+
+include $pname . '/a.php';
+include $pname . '/b.php';
+include $pname . '/b/c.php';
+$md5 = md5_file($fname);
+unlink($pname . '/b/c.php');
+clearstatcache();
+$md52 = md5_file($fname);
+if ($md5 == $md52) echo 'file was not modified';
+?>
+===AFTER===
+<?php
+include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php';
+include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/b.php';
+include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+This is a
+This is b
+This is b/c
+===AFTER===
+This is a
+This is b
+
+Warning: include(%sdelete_in_phar_confirm.phar.php/b/c.php): failed to open stream: phar error: "b/c.php" is not a file in phar "%sdelete_in_phar_confirm.phar.php" in %sdelete_in_phar_confirm.php on line %d
+
+Warning: include(): Failed opening 'phar://%sdelete_in_phar_confirm.phar.php/b/c.php' for inclusion (include_path='%s') in %sdelete_in_phar_confirm.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/dir.phpt b/ext/phar/tests/dir.phpt
new file mode 100644
index 0000000..a8f9d3f
--- /dev/null
+++ b/ext/phar/tests/dir.phpt
@@ -0,0 +1,92 @@
+--TEST--
+Phar: mkdir/rmdir test
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php';
+$pname2 = 'phar://' . $fname2;
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php';
+$pname3 = 'phar://' . $fname3;
+$phar = new Phar($fname);
+var_dump($phar->isFileFormat(Phar::PHAR));
+
+$phar->addEmptyDir('test');
+var_dump($phar['test']->isDir());
+var_dump($phar['test/']->isDir());
+copy($fname, $fname2);
+mkdir($pname . '/another/dir/');
+var_dump($phar['another/dir']->isDir());
+rmdir($pname . '/another/dir/');
+copy($fname, $fname3);
+clearstatcache();
+var_dump(file_exists($pname . '/another/dir/'));
+var_dump(file_exists($pname2 . '/test/'));
+var_dump(file_exists($pname3 . '/another/dir/'));
+ini_set('phar.readonly', 1);
+mkdir($pname . '/fails');
+ini_set('phar.readonly', 0);
+// create new phar by mkdir
+mkdir('phar://' . dirname(__FILE__) . '/ok.phar/fails');
+mkdir('phar://' . dirname(__FILE__) . '/ok.phar/fails');
+file_put_contents('phar://' . dirname(__FILE__) . '/ok.phar/sub/directory.txt', 'hi');
+mkdir('phar://' . dirname(__FILE__) . '/ok.phar/sub');
+mkdir('phar://' . dirname(__FILE__) . '/ok.phar/sub/directory.txt');
+file_put_contents(dirname(__FILE__) . '/oops.phar', '<?php this should screw em up __HALT_COMPILER();');
+mkdir('phar://' . dirname(__FILE__) . '/oops.phar/fails');
+
+mkdir('phar://');
+rmdir('phar://');
+rmdir('phar://' . dirname(__FILE__) . '/unknown.phar/hi');
+ini_set('phar.readonly', 1);
+rmdir($pname . '/another/dir');
+ini_set('phar.readonly', 0);
+rmdir($pname);
+rmdir($pname . '/');
+mkdir($pname . '/');
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/ok.phar'); ?>
+<?php unlink(dirname(__FILE__) . '/oops.phar'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?>
+--EXPECTF--
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+
+Warning: mkdir(): phar error: cannot create directory "phar://%sdir.phar.php/fails", write operations disabled in %sdir.php on line %d
+
+Warning: mkdir(): phar error: cannot create directory "fails" in phar "%sok.phar", directory already exists in %sdir.php on line %d
+
+Warning: mkdir(): phar error: cannot create directory "sub" in phar "%sok.phar", directory already exists in %sdir.php on line %d
+
+Warning: mkdir(): phar error: cannot create directory "sub/directory.txt" in phar "%sok.phar", phar error: path "sub/directory.txt" exists and is a not a directory in %sdir.php on line %d
+
+Warning: mkdir(): internal corruption of phar "%soops.phar" (truncated manifest at stub end) in %sdir.php on line %d
+
+Warning: mkdir(): phar error: cannot create directory "phar://", no phar archive specified in %sdir.php on line %d
+
+Warning: rmdir(): phar error: cannot remove directory "phar://", no phar archive specified, or phar archive does not exist in %sdir.php on line %d
+
+Warning: rmdir(): phar error: cannot remove directory "hi" in phar "%sunknown.phar", directory does not exist in %sdir.php on line %d
+
+Warning: rmdir(): phar error: cannot rmdir directory "phar://%sdir.phar.php/another/dir", write operations disabled in %sdir.php on line %d
+
+Warning: rmdir(): phar error: cannot remove directory "" in phar "%sdir.phar.php", directory does not exist in %sdir.php on line %d
+
+Warning: rmdir(): phar error: cannot remove directory "" in phar "%sdir.phar.php", directory does not exist in %sdir.php on line %d
+
+Warning: mkdir(): phar error: cannot create directory "" in phar "%sdir.phar.php", phar error: invalid path "" must not be empty in %sdir.php on line %d
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/fatal_error_webphar.phpt b/ext/phar/tests/fatal_error_webphar.phpt
new file mode 100644
index 0000000..dd6e096
--- /dev/null
+++ b/ext/phar/tests/fatal_error_webphar.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar web-based phar with fatal error
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/fatal_error_webphar.php
+REQUEST_URI=/fatal_error_webphar.php/index.php
+PATH_INFO=/index.php
+--FILE_EXTERNAL--
+files/pear2coverage.phar.php
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+string(9) "\Web\View"
+
+Parse error: syntax error, unexpected %s, expecting %s in phar://%r([A-Za-z]:)?%r/%sfatal_error_webphar.php/Web/View.php on line 380
diff --git a/ext/phar/tests/fgc_edgecases.phpt b/ext/phar/tests/fgc_edgecases.phpt
new file mode 100644
index 0000000..2699834
--- /dev/null
+++ b/ext/phar/tests/fgc_edgecases.phpt
@@ -0,0 +1,99 @@
+--TEST--
+Phar: test edge cases of file_get_contents() function interception
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+Phar::interceptFileFuncs();
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+
+file_get_contents(array());
+chdir(dirname(__FILE__));
+file_put_contents($fname, "blah\n");
+file_put_contents("foob", "test\n");
+echo file_get_contents($fname);
+unlink($fname);
+mkdir($pname . '/oops');
+
+file_put_contents($pname . '/foo/hi', '<?php
+echo file_get_contents("foo/" . basename(__FILE__));
+$context = stream_context_create();
+file_get_contents("./hi", 0, $context, 0, -1);
+echo file_get_contents("foob");
+set_include_path("' . addslashes(dirname(__FILE__)) . '");
+echo file_get_contents("foob", true);
+echo file_get_contents("./hi", 0, $context);
+echo file_get_contents("../oops");
+echo file_get_contents("./hi", 0, $context, 50000);
+echo file_get_contents("./hi");
+echo file_get_contents("./hi", 0, $context, 0, 0);
+?>
+');
+
+include $pname . '/foo/hi';
+
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php rmdir(dirname(__FILE__) . '/poo'); ?>
+<?php unlink(dirname(__FILE__) . '/foob'); ?>
+--EXPECTF--
+Warning: file_get_contents() expects parameter 1 to be a valid path, array given in %sfgc_edgecases.php on line %d
+blah
+<?php
+echo file_get_contents("foo/" . basename(__FILE__));
+$context = stream_context_create();
+file_get_contents("./hi", 0, $context, 0, -1);
+echo file_get_contents("foob");
+set_include_path("%stests");
+echo file_get_contents("foob", true);
+echo file_get_contents("./hi", 0, $context);
+echo file_get_contents("../oops");
+echo file_get_contents("./hi", 0, $context, 50000);
+echo file_get_contents("./hi");
+echo file_get_contents("./hi", 0, $context, 0, 0);
+?>
+
+Warning: file_get_contents(): length must be greater than or equal to zero in phar://%sfgc_edgecases.phar.php/foo/hi on line %d
+test
+test
+<?php
+echo file_get_contents("foo/" . basename(__FILE__));
+$context = stream_context_create();
+file_get_contents("./hi", 0, $context, 0, -1);
+echo file_get_contents("foob");
+set_include_path("%stests");
+echo file_get_contents("foob", true);
+echo file_get_contents("./hi", 0, $context);
+echo file_get_contents("../oops");
+echo file_get_contents("./hi", 0, $context, 50000);
+echo file_get_contents("./hi");
+echo file_get_contents("./hi", 0, $context, 0, 0);
+?>
+
+Warning: file_get_contents(phar://%sfgc_edgecases.phar.php/oops): failed to open stream: phar error: path "oops" is a directory in phar://%sfgc_edgecases.phar.php/foo/hi on line %d
+
+Warning: file_get_contents(): Failed to seek to position 50000 in the stream in phar://%sfgc_edgecases.phar.php/foo/hi on line %d
+<?php
+echo file_get_contents("foo/" . basename(__FILE__));
+$context = stream_context_create();
+file_get_contents("./hi", 0, $context, 0, -1);
+echo file_get_contents("foob");
+set_include_path("%stests");
+echo file_get_contents("foob", true);
+echo file_get_contents("./hi", 0, $context);
+echo file_get_contents("../oops");
+echo file_get_contents("./hi", 0, $context, 50000);
+echo file_get_contents("./hi");
+echo file_get_contents("./hi", 0, $context, 0, 0);
+?>
+===DONE===
diff --git a/ext/phar/tests/file_get_contents.phpt b/ext/phar/tests/file_get_contents.phpt
new file mode 100644
index 0000000..fcc9d64
--- /dev/null
+++ b/ext/phar/tests/file_get_contents.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Phar: test file_get_contents() interception
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.require_hash=1
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$a = new Phar($fname);
+$a['index.php'] = '<?php
+echo file_get_contents("dir/file1.txt");
+echo file_get_contents("file1.txt", true);
+?>';
+$a['dir/file1.txt'] = 'hi';
+$a['dir/file2.txt'] = 'hi2';
+$a['dir/file3.txt'] = 'hi3';
+$a->setStub('<?php
+Phar::interceptFileFuncs();
+set_include_path("phar://" . __FILE__ . "/dir" . PATH_SEPARATOR . "phar://" . __FILE__);
+include "index.php";
+__HALT_COMPILER();');
+include $fname;
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+hihi===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/files/blog.phar b/ext/phar/tests/files/blog.phar
new file mode 100644
index 0000000..fd8890d
--- /dev/null
+++ b/ext/phar/tests/files/blog.phar
Binary files differ
diff --git a/ext/phar/tests/files/blog.phar.inc b/ext/phar/tests/files/blog.phar.inc
new file mode 100644
index 0000000..c2599ab
--- /dev/null
+++ b/ext/phar/tests/files/blog.phar.inc
@@ -0,0 +1,22 @@
+<?php
+
+$fname = dirname(__FILE__) . '/blog.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php
+Phar::interceptFileFuncs();
+if(file_exists(dirname(__FILE__) . "/files/config.xml")) {
+ Phar::mount("config.xml", dirname(__FILE__) . "/files/config.xml");
+}
+Phar::webPhar("blog", "index.php");
+__HALT_COMPILER(); ?>');
+$phar['index.php'] = '<?php if (!file_exists("config.xml")) {
+ include "install.php";
+ exit;
+}
+var_dump(str_replace("\r\n", "\n", file_get_contents("config.xml")));
+?>';
+$phar['install.php'] = '<?php echo "install\n"; ?>';
+
+?>
diff --git a/ext/phar/tests/files/config.xml b/ext/phar/tests/files/config.xml
new file mode 100644
index 0000000..cf0dbc5
--- /dev/null
+++ b/ext/phar/tests/files/config.xml
@@ -0,0 +1,9 @@
+<xml version="1.0" encoding="UTF-8">
+<config>
+ <database>
+ <host>localhost</name>
+ <user>squirrel</user>
+ <pass>nuts</pass>
+ <db>hoard</db>
+ </database>
+</config>
diff --git a/ext/phar/tests/files/extracted.inc b/ext/phar/tests/files/extracted.inc
new file mode 100644
index 0000000..a6e5224
--- /dev/null
+++ b/ext/phar/tests/files/extracted.inc
@@ -0,0 +1 @@
+<?php var_dump(__FILE__); ?>
diff --git a/ext/phar/tests/files/frontcontroller.phar b/ext/phar/tests/files/frontcontroller.phar
new file mode 100644
index 0000000..626bf48
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller.phar.inc b/ext/phar/tests/files/frontcontroller.phar.inc
new file mode 100644
index 0000000..80d42e8
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller.phar.inc
@@ -0,0 +1,13 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a['index.php'] = 'here is my index';
+$a->setStub('<?php
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller10.phar b/ext/phar/tests/files/frontcontroller10.phar
new file mode 100644
index 0000000..078ce75
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller10.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller10.phar.inc b/ext/phar/tests/files/frontcontroller10.phar.inc
new file mode 100644
index 0000000..4c139db
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller10.phar.inc
@@ -0,0 +1,20 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller10.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller10.phar');
+$a['index.php'] = '<?php
+var_dump($_SERVER["PHP_SELF"]);
+var_dump($_SERVER["SCRIPT_NAME"]);
+var_dump($_SERVER["SCRIPT_FILENAME"]);
+var_dump($_SERVER["REQUEST_URI"]);
+var_dump($_SERVER["PHAR_PHP_SELF"]);
+var_dump($_SERVER["PHAR_SCRIPT_NAME"]);
+var_dump($_SERVER["PHAR_SCRIPT_FILENAME"]);
+var_dump($_SERVER["PHAR_REQUEST_URI"]);
+';
+$a->setStub('<?php
+Phar::mungServer(array("PHP_SELF", "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI", "OOPSIE"));
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller11.phar b/ext/phar/tests/files/frontcontroller11.phar
new file mode 100644
index 0000000..61ea843
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller11.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller11.phar.inc b/ext/phar/tests/files/frontcontroller11.phar.inc
new file mode 100644
index 0000000..0863508
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller11.phar.inc
@@ -0,0 +1,20 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller11.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller11.phar');
+$a['index.php'] = '<?php
+var_dump($_SERVER["PHP_SELF"]);
+var_dump($_SERVER["SCRIPT_NAME"]);
+var_dump($_SERVER["SCRIPT_FILENAME"]);
+var_dump($_SERVER["REQUEST_URI"]);
+var_dump($_SERVER["PHAR_PHP_SELF"]);
+var_dump($_SERVER["PHAR_SCRIPT_NAME"]);
+var_dump($_SERVER["PHAR_SCRIPT_FILENAME"]);
+var_dump($_SERVER["PHAR_REQUEST_URI"]);
+';
+$a->setStub('<?php
+Phar::mungServer(array(array(), "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI"));
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller12.phar b/ext/phar/tests/files/frontcontroller12.phar
new file mode 100644
index 0000000..315c290
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller12.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller12.phar.inc b/ext/phar/tests/files/frontcontroller12.phar.inc
new file mode 100644
index 0000000..f1e4645
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller12.phar.inc
@@ -0,0 +1,20 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller12.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller12.phar');
+$a['index.php'] = '<?php
+var_dump($_SERVER["PHP_SELF"]);
+var_dump($_SERVER[b"SCRIPT_NAME"]);
+var_dump($_SERVER[b"SCRIPT_FILENAME"]);
+var_dump($_SERVER[b"REQUEST_URI"]);
+var_dump($_SERVER[b"PHAR_PHP_SELF"]);
+var_dump($_SERVER[b"PHAR_SCRIPT_NAME"]);
+var_dump($_SERVER[b"PHAR_SCRIPT_FILENAME"]);
+var_dump($_SERVER[b"PHAR_REQUEST_URI"]);
+';
+$a->setStub('<?php
+Phar::mungServer(array("PHP_SELF", "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI"));
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller13.phar b/ext/phar/tests/files/frontcontroller13.phar
new file mode 100644
index 0000000..750ff27
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller13.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller13.phar.inc b/ext/phar/tests/files/frontcontroller13.phar.inc
new file mode 100644
index 0000000..0bfef46
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller13.phar.inc
@@ -0,0 +1,14 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller13.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller13.phar');
+$a['index.php'] = '<?php
+var_dump("test");
+include "oof/test.php";';
+$a['oof/test.php'] = '<?php
+var_dump("oof/test.php");
+include "./hi.php";';
+$a['oof/hi.php'] = '<?php
+var_dump("hi");';
+$a->setStub('<?php
+Phar::webPhar();
+__HALT_COMPILER();'); \ No newline at end of file
diff --git a/ext/phar/tests/files/frontcontroller14.phar b/ext/phar/tests/files/frontcontroller14.phar
new file mode 100644
index 0000000..2bca006
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller14.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller14.phar.inc b/ext/phar/tests/files/frontcontroller14.phar.inc
new file mode 100644
index 0000000..23104a6
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller14.phar.inc
@@ -0,0 +1,19 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller14.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller14.phar');
+$a['html/index.php'] = '<?php
+var_dump($_SERVER[b"PATH_INFO"]);
+var_dump($_SERVER[b"PATH_TRANSLATED"]);
+';
+$a->setStub('<?php
+function s($a)
+{
+ return "/html/index.php";
+}
+Phar::interceptFileFuncs();
+Phar::mungServer(array("PHP_SELF", "REQUEST_URI"));
+Phar::webPhar("whatever", "/html/index.php", null, array(), "s");
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller16.phar b/ext/phar/tests/files/frontcontroller16.phar
new file mode 100644
index 0000000..cce5db5
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller16.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller16.phar.inc b/ext/phar/tests/files/frontcontroller16.phar.inc
new file mode 100644
index 0000000..3c9986d
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller16.phar.inc
@@ -0,0 +1,16 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller16.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller16.phar');
+$a['index.php'] = '<?php
+echo "hi";
+';
+$a->setStub('<?php
+try {
+Phar::webPhar("test.phar", "/index.php", null, array(), array("fail", "here"));
+} catch (Exception $e) {
+die($e->getMessage() . "\n");
+}
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller17.phar b/ext/phar/tests/files/frontcontroller17.phar
new file mode 100644
index 0000000..b83d41f
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller17.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller17.phar.inc b/ext/phar/tests/files/frontcontroller17.phar.inc
new file mode 100644
index 0000000..85b8729
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller17.phar.inc
@@ -0,0 +1,16 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller17.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller17.phar');
+$a['index.php'] = '<?php
+echo "hi";
+';
+$a->setStub('<?php
+try {
+Phar::webPhar("test.phar", "/index.php", null, array(), "sort");
+} catch (Exception $e) {
+die($e->getMessage() . "\n");
+}
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller18.phar b/ext/phar/tests/files/frontcontroller18.phar
new file mode 100644
index 0000000..c447f39
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller18.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller18.phar.inc b/ext/phar/tests/files/frontcontroller18.phar.inc
new file mode 100644
index 0000000..847a713
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller18.phar.inc
@@ -0,0 +1,19 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller18.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller18.phar');
+$a['index.php'] = '<?php
+echo "hi";
+';
+$a->setStub('<?php
+function s($a)
+{
+}
+try {
+Phar::webPhar("test.phar", "/index.php", null, array(), "s");
+} catch (Exception $e) {
+die($e->getMessage() . "\n");
+}
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller19.phar b/ext/phar/tests/files/frontcontroller19.phar
new file mode 100644
index 0000000..bdf8ee1
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller19.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller19.phar.inc b/ext/phar/tests/files/frontcontroller19.phar.inc
new file mode 100644
index 0000000..ba84ac4
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller19.phar.inc
@@ -0,0 +1,25 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller19.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller19.phar');
+$a['start/index.php'] = '<?php
+echo "start/index.php\n";
+include "./another.php";
+';
+$a['start/another.php'] = '<?php
+echo "start/another.php\n";
+include "../another.php";
+?>';
+$a['another.php'] = '<?php
+echo "another.php\n";
+?>';
+$a->setStub('<?php
+set_include_path("phar://" . __FILE__);
+try {
+Phar::webPhar("test.phar", "/start/index.php");
+} catch (Exception $e) {
+die($e->getMessage() . "\n");
+}
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller2.phar b/ext/phar/tests/files/frontcontroller2.phar
new file mode 100644
index 0000000..0dd0e7f
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller2.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller2.phar.inc b/ext/phar/tests/files/frontcontroller2.phar.inc
new file mode 100644
index 0000000..653c796
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller2.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller2.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller2.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "a.php");
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller3.phar b/ext/phar/tests/files/frontcontroller3.phar
new file mode 100644
index 0000000..5c5ff9c
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller3.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller3.phar.inc b/ext/phar/tests/files/frontcontroller3.phar.inc
new file mode 100644
index 0000000..c209594
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller3.phar.inc
@@ -0,0 +1,18 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller3.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller3.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+function s($a)
+{
+ static $b = array(b"/hi" => b"a.phps");
+ if (isset($b[$a])) return $b[$a];
+ return $a;
+}
+Phar::webPhar("whatever", "/index.php", null, array(), "s");
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller4.phar b/ext/phar/tests/files/frontcontroller4.phar
new file mode 100644
index 0000000..004d1ff
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller4.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller4.phar.inc b/ext/phar/tests/files/frontcontroller4.phar.inc
new file mode 100644
index 0000000..daf807e
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller4.phar.inc
@@ -0,0 +1,18 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller4.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller4.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+function s($a)
+{
+ static $b = array(b"/hi" => false);
+ if (isset($b[$a])) return $b[$a];
+ return $a;
+}
+Phar::webPhar("whatever", "index.php", null, array(), "s");
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller5.phar b/ext/phar/tests/files/frontcontroller5.phar
new file mode 100644
index 0000000..4dee4e3
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller5.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller5.phar.inc b/ext/phar/tests/files/frontcontroller5.phar.inc
new file mode 100644
index 0000000..d2d810c
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller5.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller5.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller5.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", null, array(0 => "oops"));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller6.phar b/ext/phar/tests/files/frontcontroller6.phar
new file mode 100644
index 0000000..f4a8265
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller6.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller6.phar.inc b/ext/phar/tests/files/frontcontroller6.phar.inc
new file mode 100644
index 0000000..61f7807
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller6.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller6.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller6.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", null, array("php" => 100));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller7.phar b/ext/phar/tests/files/frontcontroller7.phar
new file mode 100644
index 0000000..07884b2
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller7.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller7.phar.inc b/ext/phar/tests/files/frontcontroller7.phar.inc
new file mode 100644
index 0000000..f2bd72b
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller7.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller7.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller7.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", null, array("php" => null));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller8.phar b/ext/phar/tests/files/frontcontroller8.phar
new file mode 100644
index 0000000..27280a3
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller8.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller8.phar.inc b/ext/phar/tests/files/frontcontroller8.phar.inc
new file mode 100644
index 0000000..8629f08
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller8.phar.inc
@@ -0,0 +1,19 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller8.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller8.phar');
+$a['a.phps'] = 'hio1';
+$a['a1.phps'] = '<?php var_dump($_SERVER[b"REQUEST_URI"], $_SERVER[b"PATH_INFO"]);';
+$a['a.jpg'] = 'hio2';
+$a['a.php'] = '<?php function hio(){}';
+$a['fronk.gronk'] = 'hio3';
+$a['404.php'] = 'My 404 is rawesome';
+$a['noext'] = 'hi';
+$a['unknown.ext'] = '<?php var_dump("hi");';
+$a['bigfile.txt'] = str_repeat('a', 8193);
+$a['fatalerror.phps'] = '<?php oopsie_daisy();';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", "404.php", array("jpg" => "foo/bar", "phps" => Phar::PHP, "php" => Phar::PHPS));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/frontcontroller9.phar b/ext/phar/tests/files/frontcontroller9.phar
new file mode 100644
index 0000000..39ca28c
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller9.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller9.phar.inc b/ext/phar/tests/files/frontcontroller9.phar.inc
new file mode 100644
index 0000000..00861f6
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller9.phar.inc
@@ -0,0 +1,14 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller9.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller9.phar');
+$a['a.phps'] = 'hio1';
+$a['a.jpg'] = 'hio2';
+$a['a.php'] = '<?php function hio(){}';
+$a['fronk.gronk'] = 'hio3';
+$a->setStub('<?php
+Phar::mungServer(array());
+Phar::webPhar("whatever", "index.php", null, array("jpg" => "foo/bar", "phps" => Phar::PHP, "php" => Phar::PHPS));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/files/include_path.phar b/ext/phar/tests/files/include_path.phar
new file mode 100644
index 0000000..89fa1f8
--- /dev/null
+++ b/ext/phar/tests/files/include_path.phar
Binary files differ
diff --git a/ext/phar/tests/files/include_path.phar.inc b/ext/phar/tests/files/include_path.phar.inc
new file mode 100644
index 0000000..448c87f
--- /dev/null
+++ b/ext/phar/tests/files/include_path.phar.inc
@@ -0,0 +1,19 @@
+<?php
+// test advanced example
+$phar = new Phar(dirname(__FILE__) . '/include_path.phar');
+$phar2 = new Phar(dirname(__FILE__) . '/include_path2.phar');
+$phar2['file1.php'] = 'file1.php
+';
+$phar2['test/file1.php'] = 'test/file1.php
+';
+$phar['hello/test.php'] = '<?php
+include "file1.php";';
+
+$phar->setStub("<?php
+set_include_path('.' . PATH_SEPARATOR . 'phar://' . dirname(__FILE__) . '/files/include_path2.phar' );
+include 'phar://' . __FILE__ . '/hello/test.php';
+set_include_path('.' . PATH_SEPARATOR . 'phar://' . dirname(__FILE__) . '/files/include_path2.phar/test');
+include 'phar://' . __FILE__ . '/hello/test.php';
+echo \"ok\\n\";
+__HALT_COMPILER();
+?>");
diff --git a/ext/phar/tests/files/include_path2.phar b/ext/phar/tests/files/include_path2.phar
new file mode 100644
index 0000000..bb0ba79
--- /dev/null
+++ b/ext/phar/tests/files/include_path2.phar
Binary files differ
diff --git a/ext/phar/tests/files/md5.phar b/ext/phar/tests/files/md5.phar
new file mode 100644
index 0000000..8ca2f84
--- /dev/null
+++ b/ext/phar/tests/files/md5.phar
Binary files differ
diff --git a/ext/phar/tests/files/nophar.phar b/ext/phar/tests/files/nophar.phar
new file mode 100644
index 0000000..4eb3083
--- /dev/null
+++ b/ext/phar/tests/files/nophar.phar
Binary files differ
diff --git a/ext/phar/tests/files/nophar.phar.inc b/ext/phar/tests/files/nophar.phar.inc
new file mode 100644
index 0000000..36d5628
--- /dev/null
+++ b/ext/phar/tests/files/nophar.phar.inc
@@ -0,0 +1,10 @@
+<?php
+$fname = dirname(__FILE__) . '/nophar.phar';
+@unlink($fname);
+$p = new Phar($fname);
+$p['index.php'] = '<?php include "b/c.php";' . "\n";
+$p['web.php'] = '<?php echo "web\n";';
+$p['b/c.php'] = '<?php echo "in b\n";$a = fopen("index.php", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";';
+$p['d'] = "in d\n";
+$p->setStub($p->createDefaultStub('index.php', 'web.php'));
+?> \ No newline at end of file
diff --git a/ext/phar/tests/files/notbogus.zip b/ext/phar/tests/files/notbogus.zip
new file mode 100644
index 0000000..19ea96f
--- /dev/null
+++ b/ext/phar/tests/files/notbogus.zip
Binary files differ
diff --git a/ext/phar/tests/files/openssl.cnf b/ext/phar/tests/files/openssl.cnf
new file mode 100644
index 0000000..10e6907
--- /dev/null
+++ b/ext/phar/tests/files/openssl.cnf
@@ -0,0 +1,43 @@
+[ req ]
+default_bits = 1024
+default_keyfile = privkey.pem
+distinguished_name = req_distinguished_name
+attributes = req_attributes
+x509_extensions = v3_ca # The extentions to add to the self signed cert
+string_mask = MASK:4294967295
+
+
+[ req_distinguished_name ]
+countryName = Country Name (2 letter code)
+countryName_default = AU
+countryName_min = 2
+countryName_max = 2
+stateOrProvinceName = State or Province Name (full name)
+stateOrProvinceName_default = Some-State
+localityName = Locality Name (eg, city)
+0.organizationName = Organization Name (eg, company)
+0.organizationName_default = Internet Widgits Pty Ltd
+organizationalUnitName = Organizational Unit Name (eg, section)
+commonName = Common Name (eg, YOUR name)
+commonName_max = 64
+emailAddress = Email Address
+emailAddress_max = 64
+
+[ req_attributes ]
+challengePassword = A challenge password
+challengePassword_min = 4
+challengePassword_max = 20
+unstructuredName = An optional company name
+
+[ v3_req ]
+basicConstraints = CA:FALSE
+keyUsage = nonRepudiation, digitalSignature, keyEncipherment
+
+[ v3_ca ]
+subjectKeyIdentifier=hash
+authorityKeyIdentifier=keyid:always,issuer:always
+basicConstraints = CA:true
+
+[ usr_cert ]
+basicConstraints=CA:FALSE
+
diff --git a/ext/phar/tests/files/openssl.phar b/ext/phar/tests/files/openssl.phar
new file mode 100644
index 0000000..f3864d7
--- /dev/null
+++ b/ext/phar/tests/files/openssl.phar
Binary files differ
diff --git a/ext/phar/tests/files/openssl.phar.pubkey b/ext/phar/tests/files/openssl.phar.pubkey
new file mode 100644
index 0000000..7dd79ac
--- /dev/null
+++ b/ext/phar/tests/files/openssl.phar.pubkey
@@ -0,0 +1,6 @@
+-----BEGIN PUBLIC KEY-----
+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA3ADUiKZIEhekYShzPCZ3LFbg
+rDuV44jH94OdJQfqaCQBvZXqMoG1bWOeYfbc3iO0gHWW3SKB27Sf1ZBnc5c1+YzB
+mx9bFipOX2W2ouKS2YoHeIoR9leDNu4yqwBsuggFPGVPxM9ikEI+YAOGVTCd4mV5
+agpkVsHLNJWbz/nPVwIDAQAB
+-----END PUBLIC KEY-----
diff --git a/ext/phar/tests/files/pear2coverage.phar.php b/ext/phar/tests/files/pear2coverage.phar.php
new file mode 100644
index 0000000..621b0d0
--- /dev/null
+++ b/ext/phar/tests/files/pear2coverage.phar.php
Binary files differ
diff --git a/ext/phar/tests/files/phar_oo_test.inc b/ext/phar/tests/files/phar_oo_test.inc
new file mode 100644
index 0000000..e92b444
--- /dev/null
+++ b/ext/phar/tests/files/phar_oo_test.inc
@@ -0,0 +1,49 @@
+<?php
+
+ini_set('date.timezone', 'GMT');
+
+$fname = dirname(__FILE__) . '/phar_oo_test.phar.php';
+$pname = 'phar://' . $fname;
+$file = (binary)'<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>';
+
+$files = array();
+
+if (!isset($pharconfig)) $pharconfig = 0;
+
+switch($pharconfig)
+{
+ default:
+ case 0:
+ $files['a.php'] = '<?php echo "This is a.php\n"; ?>';
+ $files['b.php'] = '<?php echo "This is b.php\n"; ?>';
+ $files['b/c.php'] = '<?php echo "This is b/c.php\n"; ?>';
+ $files['b/d.php'] = '<?php echo "This is b/d.php\n"; ?>';
+ $files['e.php'] = '<?php echo "This is e.php\n"; ?>';
+ break;
+ case 1:
+ $files['a.csv'] =<<<EOF
+1,2,3
+2,a,b
+3,"c","'e'"
+EOF;
+ break;
+ case 2:
+ $files['a.csv'] =<<<EOF
+1,2,3
+2,a,b
+3,"c","'e'"
+4
+5,5
+
+7,777
+EOF;
+ break;
+ case 3:
+ $files['a.php'] = '<?php echo new new class;';
+ break;
+}
+
+$ftime = mktime(12, 0, 0, 3, 1, 2006);
+include 'phar_test.inc';
+
+?> \ No newline at end of file
diff --git a/ext/phar/tests/files/phar_test.inc b/ext/phar/tests/files/phar_test.inc
new file mode 100644
index 0000000..30ccf20
--- /dev/null
+++ b/ext/phar/tests/files/phar_test.inc
@@ -0,0 +1,78 @@
+<?php
+
+if (function_exists('date_default_timezone_set')) {
+ date_default_timezone_set('UTC');
+}
+
+$manifest = (binary)'';
+$gflags = 0;
+
+foreach($files as $name => $cont)
+{
+ global $gflags, $files;
+
+ $comp = NULL;
+ $crc32= NULL;
+ $clen = NULL;
+ $ulen = NULL;
+ $time = isset($ftime) ? $ftime : @mktime(12, 0, 0, 3, 1, 2006);
+ $flags= 0;
+ $perm = 0x000001B6;
+ $meta = NULL;
+
+ // overwrite if array
+ if (is_array($cont))
+ {
+ foreach(array('comp','crc32','clen','ulen','time','flags','perm','meta','cont') as $what)
+ {
+ if (isset($cont[$what]))
+ {
+ $$what = $cont[$what];
+ }
+ }
+ }
+
+ // create if not yet done
+ if (empty($comp)) $comp = $cont;
+ if (empty($ulen)) $ulen = strlen($cont);
+ if (empty($clen)) $clen = strlen($comp);
+ if (empty($crc32))$crc32= crc32((binary)$cont);
+ if (isset($meta)) $meta = serialize($meta);
+
+ // write manifest entry
+ $manifest .= pack('V', strlen($name)) . (binary)$name;
+ $manifest .= pack('VVVVVV', $ulen, $time, $clen, $crc32, $flags|$perm, strlen($meta)) . (binary)$meta;
+
+ // globals
+ $gflags |= $flags;
+ $files[$name] = $comp;
+}
+
+if (!isset($alias)) $alias = 'hio';
+
+if (isset($pmeta)) $pmeta = serialize($pmeta); else $pmeta = '';
+
+$manifest = pack('VnVV', count($files), isset($hasdir) ? 0x1110 : 0x1000, $gflags, strlen($alias)) . (binary)$alias . pack('V', strlen($pmeta)) . (binary)$pmeta . $manifest;
+$file = (binary)$file;
+$file .= pack('V', strlen($manifest)) . $manifest;
+
+foreach($files as $cont)
+{
+ $file .= (binary)$cont;
+}
+
+file_put_contents($fname, $file);
+
+if (@$gzip) {
+ $fp = gzopen($fname, 'w');
+ fwrite($fp, $file);
+ fclose($fp);
+}
+
+if (@$bz2) {
+ $fp = bzopen($fname, 'w');
+ fwrite($fp, $file);
+ fclose($fp);
+}
+
+?> \ No newline at end of file
diff --git a/ext/phar/tests/files/private.pem b/ext/phar/tests/files/private.pem
new file mode 100644
index 0000000..e4f4883
--- /dev/null
+++ b/ext/phar/tests/files/private.pem
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDA3ADUiKZIEhekYShzPCZ3LFbgrDuV44jH94OdJQfqaCQBvZXq
+MoG1bWOeYfbc3iO0gHWW3SKB27Sf1ZBnc5c1+YzBmx9bFipOX2W2ouKS2YoHeIoR
+9leDNu4yqwBsuggFPGVPxM9ikEI+YAOGVTCd4mV5agpkVsHLNJWbz/nPVwIDAQAB
+AoGAGiS4qBbuE48ATXQuO5DH1hfYnxQ575Oskw7mdIL0k74SQ3ojvF+kXae6fVni
+UQZ76JgRWKYZa2kRDymwLZXpxVbiGL9dDvQY8ZENDtWOy9s7TDtxNixbZloKBopg
+J7G1B05LgetR3dgFnQOwt+e3kOu72RpS7thyBaUm8zHCRSECQQDw+h5uxE7i9CC8
+KHyJlwGoR28KZgrSpo74yWhQ+b1lzxQ+rk2wToFD/p+WNe/nf78YUl/cq0LngCKH
+Y7t228VLAkEAzOHzAjuDlGGzK6Kpe67iKgXd+GpKwPr9iaFfmzABOkRwQug4LCN7
+skmzCX5pzxqMZW1xNICjeDjWsMA3d4EypQJBAJyXPA1onYaXc2oxuPPD3/zVJpAQ
+TTojp8Z9Qr9T+kJdNV+h7rQB37gqjtOSiynY9nm8lbSUya4bstRd96S+HU8CQQCp
+yBAd6H2oZ7IXVeuHACyRUF1ab5LVCukxtVXJ/2T1CSPSfieWhC0MWMCR/HzoUALK
+RoBKVtOgW9GllRQh5yG1AkARVYbvj0XBy6XUpe5WZsLNWwpw1JreRsygcPXYh8bs
+nxhCdHNHJQ01lRDMjvNLtI8a5YjJE/IeW76T2mPCiJZI
+-----END RSA PRIVATE KEY-----
diff --git a/ext/phar/tests/files/sha1.phar b/ext/phar/tests/files/sha1.phar
new file mode 100644
index 0000000..c7e9e7e
--- /dev/null
+++ b/ext/phar/tests/files/sha1.phar
Binary files differ
diff --git a/ext/phar/tests/files/sha256.phar b/ext/phar/tests/files/sha256.phar
new file mode 100644
index 0000000..81459ee
--- /dev/null
+++ b/ext/phar/tests/files/sha256.phar
Binary files differ
diff --git a/ext/phar/tests/files/sha512.phar b/ext/phar/tests/files/sha512.phar
new file mode 100644
index 0000000..a747381
--- /dev/null
+++ b/ext/phar/tests/files/sha512.phar
Binary files differ
diff --git a/ext/phar/tests/files/stuboflength1041.phar b/ext/phar/tests/files/stuboflength1041.phar
new file mode 100644
index 0000000..d90fb8f
--- /dev/null
+++ b/ext/phar/tests/files/stuboflength1041.phar
Binary files differ
diff --git a/ext/phar/tests/files/stuboflength1041.phar.inc b/ext/phar/tests/files/stuboflength1041.phar.inc
new file mode 100644
index 0000000..28ce842
--- /dev/null
+++ b/ext/phar/tests/files/stuboflength1041.phar.inc
@@ -0,0 +1,21 @@
+<?php
+
+@unlink(__DIR__ . '/stuboflength1041.phar');
+
+$phar = new Phar('./stuboflength1041.phar');
+$phar['a.php'] = 'hi1';
+$phar['b.php'] = 'hi2';
+
+$phar->setStub('<?php
+/***stub of length 1041 including the halt compiler*********************************************
+************************************************************************************************
+************************************************************************************************
+************************************************************************************************
+************************************************************************************************
+************************************************************************************************
+************************************************************************************************
+************************************************************************************************
+************************************************************************************************
+************************************************************************************************
+*********************************************/
+__HALT_COMPILER();'); \ No newline at end of file
diff --git a/ext/phar/tests/files/zfapp.tgz b/ext/phar/tests/files/zfapp.tgz
new file mode 100644
index 0000000..fcaec86
--- /dev/null
+++ b/ext/phar/tests/files/zfapp.tgz
Binary files differ
diff --git a/ext/phar/tests/fopen.phpt b/ext/phar/tests/fopen.phpt
new file mode 100644
index 0000000..5b694d6
--- /dev/null
+++ b/ext/phar/tests/fopen.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Phar: test fopen() interception
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+<?php if (substr(phpversion(), 0, 3) == '5.2') die("skip PHP >= 5.3 required for this test");?>
+--INI--
+phar.require_hash=1
+phar.readonly=0
+--FILE--
+<?php
+Phar::interceptFileFuncs();
+$a = fopen(__FILE__, 'rb'); // this satisfies 1 line of code coverage
+fclose($a);
+$a = fopen(); // this satisfies another line of code coverage
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$a = new Phar($fname);
+$a['index.php'] = '<?php
+$a = fopen("dir/file1.txt", "r");
+echo fread($a, 2);
+fclose($a);
+$a = fopen("file1.txt", "r", true);
+echo fread($a, 2);
+fclose($a);
+$a = fopen("notfound.txt", "r", true);
+?>';
+$a['dir/file1.txt'] = 'hi';
+$a['dir/file2.txt'] = 'hi2';
+$a['dir/file3.txt'] = 'hi3';
+$a->setStub('<?php
+set_include_path("phar://" . __FILE__ . "/dir" . PATH_SEPARATOR . "phar://" . __FILE__);
+include "index.php";
+__HALT_COMPILER();');
+include $fname;
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+Warning: fopen() expects at least 2 parameters, 0 given in %sfopen.php on line %d
+hihi
+Warning: fopen(notfound.txt): failed to open stream: No such file or directory in phar://%sfopen.phar.php/index.php on line %d
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/fopen5.2.phpt b/ext/phar/tests/fopen5.2.phpt
new file mode 100644
index 0000000..aa064f1
--- /dev/null
+++ b/ext/phar/tests/fopen5.2.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Phar: test fopen() interception
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+<?php if (substr(phpversion(), 0, 3) != '5.2') die("skip PHP 5.2 required for this test");?>
+--INI--
+phar.require_hash=1
+phar.readonly=0
+--FILE--
+<?php
+Phar::interceptFileFuncs();
+$a = fopen(__FILE__, 'rb'); // this satisfies 1 line of code coverage
+fclose($a);
+$a = fopen(); // this satisfies another line of code coverage
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$a = new Phar($fname);
+$a['index.php'] = '<?php
+$a = fopen("dir/file1.txt", "r");
+echo fread($a, 2);
+fclose($a);
+$a = fopen("file1.txt", "r", true);
+echo fread($a, 2);
+fclose($a);
+$a = fopen("notfound.txt", "r", true);
+?>';
+$a['dir/file1.txt'] = 'hi';
+$a['dir/file2.txt'] = 'hi2';
+$a['dir/file3.txt'] = 'hi3';
+$a->setStub('<?php
+set_include_path("phar://" . __FILE__ . "/dir" . PATH_SEPARATOR . "phar://" . __FILE__);
+include "index.php";
+__HALT_COMPILER();');
+include $fname;
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+Warning: fopen() expects at least 2 parameters, 0 given in %sfopen5.2.php on line %d
+hihi
+Warning: fopen(phar://%sfopen5.2.phar.php/notfound.txt): failed to open stream: phar error: "notfound.txt" is not a file in phar "%sfopen5.2.phar.php" in phar://%sfopen5.2.phar.php/index.php on line %d
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/fopen_edgecases.phpt b/ext/phar/tests/fopen_edgecases.phpt
new file mode 100644
index 0000000..4c28ff3
--- /dev/null
+++ b/ext/phar/tests/fopen_edgecases.phpt
@@ -0,0 +1,124 @@
+--TEST--
+Phar: fopen/stat/fseek/unlink/rename edge cases
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.3.phar.php';
+$pname = 'phar://' . $fname;
+$pname2 = 'phar://' . $fname2;
+$pname3 = 'phar://' . $fname3;
+
+// create in cwd
+chdir(dirname(__FILE__));
+file_put_contents('phar://fopen_edgetest.phar/hi', 'hi');
+// append
+$a = fopen($pname . '/b/c.php', 'a');
+// invalid pharname
+$a = fopen($pname . '.phar.gz', 'r');
+// test phar_open_url() with quiet stat for code coverage
+var_dump(file_exists($pname . '.phar.gz/hi'));
+// test open for write with new phar
+$a = fopen($pname . '/hi', 'w');
+fclose($a);
+// test open for write with corrupted phar
+file_put_contents($fname2, '<?php oh crap __HALT_COMPILER();');
+$a = fopen($pname2 . '/hi', 'w');
+$a = fopen('phar://', 'r');
+$a = fopen('phar://foo.phar', 'r');
+
+file_put_contents($pname . '/hi', 'hi');
+$a = fopen($pname . '/hi', 'r');
+var_dump(fseek($a, 1), ftell($a));
+var_dump(fseek($a, 1, SEEK_CUR), ftell($a));
+fclose($a);
+
+var_dump(stat('phar://'));
+var_dump(stat('phar://foo.phar'));
+var_dump(is_dir($pname));
+
+// this tests coverage of the case where the phar exists and has no files
+$phar = new Phar($fname3);
+var_dump(file_exists($pname3 . '/test'));
+
+unlink($pname2 . '/hi');
+unlink('phar://');
+unlink('phar://foo.phar');
+unlink($pname . '/oops');
+
+rename('phar://', 'phar://');
+rename($pname . '/hi', 'phar://');
+rename('phar://foo.phar/hi', 'phar://');
+rename($pname . '/hi', 'phar://foo.phar/hi');
+
+ini_set('phar.readonly', 1);
+rename($pname . '/hi', $pname . '/there');
+ini_set('phar.readonly', 0);
+Phar::unlinkArchive($fname);
+file_put_contents($pname . '/test.php', '<?php
+$a = fopen("./notfound.php", "r");
+?>');
+include $pname . '/test.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/fopen_edgetest.phar');
+--EXPECTF--
+Warning: fopen(phar://%sfopen_edgecases.phar.php/b/c.php): failed to open stream: phar error: open mode append not supported in %sfopen_edgecases.php on line %d
+
+Warning: fopen(phar://%sfopen_edgecases.phar.php.phar.gz): failed to open stream: phar error: invalid url or non-existent phar "phar://%sfopen_edgecases.phar.php.phar.gz" in %sfopen_edgecases.php on line %d
+bool(false)
+
+Warning: fopen(phar://%sfopen_edgecases.2.phar.php/hi): failed to open stream: internal corruption of phar "%sfopen_edgecases.2.phar.php" (truncated manifest at stub end) in %sfopen_edgecases.php on line %d
+
+Warning: fopen(phar://): failed to open stream: phar error: no directory in "phar://", must have at least phar:/// for root directory (always use full path to a new phar) in %sfopen_edgecases.php on line %d
+
+Warning: fopen(phar://foo.phar): failed to open stream: %s in %sfopen_edgecases.php on line %d
+int(0)
+int(1)
+int(0)
+int(2)
+
+Warning: stat(): stat failed for phar:// in %sfopen_edgecases.php on line %d
+bool(false)
+
+Warning: stat(): stat failed for phar://foo.phar in %sfopen_edgecases.php on line %d
+bool(false)
+bool(true)
+bool(false)
+
+Warning: unlink(): internal corruption of phar "%sfopen_edgecases.2.phar.php" (truncated manifest at stub end) in %sfopen_edgecases.php on line %d
+
+Warning: unlink(): phar error: unlink failed in %sfopen_edgecases.php on line %d
+
+Warning: unlink(): phar error: no directory in "phar://", must have at least phar:/// for root directory (always use full path to a new phar) in %sfopen_edgecases.php on line %d
+
+Warning: unlink(): phar error: unlink failed in %sfopen_edgecases.php on line %d
+
+Warning: unlink(): phar error: invalid url or non-existent phar "phar://foo.phar" in %sfopen_edgecases.php on line %d
+
+Warning: unlink(): phar error: unlink failed in %sfopen_edgecases.php on line %d
+
+Warning: unlink(): unlink of "phar://%sfopen_edgecases.phar.php/oops" failed, file does not exist in %sfopen_edgecases.php on line %d
+
+Warning: rename(): phar error: cannot rename "phar://" to "phar://": invalid or non-writable url "phar://" in %sfopen_edgecases.php on line %d
+
+Warning: rename(): phar error: cannot rename "phar://%sfopen_edgecases.phar.php/hi" to "phar://": invalid or non-writable url "phar://" in %sfopen_edgecases.php on line %d
+
+Warning: rename(): phar error: cannot rename "phar://foo.phar/hi" to "phar://": invalid or non-writable url "phar://" in %sfopen_edgecases.php on line %d
+
+Warning: rename(): phar error: cannot rename "phar://%sfopen_edgecases.phar.php/hi" to "phar://foo.phar/hi", not within the same phar archive in %sfopen_edgecases.php on line %d
+
+Warning: rename(): phar error: cannot rename "phar://%sfopen_edgecases.phar.php/hi" to "phar://%sfopen_edgecases.phar.php/there": invalid or non-writable url "phar://%sfopen_edgecases.phar.php/hi" in %sfopen_edgecases.php on line %d
+
+Warning: fopen(./notfound.php): failed to open stream: No such file or directory in phar://%sfopen_edgecases.phar.php/test.php on line %d
+
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/fopen_edgecases2.phpt b/ext/phar/tests/fopen_edgecases2.phpt
new file mode 100644
index 0000000..d55c97d
--- /dev/null
+++ b/ext/phar/tests/fopen_edgecases2.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Phar: test edge cases of fopen() function interception #2
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(phpversion(), '6.0', '>=')) die('skip parameter parsing changed in 6.0'); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+Phar::interceptFileFuncs();
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+
+fopen(array(), 'r');
+chdir(dirname(__FILE__));
+file_put_contents($fname, b"blah\n");
+file_put_contents("foob", b"test\n");
+$a = fopen($fname, 'rb');
+echo fread($a, 1000);
+fclose($a);
+unlink($fname);
+mkdir($pname . '/oops');
+file_put_contents($pname . '/foo/hi', b'<?php
+$context = stream_context_create();
+$a = fopen("foob", "rb", false, $context);
+echo fread($a, 1000);
+fclose($a);
+fopen("../oops", "r");
+?>
+');
+include $pname . '/foo/hi';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php rmdir(dirname(__FILE__) . '/poo'); ?>
+<?php unlink(dirname(__FILE__) . '/foob'); ?>
+--EXPECTF--
+Warning: fopen() expects parameter 1 to be a valid path, array given in %sfopen_edgecases2.php on line %d
+blah
+test
+
+Warning: fopen(phar://%sfopen_edgecases2.phar.php/oops): failed to open stream: phar error: path "oops" is a directory in phar://%sfopen_edgecases2.phar.php/foo/hi on line %d
+===DONE===
diff --git a/ext/phar/tests/fopen_edgecases2U.phpt b/ext/phar/tests/fopen_edgecases2U.phpt
new file mode 100644
index 0000000..09c7b00
--- /dev/null
+++ b/ext/phar/tests/fopen_edgecases2U.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Phar: test edge cases of fopen() function interception #2 (PHP 6)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(PHP_VERSION, "6.0.0-dev", "<")) die("skip Unicode support required"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+Phar::interceptFileFuncs();
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+
+fopen(array(), 'r');
+chdir(dirname(__FILE__));
+file_put_contents($fname, b"blah\n");
+file_put_contents("foob", b"test\n");
+$a = fopen($fname, 'rb');
+echo fread($a, 1000);
+fclose($a);
+unlink($fname);
+mkdir($pname . '/oops');
+file_put_contents($pname . '/foo/hi', b'<?php
+$context = stream_context_create();
+$a = fopen("foob", "rb", false, $context);
+echo fread($a, 1000);
+fclose($a);
+fopen("../oops", "r");
+?>
+');
+include $pname . '/foo/hi';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php rmdir(dirname(__FILE__) . '/poo'); ?>
+<?php unlink(dirname(__FILE__) . '/foob'); ?>
+--EXPECTF--
+Notice: Array to string conversion in %sfopen_edgecases2U.php on line 6
+
+Warning: fopen(Array): failed to open stream: No such file or directory in %sfopen_edgecases2U.php on line 6
+blah
+test
+
+Warning: fopen(phar://%sfopen_edgecases2U.phar.php/oops): failed to open stream: phar error: path "oops" is a directory in phar://%sfopen_edgecases2U.phar.php/foo/hi on line 6
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/front.phar.phpt b/ext/phar/tests/front.phar.phpt
new file mode 100644
index 0000000..bab8ada
--- /dev/null
+++ b/ext/phar/tests/front.phar.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Phar front controller with mounted external file
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/front.phar.php
+REQUEST_URI=/front.phar.php/index.php
+PATH_INFO=/index.php
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--FILE_EXTERNAL--
+files/blog.phar
+--EXPECTF--
+string(%d) "<xml version="1.0" encoding="UTF-8">
+<config>
+ <database>
+ <host>localhost</name>
+ <user>squirrel</user>
+ <pass>nuts</pass>
+ <db>hoard</db>
+ </database>
+</config>
+"
diff --git a/ext/phar/tests/frontcontroller1.phpt b/ext/phar/tests/frontcontroller1.phpt
new file mode 100644
index 0000000..7093323
--- /dev/null
+++ b/ext/phar/tests/frontcontroller1.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar front controller other
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller1.php
+REQUEST_URI=/frontcontroller1.php/a.jpg
+PATH_INFO=/a.jpg
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Content-type: image/jpeg
+Content-length: 3
+--EXPECT--
+hio
diff --git a/ext/phar/tests/frontcontroller10.phpt b/ext/phar/tests/frontcontroller10.phpt
new file mode 100644
index 0000000..667d5c2
--- /dev/null
+++ b/ext/phar/tests/frontcontroller10.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Phar front controller rewrite access denied
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller10.php
+REQUEST_URI=/frontcontroller10.php/hi
+PATH_INFO=/hi
+--FILE_EXTERNAL--
+files/frontcontroller4.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+Status: 403 Access Denied
+--EXPECT--
+<html>
+ <head>
+ <title>Access Denied</title>
+ </head>
+ <body>
+ <h1>403 - File /hi Access Denied</h1>
+ </body>
+</html>
diff --git a/ext/phar/tests/frontcontroller11.phpt b/ext/phar/tests/frontcontroller11.phpt
new file mode 100644
index 0000000..1e6f1a0
--- /dev/null
+++ b/ext/phar/tests/frontcontroller11.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller mime type extension is not a string
+--INI--
+default_charset=
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller11.php
+REQUEST_URI=/frontcontroller11.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller5.phar
+--EXPECTHEADERS--
+Content-type: text/html
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Key of MIME type overrides array must be a file extension, was "0"' in %sfrontcontroller11.php:2
+Stack trace:
+#0 %sfrontcontroller11.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+ thrown in %sfrontcontroller11.php on line 2 \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller12.phpt b/ext/phar/tests/frontcontroller12.phpt
new file mode 100644
index 0000000..956ea1c
--- /dev/null
+++ b/ext/phar/tests/frontcontroller12.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Phar front controller mime type unknown int
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller12.php
+REQUEST_URI=/frontcontroller12.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller6.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Unknown mime type specifier used, only Phar::PHP, Phar::PHPS and a mime type string are allowed' in %sfrontcontroller12.php:2
+Stack trace:
+#0 %sfrontcontroller12.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+ thrown in %sfrontcontroller12.php on line 2 \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller13.phpt b/ext/phar/tests/frontcontroller13.phpt
new file mode 100644
index 0000000..717e569
--- /dev/null
+++ b/ext/phar/tests/frontcontroller13.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Phar front controller mime type not string/int
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller13.php
+REQUEST_URI=/frontcontroller13.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller7.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Unknown mime type specifier used (not a string or int), only Phar::PHP, Phar::PHPS and a mime type string are allowed' in %sfrontcontroller13.php:2
+Stack trace:
+#0 %sfrontcontroller13.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+ thrown in %sfrontcontroller13.php on line 2 \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller14.phpt b/ext/phar/tests/frontcontroller14.phpt
new file mode 100644
index 0000000..2bdb145
--- /dev/null
+++ b/ext/phar/tests/frontcontroller14.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar front controller mime type override, other
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller14.php
+REQUEST_URI=/frontcontroller14.php/a.jpg
+PATH_INFO=/a.jpg
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: foo/bar
+Content-length: 4
+--EXPECT--
+hio2
diff --git a/ext/phar/tests/frontcontroller15.phpt b/ext/phar/tests/frontcontroller15.phpt
new file mode 100644
index 0000000..3700980
--- /dev/null
+++ b/ext/phar/tests/frontcontroller15.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Phar front controller mime type override, Phar::PHPS
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller15.php
+REQUEST_URI=/frontcontroller15.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+<code><span style="color: #000000">
+<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
+</span>
+</code>
+
diff --git a/ext/phar/tests/frontcontroller16.phpt b/ext/phar/tests/frontcontroller16.phpt
new file mode 100644
index 0000000..712af40
--- /dev/null
+++ b/ext/phar/tests/frontcontroller16.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller mime type override, Phar::PHP
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller16.php
+REQUEST_URI=/frontcontroller16.php/a.phps
+PATH_INFO=/a.phps
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+hio1
+
diff --git a/ext/phar/tests/frontcontroller17.phpt b/ext/phar/tests/frontcontroller17.phpt
new file mode 100644
index 0000000..233e2e2
--- /dev/null
+++ b/ext/phar/tests/frontcontroller17.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller mime type unknown
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller17.php
+REQUEST_URI=/frontcontroller17.php/fronk.gronk
+PATH_INFO=/fronk.gronk
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: application/octet-stream
+Content-length: 4
+--EXPECT--
+hio3
+
diff --git a/ext/phar/tests/frontcontroller18.phpt b/ext/phar/tests/frontcontroller18.phpt
new file mode 100644
index 0000000..19aea45
--- /dev/null
+++ b/ext/phar/tests/frontcontroller18.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller $_SERVER munging failure
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller18.php
+REQUEST_URI=/frontcontroller18.php/fronk.gronk
+PATH_INFO=/fronk.gronk
+--FILE_EXTERNAL--
+files/frontcontroller9.phar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'No values passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller18.php:2
+Stack trace:
+#0 %sfrontcontroller18.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller18.php on line 2
diff --git a/ext/phar/tests/frontcontroller19.phpt b/ext/phar/tests/frontcontroller19.phpt
new file mode 100644
index 0000000..9adafa2
--- /dev/null
+++ b/ext/phar/tests/frontcontroller19.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller $_SERVER munging failure 2
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller19.php
+REQUEST_URI=/frontcontroller19.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller10.phar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Too many values passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller19.php:2
+Stack trace:
+#0 %sfrontcontroller19.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller19.php on line 2
diff --git a/ext/phar/tests/frontcontroller2.phpt b/ext/phar/tests/frontcontroller2.phpt
new file mode 100644
index 0000000..d0744de
--- /dev/null
+++ b/ext/phar/tests/frontcontroller2.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller PHP test
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller2.php
+REQUEST_URI=/frontcontroller2.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+hio
diff --git a/ext/phar/tests/frontcontroller20.phpt b/ext/phar/tests/frontcontroller20.phpt
new file mode 100644
index 0000000..45e2bfc
--- /dev/null
+++ b/ext/phar/tests/frontcontroller20.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller $_SERVER munging failure 3
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller20.php
+REQUEST_URI=/frontcontroller20.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller11.phar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Non-string value passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller20.php:2
+Stack trace:
+#0 %sfrontcontroller20.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller20.php on line 2
diff --git a/ext/phar/tests/frontcontroller21.phpt b/ext/phar/tests/frontcontroller21.phpt
new file mode 100644
index 0000000..bf50c6e
--- /dev/null
+++ b/ext/phar/tests/frontcontroller21.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Phar front controller $_SERVER munging success
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller21.php
+REQUEST_URI=/frontcontroller21.php/index.php?test=hi
+PATH_INFO=/index.php
+QUERY_STRING=test=hi
+--FILE_EXTERNAL--
+files/frontcontroller12.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+%unicode|string%(10) "/index.php"
+string(10) "/index.php"
+string(%d) "phar://%sfrontcontroller21.php/index.php"
+string(18) "/index.php?test=hi"
+string(32) "/frontcontroller21.php/index.php"
+string(22) "/frontcontroller21.php"
+string(%d) "%sfrontcontroller21.php"
+string(40) "/frontcontroller21.php/index.php?test=hi" \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller22.phpt b/ext/phar/tests/frontcontroller22.phpt
new file mode 100644
index 0000000..b85c1eb
--- /dev/null
+++ b/ext/phar/tests/frontcontroller22.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller include from cwd test 1
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller22.php
+REQUEST_URI=/frontcontroller22.php/index.php
+PATH_INFO=/index.php
+--FILE_EXTERNAL--
+files/frontcontroller13.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+%unicode|string%(4) "test"
+%unicode|string%(12) "oof/test.php"
+
+Warning: include(./hi.php): failed to open stream: No such file or directory in phar://%s/oof/test.php on line %d
+
+Warning: include(): Failed opening './hi.php' for inclusion (include_path='%s') in phar://%soof/test.php on line %d \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller23.phpt b/ext/phar/tests/frontcontroller23.phpt
new file mode 100644
index 0000000..24464c9
--- /dev/null
+++ b/ext/phar/tests/frontcontroller23.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller with generic action router test
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller23.php
+REQUEST_URI=/frontcontroller23.php/hi/there
+PATH_INFO=/hi/there
+--FILE_EXTERNAL--
+files/frontcontroller14.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+string(9) "/hi/there"
+string(%d) "phar://%sfrontcontroller23.php/html/index.php" \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller24.phpt b/ext/phar/tests/frontcontroller24.phpt
new file mode 100644
index 0000000..767971e
--- /dev/null
+++ b/ext/phar/tests/frontcontroller24.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with custom 404 php script
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller24.php
+REQUEST_URI=/frontcontroller24.php/unknown/file
+PATH_INFO=/unknown/file
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+My 404 is rawesome \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller25.phpt b/ext/phar/tests/frontcontroller25.phpt
new file mode 100644
index 0000000..9b383de
--- /dev/null
+++ b/ext/phar/tests/frontcontroller25.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller with extra path_info
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller25.php
+REQUEST_URI=/frontcontroller25.php/a1.phps/extra/stuff
+PATH_INFO=/a1.phps/extra/stuff
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+string(42) "/frontcontroller25.php/a1.phps/extra/stuff"
+string(12) "/extra/stuff" \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller26.phpt b/ext/phar/tests/frontcontroller26.phpt
new file mode 100644
index 0000000..a8097b0
--- /dev/null
+++ b/ext/phar/tests/frontcontroller26.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar front controller with unknown extension mime type
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller26.php
+REQUEST_URI=/frontcontroller26.php/unknown.ext
+PATH_INFO=/unknown.ext
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: application/octet-stream
+--EXPECTF--
+<?php var_dump("hi"); \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller27.phpt b/ext/phar/tests/frontcontroller27.phpt
new file mode 100644
index 0000000..16203f6
--- /dev/null
+++ b/ext/phar/tests/frontcontroller27.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with no extension
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller27.php
+REQUEST_URI=/frontcontroller27.php/noext
+PATH_INFO=/noext
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/plain;charset=UTF-8
+--EXPECTF--
+hi \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller28.phpt b/ext/phar/tests/frontcontroller28.phpt
new file mode 100644
index 0000000..5778008
--- /dev/null
+++ b/ext/phar/tests/frontcontroller28.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with huge file
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller28.php
+REQUEST_URI=/frontcontroller28.php/bigfile.txt
+PATH_INFO=/bigfile.txt
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/plain;charset=UTF-8
+--EXPECT--
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
diff --git a/ext/phar/tests/frontcontroller29.phpt b/ext/phar/tests/frontcontroller29.phpt
new file mode 100644
index 0000000..0afc179
--- /dev/null
+++ b/ext/phar/tests/frontcontroller29.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with fatal error in php file
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller29.php
+REQUEST_URI=/frontcontroller29.php/fatalerror.phps
+PATH_INFO=/fatalerror.phps
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps on line 1 \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller3.phpt b/ext/phar/tests/frontcontroller3.phpt
new file mode 100644
index 0000000..ac36485
--- /dev/null
+++ b/ext/phar/tests/frontcontroller3.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Phar front controller phps
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller3.php
+REQUEST_URI=/frontcontroller3.php/a.phps
+PATH_INFO=/a.phps
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+<code><span style="color: #000000">
+<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
+</span>
+</code>
diff --git a/ext/phar/tests/frontcontroller30.phpt b/ext/phar/tests/frontcontroller30.phpt
new file mode 100644
index 0000000..de6960c
--- /dev/null
+++ b/ext/phar/tests/frontcontroller30.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Phar front controller with weird SCRIPT_NAME
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/huh?
+REQUEST_URI=/huh?
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTF--
+oops did not run
+%a \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller31.phpt b/ext/phar/tests/frontcontroller31.phpt
new file mode 100644
index 0000000..13c305d
--- /dev/null
+++ b/ext/phar/tests/frontcontroller31.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar front controller with invalid callback for rewrites
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller31.php
+REQUEST_URI=/frontcontroller31.php
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--FILE_EXTERNAL--
+files/frontcontroller16.phar
+--EXPECT--
+phar error: invalid rewrite callback \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller32.phpt b/ext/phar/tests/frontcontroller32.phpt
new file mode 100644
index 0000000..58f6fff
--- /dev/null
+++ b/ext/phar/tests/frontcontroller32.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar front controller with valid callback that is not good
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller32.php
+REQUEST_URI=/frontcontroller32.php
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--FILE_EXTERNAL--
+files/frontcontroller17.phar
+--EXPECTF--
+%ahar error: failed to call rewrite callback \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller33.phpt b/ext/phar/tests/frontcontroller33.phpt
new file mode 100644
index 0000000..8593e31
--- /dev/null
+++ b/ext/phar/tests/frontcontroller33.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar front controller with valid callback that does not return any value
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller33.php
+REQUEST_URI=/frontcontroller33.php
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--FILE_EXTERNAL--
+files/frontcontroller18.phar
+--EXPECTF--
+phar error: rewrite callback must return a string or false \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller34.phpt b/ext/phar/tests/frontcontroller34.phpt
new file mode 100644
index 0000000..34a49de
--- /dev/null
+++ b/ext/phar/tests/frontcontroller34.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller with cwd
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller34.php
+REQUEST_URI=/frontcontroller34.php/start/index.php
+PATH_INFO=/start/index.php
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--FILE_EXTERNAL--
+files/frontcontroller19.phar
+--EXPECT--
+start/index.php
+start/another.php
+another.php
diff --git a/ext/phar/tests/frontcontroller4.phpt b/ext/phar/tests/frontcontroller4.phpt
new file mode 100644
index 0000000..f2482b9
--- /dev/null
+++ b/ext/phar/tests/frontcontroller4.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Phar front controller index.php relocate (no /)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller4.php
+REQUEST_URI=/frontcontroller4.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller4.php/index.php
+--EXPECT--
diff --git a/ext/phar/tests/frontcontroller5.phpt b/ext/phar/tests/frontcontroller5.phpt
new file mode 100644
index 0000000..1990a2b
--- /dev/null
+++ b/ext/phar/tests/frontcontroller5.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar front controller index.php relocate
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller5.php
+REQUEST_URI=/frontcontroller5.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller5.php/index.php
+--EXPECT--
diff --git a/ext/phar/tests/frontcontroller6.phpt b/ext/phar/tests/frontcontroller6.phpt
new file mode 100644
index 0000000..1a2cc2c
--- /dev/null
+++ b/ext/phar/tests/frontcontroller6.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller 404
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller6.php
+REQUEST_URI=/frontcontroller6.php/notfound.php
+PATH_INFO=/notfound.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Status: 404 Not Found
+--EXPECT--
+<html>
+ <head>
+ <title>File Not Found</title>
+ </head>
+ <body>
+ <h1>404 - File /notfound.php Not Found</h1>
+ </body>
+</html> \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller7.phpt b/ext/phar/tests/frontcontroller7.phpt
new file mode 100644
index 0000000..aff2087
--- /dev/null
+++ b/ext/phar/tests/frontcontroller7.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar front controller alternate index file
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller7.php
+REQUEST_URI=/frontcontroller7.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller2.phar
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller7.php/a.php
+--EXPECT--
diff --git a/ext/phar/tests/frontcontroller8.phpt b/ext/phar/tests/frontcontroller8.phpt
new file mode 100644
index 0000000..36e3206
--- /dev/null
+++ b/ext/phar/tests/frontcontroller8.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller no index file 404
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller8.php
+REQUEST_URI=/frontcontroller8.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller3.phar
+--EXPECTHEADERS--
+Status: 404 Not Found
+--EXPECT--
+<html>
+ <head>
+ <title>File Not Found</title>
+ </head>
+ <body>
+ <h1>404 - File /index.php Not Found</h1>
+ </body>
+</html> \ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller9.phpt b/ext/phar/tests/frontcontroller9.phpt
new file mode 100644
index 0000000..d47a289
--- /dev/null
+++ b/ext/phar/tests/frontcontroller9.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Phar front controller rewrite array
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller9.php
+REQUEST_URI=/frontcontroller9.php/hi
+PATH_INFO=/hi
+--FILE_EXTERNAL--
+files/frontcontroller3.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+<code><span style="color: #000000">
+<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
+</span>
+</code> \ No newline at end of file
diff --git a/ext/phar/tests/include_path.phpt b/ext/phar/tests/include_path.phpt
new file mode 100644
index 0000000..5f9462c
--- /dev/null
+++ b/ext/phar/tests/include_path.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Phar: include_path with phar:// wrapper
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/tempmanifest1.phar.php';
+$a = new Phar($fname);
+$a['file1.php'] = 'file1.php
+';
+$a['test/file1.php'] = 'test/file1.php
+';
+unset($a);
+set_include_path('.' . PATH_SEPARATOR . 'phar://' . $fname);
+include 'file1.php';
+set_include_path('.' . PATH_SEPARATOR . 'phar://' . $fname . '/test');
+include 'file1.php';
+include 'file2.php';
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tempmanifest1.phar.php');
+?>
+--EXPECTF--
+file1.php
+test/file1.php
+
+Warning: include(file2.php): failed to open stream: No such file or directory in %sinclude_path.php on line %d
+
+Warning: include(): Failed opening 'file2.php' for inclusion (include_path='%sphar://%stempmanifest1.phar.php/test') in %sinclude_path.php on line %d
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/include_path_advanced.phpt b/ext/phar/tests/include_path_advanced.phpt
new file mode 100644
index 0000000..6feee42
--- /dev/null
+++ b/ext/phar/tests/include_path_advanced.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Phar: include_path advanced code coverage test
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE_EXTERNAL--
+files/include_path.phar
+--EXPECT--
+file1.php
+test/file1.php
+ok \ No newline at end of file
diff --git a/ext/phar/tests/ini_set.phpt b/ext/phar/tests/ini_set.phpt
new file mode 100644
index 0000000..7ccd6ea
--- /dev/null
+++ b/ext/phar/tests/ini_set.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Phar: test ini_set with readonly and require_hash enabled
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+?>
+--INI--
+phar.require_hash=1
+phar.readonly=1
+--FILE--
+<?php
+var_dump(ini_set('phar.require_hash', 1));
+var_dump(ini_set('phar.readonly', 1));
+var_dump(ini_get('phar.require_hash'));
+var_dump(ini_get('phar.readonly'));
+if (version_compare(PHP_VERSION, "5.3", "<")) {
+var_dump(false, false);
+} else {
+var_dump(ini_set('phar.require_hash', 0));
+var_dump(ini_set('phar.readonly', 0));
+}
+var_dump(ini_get('phar.require_hash'));
+var_dump(ini_get('phar.readonly'));
+__HALT_COMPILER();
+?>
+--EXPECTF--
+%unicode|string%(1) "1"
+%unicode|string%(1) "1"
+%unicode|string%(1) "1"
+%unicode|string%(1) "1"
+bool(false)
+bool(false)
+%unicode|string%(1) "1"
+%unicode|string%(1) "1"
diff --git a/ext/phar/tests/ini_set_off.phpt b/ext/phar/tests/ini_set_off.phpt
new file mode 100644
index 0000000..878f8bf
--- /dev/null
+++ b/ext/phar/tests/ini_set_off.phpt
@@ -0,0 +1,88 @@
+--TEST--
+Phar: test ini_set with readonly and require_hash disabled
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+var_dump(ini_set('phar.require_hash', 1));
+var_dump(ini_set('phar.readonly', 1));
+var_dump(ini_get('phar.require_hash'));
+var_dump(ini_get('phar.readonly'));
+ini_set('phar.require_hash', 0);
+ini_set('phar.readonly', 0);
+var_dump(Phar::canWrite());
+?>
+yes
+<?php
+var_dump(ini_set('phar.require_hash', 'yes'));
+var_dump(ini_set('phar.readonly', 'yes'));
+var_dump(ini_get('phar.require_hash'));
+var_dump(ini_get('phar.readonly'));
+var_dump(Phar::canWrite());
+ini_set('phar.require_hash', 0);
+ini_set('phar.readonly', 0);
+?>
+on
+<?php
+var_dump(ini_set('phar.require_hash', 'on'));
+var_dump(ini_set('phar.readonly', 'on'));
+var_dump(ini_get('phar.require_hash'));
+var_dump(ini_get('phar.readonly'));
+var_dump(Phar::canWrite());
+ini_set('phar.require_hash', 0);
+ini_set('phar.readonly', 0);
+?>
+true
+<?php
+var_dump(ini_set('phar.require_hash', 'true'));
+var_dump(ini_set('phar.readonly', 'true'));
+var_dump(Phar::canWrite());
+var_dump(ini_get('phar.require_hash'));
+var_dump(ini_get('phar.readonly'));
+?>
+0
+<?php
+var_dump(ini_set('phar.require_hash', 0));
+var_dump(ini_set('phar.readonly', 0));
+var_dump(Phar::canWrite());
+var_dump(ini_get('phar.require_hash'));
+var_dump(ini_get('phar.readonly'));
+?>
+===DONE===
+--EXPECT--
+string(1) "0"
+string(1) "0"
+string(1) "1"
+string(1) "1"
+bool(true)
+yes
+string(1) "0"
+string(1) "0"
+string(3) "yes"
+string(3) "yes"
+bool(false)
+on
+string(1) "0"
+string(1) "0"
+string(2) "on"
+string(2) "on"
+bool(false)
+true
+string(1) "0"
+string(1) "0"
+bool(false)
+string(4) "true"
+string(4) "true"
+0
+string(4) "true"
+string(4) "true"
+bool(true)
+string(1) "0"
+string(1) "0"
+===DONE===
diff --git a/ext/phar/tests/ini_set_offU.phpt b/ext/phar/tests/ini_set_offU.phpt
new file mode 100644
index 0000000..150cbed
--- /dev/null
+++ b/ext/phar/tests/ini_set_offU.phpt
@@ -0,0 +1,88 @@
+--TEST--
+Phar: test ini_set with readonly and require_hash disabled
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+var_dump(ini_set('phar.require_hash', 1));
+var_dump(ini_set('phar.readonly', 1));
+var_dump(ini_get('phar.require_hash'));
+var_dump(ini_get('phar.readonly'));
+ini_set('phar.require_hash', 0);
+ini_set('phar.readonly', 0);
+var_dump(Phar::canWrite());
+?>
+yes
+<?php
+var_dump(ini_set('phar.require_hash', 'yes'));
+var_dump(ini_set('phar.readonly', 'yes'));
+var_dump(ini_get('phar.require_hash'));
+var_dump(ini_get('phar.readonly'));
+var_dump(Phar::canWrite());
+ini_set('phar.require_hash', 0);
+ini_set('phar.readonly', 0);
+?>
+on
+<?php
+var_dump(ini_set('phar.require_hash', 'on'));
+var_dump(ini_set('phar.readonly', 'on'));
+var_dump(ini_get('phar.require_hash'));
+var_dump(ini_get('phar.readonly'));
+var_dump(Phar::canWrite());
+ini_set('phar.require_hash', 0);
+ini_set('phar.readonly', 0);
+?>
+true
+<?php
+var_dump(ini_set('phar.require_hash', 'true'));
+var_dump(ini_set('phar.readonly', 'true'));
+var_dump(Phar::canWrite());
+var_dump(ini_get('phar.require_hash'));
+var_dump(ini_get('phar.readonly'));
+?>
+0
+<?php
+var_dump(ini_set('phar.require_hash', 0));
+var_dump(ini_set('phar.readonly', 0));
+var_dump(Phar::canWrite());
+var_dump(ini_get('phar.require_hash'));
+var_dump(ini_get('phar.readonly'));
+?>
+===DONE===
+--EXPECT--
+unicode(1) "0"
+unicode(1) "0"
+unicode(1) "1"
+unicode(1) "1"
+bool(true)
+yes
+unicode(1) "0"
+unicode(1) "0"
+unicode(3) "yes"
+unicode(3) "yes"
+bool(false)
+on
+unicode(1) "0"
+unicode(1) "0"
+unicode(2) "on"
+unicode(2) "on"
+bool(false)
+true
+unicode(1) "0"
+unicode(1) "0"
+bool(false)
+unicode(4) "true"
+unicode(4) "true"
+0
+unicode(4) "true"
+unicode(4) "true"
+bool(true)
+unicode(1) "0"
+unicode(1) "0"
+===DONE===
diff --git a/ext/phar/tests/invalid_alias.phpt b/ext/phar/tests/invalid_alias.phpt
new file mode 100644
index 0000000..dc0c71e
--- /dev/null
+++ b/ext/phar/tests/invalid_alias.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Phar: set alias with invalid alias containing / \ : or ;
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+
+$p = new Phar($fname);
+try {
+ $p->setAlias('hi/');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ $p->setAlias('hi\\l');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+
+try {
+ $p->setAlias('hil;');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+
+try {
+ $p->setAlias(':hil');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+?>
+--EXPECTF--
+Invalid alias "hi/" specified for phar "%sinvalid_alias.phar"
+Invalid alias "hi\l" specified for phar "%sinvalid_alias.phar"
+Invalid alias "hil;" specified for phar "%sinvalid_alias.phar"
+Invalid alias ":hil" specified for phar "%sinvalid_alias.phar"
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/invalid_setstubalias.phpt b/ext/phar/tests/invalid_setstubalias.phpt
new file mode 100644
index 0000000..04cb779
--- /dev/null
+++ b/ext/phar/tests/invalid_setstubalias.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Phar: invalid set alias or stub via array access
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+
+$p = new Phar($fname);
+try {
+ $p['.phar/stub.php'] = 'hi';
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ $p['.phar/alias.txt'] = 'hi';
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+$p = new Phar($fname2);
+try {
+ $p['.phar/stub.php'] = 'hi';
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ $p['.phar/alias.txt'] = 'hi';
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+?>
+--EXPECTF--
+Cannot set stub ".phar/stub.php" directly in phar "%sinvalid_setstubalias.phar.tar", use setStub
+Cannot set alias ".phar/alias.txt" directly in phar "%sinvalid_setstubalias.phar.tar", use setAlias
+Cannot set stub ".phar/stub.php" directly in phar "%sinvalid_setstubalias.phar.zip", use setStub
+Cannot set alias ".phar/alias.txt" directly in phar "%sinvalid_setstubalias.phar.zip", use setAlias
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/metadata_read.phpt b/ext/phar/tests/metadata_read.phpt
new file mode 100644
index 0000000..5c37382
--- /dev/null
+++ b/ext/phar/tests/metadata_read.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Phar with meta-data (read)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = array('cont' => 'a');
+$files['b'] = array('cont' => 'b', 'meta' => 'hi there');
+$files['c'] = array('cont' => 'c', 'meta' => array('hi', 'there'));
+$files['d'] = array('cont' => 'd', 'meta' => array('hi'=>'there','foo'=>'bar'));
+include 'files/phar_test.inc';
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+
+$phar = new Phar($fname);
+foreach($files as $name => $cont) {
+ var_dump($phar[$name]->getMetadata());
+}
+
+unset($phar);
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+NULL
+string(8) "hi there"
+array(2) {
+ [0]=>
+ string(2) "hi"
+ [1]=>
+ string(5) "there"
+}
+array(2) {
+ ["hi"]=>
+ string(5) "there"
+ ["foo"]=>
+ string(3) "bar"
+}
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+===DONE===
diff --git a/ext/phar/tests/metadata_readU.phpt b/ext/phar/tests/metadata_readU.phpt
new file mode 100644
index 0000000..7197ead
--- /dev/null
+++ b/ext/phar/tests/metadata_readU.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Phar with meta-data (read)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = array('cont' => 'a');
+$files['b'] = array('cont' => 'b', 'meta' => 'hi there');
+$files['c'] = array('cont' => 'c', 'meta' => array('hi', 'there'));
+$files['d'] = array('cont' => 'd', 'meta' => array('hi'=>'there','foo'=>'bar'));
+include 'files/phar_test.inc';
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+
+$phar = new Phar($fname);
+foreach($files as $name => $cont) {
+ var_dump($phar[$name]->getMetadata());
+}
+
+unset($phar);
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+NULL
+unicode(8) "hi there"
+array(2) {
+ [0]=>
+ unicode(2) "hi"
+ [1]=>
+ unicode(5) "there"
+}
+array(2) {
+ [u"hi"]=>
+ unicode(5) "there"
+ [u"foo"]=>
+ unicode(3) "bar"
+}
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+===DONE===
diff --git a/ext/phar/tests/metadata_write.phpt b/ext/phar/tests/metadata_write.phpt
new file mode 100644
index 0000000..1aaa30d
--- /dev/null
+++ b/ext/phar/tests/metadata_write.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Phar with meta-data (write)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = array('cont' => 'a');
+$files['b'] = array('cont' => 'b', 'meta' => 'hi there');
+$files['c'] = array('cont' => 'c', 'meta' => array('hi', 'there'));
+$files['d'] = array('cont' => 'd', 'meta' => array('hi'=>'there','foo'=>'bar'));
+include 'files/phar_test.inc';
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+
+$phar = new Phar($fname);
+$phar['a']->setMetadata(42);
+$phar['b']->setMetadata(NULL);
+$phar['c']->setMetadata(array(25, 'foo'=>'bar'));
+$phar['d']->setMetadata(true);
+
+foreach($files as $name => $cont) {
+ var_dump($phar[$name]->getMetadata());
+}
+
+unset($phar);
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+int(42)
+NULL
+array(2) {
+ [0]=>
+ int(25)
+ ["foo"]=>
+ string(3) "bar"
+}
+bool(true)
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+===DONE===
diff --git a/ext/phar/tests/metadata_writeU.phpt b/ext/phar/tests/metadata_writeU.phpt
new file mode 100644
index 0000000..dc0764b
--- /dev/null
+++ b/ext/phar/tests/metadata_writeU.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Phar with meta-data (write)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = array('cont' => 'a');
+$files['b'] = array('cont' => 'b', 'meta' => 'hi there');
+$files['c'] = array('cont' => 'c', 'meta' => array('hi', 'there'));
+$files['d'] = array('cont' => 'd', 'meta' => array('hi'=>'there','foo'=>'bar'));
+include 'files/phar_test.inc';
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+
+$phar = new Phar($fname);
+$phar['a']->setMetadata(42);
+$phar['b']->setMetadata(NULL);
+$phar['c']->setMetadata(array(25, 'foo'=>'bar'));
+$phar['d']->setMetadata(true);
+
+foreach($files as $name => $cont) {
+ var_dump($phar[$name]->getMetadata());
+}
+
+unset($phar);
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+int(42)
+NULL
+array(2) {
+ [0]=>
+ int(25)
+ [u"foo"]=>
+ unicode(3) "bar"
+}
+bool(true)
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+===DONE===
diff --git a/ext/phar/tests/metadata_write_commit.phpt b/ext/phar/tests/metadata_write_commit.phpt
new file mode 100644
index 0000000..fd2f107
--- /dev/null
+++ b/ext/phar/tests/metadata_write_commit.phpt
@@ -0,0 +1,82 @@
+--TEST--
+Phar with meta-data (write)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = array('cont' => 'a');
+$files['b'] = array('cont' => 'b', 'meta' => 'hi there');
+$files['c'] = array('cont' => 'c', 'meta' => array('hi', 'there'));
+$files['d'] = array('cont' => 'd', 'meta' => array('hi'=>'there','foo'=>'bar'));
+include 'files/phar_test.inc';
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+
+$phar = new Phar($fname);
+$phar->startBuffering();
+$phar['a']->setMetadata(42);
+$phar['b']->setMetadata(NULL);
+$phar['c']->setMetadata(array(25, 'foo'=>'bar'));
+$phar['d']->setMetadata(true);
+
+foreach($files as $name => $cont) {
+ var_dump($phar[$name]->getMetadata());
+}
+$phar->stopBuffering();
+
+unset($phar);
+
+$phar = new Phar($fname);
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+
+foreach($files as $name => $cont) {
+ var_dump($phar[$name]->getMetadata());
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+int(42)
+NULL
+array(2) {
+ [0]=>
+ int(25)
+ ["foo"]=>
+ string(3) "bar"
+}
+bool(true)
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+int(42)
+NULL
+array(2) {
+ [0]=>
+ int(25)
+ ["foo"]=>
+ string(3) "bar"
+}
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/metadata_write_commitU.phpt b/ext/phar/tests/metadata_write_commitU.phpt
new file mode 100644
index 0000000..712a6f5
--- /dev/null
+++ b/ext/phar/tests/metadata_write_commitU.phpt
@@ -0,0 +1,82 @@
+--TEST--
+Phar with meta-data (write)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = array('cont' => 'a');
+$files['b'] = array('cont' => 'b', 'meta' => 'hi there');
+$files['c'] = array('cont' => 'c', 'meta' => array('hi', 'there'));
+$files['d'] = array('cont' => 'd', 'meta' => array('hi'=>'there','foo'=>'bar'));
+include 'files/phar_test.inc';
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+
+$phar = new Phar($fname);
+$phar->startBuffering();
+$phar['a']->setMetadata(42);
+$phar['b']->setMetadata(NULL);
+$phar['c']->setMetadata(array(25, 'foo'=>'bar'));
+$phar['d']->setMetadata(true);
+
+foreach($files as $name => $cont) {
+ var_dump($phar[$name]->getMetadata());
+}
+$phar->stopBuffering();
+
+unset($phar);
+
+$phar = new Phar($fname);
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+
+foreach($files as $name => $cont) {
+ var_dump($phar[$name]->getMetadata());
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+int(42)
+NULL
+array(2) {
+ [0]=>
+ int(25)
+ [u"foo"]=>
+ unicode(3) "bar"
+}
+bool(true)
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+int(42)
+NULL
+array(2) {
+ [0]=>
+ int(25)
+ [u"foo"]=>
+ unicode(3) "bar"
+}
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/mkdir.phpt b/ext/phar/tests/mkdir.phpt
new file mode 100644
index 0000000..45c1d46
--- /dev/null
+++ b/ext/phar/tests/mkdir.phpt
@@ -0,0 +1,47 @@
+--TEST--
+phar: mkdir/rmdir edge cases
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+Phar::interceptFileFuncs();
+mkdir('phar://');
+mkdir('phar://foo.phar');
+$a = new Phar($fname);
+$a['a'] = 'hi';
+mkdir($pname . '/a');
+rmdir('phar://');
+rmdir('phar://foo.phar');
+rmdir($pname . '/a');
+$a->addEmptyDir('bb');
+$a->addEmptyDir('bb');
+try {
+$a->addEmptyDir('.phar');
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+Warning: mkdir(): phar error: cannot create directory "phar://", no phar archive specified in %smkdir.php on line %d
+
+Warning: mkdir(): phar error: cannot create directory "" in phar "foo.phar", phar error: invalid path "" must not be empty in %smkdir.php on line %d
+
+Warning: mkdir(): phar error: cannot create directory "a" in phar "%smkdir.phar.php", phar error: path "a" exists and is a not a directory in %smkdir.php on line %d
+
+Warning: rmdir(): phar error: cannot remove directory "phar://", no phar archive specified, or phar archive does not exist in %smkdir.php on line %d
+
+Warning: rmdir(): phar error: cannot remove directory "" in phar "foo.phar", directory does not exist in %smkdir.php on line %d
+
+Warning: rmdir(): phar error: cannot remove directory "a" in phar "%smkdir.phar.php", phar error: path "a" exists and is a not a directory in %smkdir.php on line %d
+Cannot create a directory in magic ".phar" directory
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/mounteddir.phpt b/ext/phar/tests/mounteddir.phpt
new file mode 100644
index 0000000..e130895
--- /dev/null
+++ b/ext/phar/tests/mounteddir.phpt
@@ -0,0 +1,118 @@
+--TEST--
+Phar: mounted manifest directory test
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/tempmanifest1.phar.php';
+$pname = 'phar://' . $fname;
+
+$a = new Phar($fname);
+$a['index.php'] = '<?php
+Phar::mount("testit", dirname(Phar::running(0)) . "/testit");
+echo file_get_contents(Phar::running(1) . "/testit/extfile.php"), "\n";
+echo file_get_contents(Phar::running(1) . "/testit/directory"), "\n";
+echo file_get_contents(Phar::running(1) . "/testit/existing.txt"), "\n";
+include "testit/extfile.php";
+include "testit/extfile2.php";
+try {
+Phar::mount(".phar/stub.php", dirname(Phar::running(0)) . "/testit/extfile.php");
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+?>';
+$a['testit/existing.txt'] = 'oops';
+$a->setStub('<?php
+set_include_path("phar://" . __FILE__);
+include "index.php";
+__HALT_COMPILER();');
+unset($a);
+mkdir(dirname(__FILE__) . '/testit');
+mkdir(dirname(__FILE__) . '/testit/directory');
+file_put_contents(dirname(__FILE__) . '/testit/extfile.php', '<?php
+var_dump(__FILE__);
+?>');
+file_put_contents(dirname(__FILE__) . '/testit/extfile2.php', '<?php
+var_dump(__FILE__);
+?>');
+include dirname(__FILE__) . '/testit/extfile.php';
+include $fname;
+
+$a = opendir($pname . '/testit');
+$out = array();
+while (false !== ($b = readdir($a))) {
+ $out[] = $b;
+}
+sort($out);
+foreach ($out as $b) {
+ echo "$b\n";
+}
+$out = array();
+foreach (new Phar($pname . '/testit') as $b) {
+ $out[] = $b->getPathName();
+}
+sort($out);
+foreach ($out as $b) {
+ echo "$b\n";
+}
+try {
+Phar::mount($pname . '/testit', 'another\\..\\mistake');
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+try {
+Phar::mount($pname . '/notfound', dirname(__FILE__) . '/this/does/not/exist');
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+try {
+Phar::mount($pname . '/testit', dirname(__FILE__));
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+try {
+Phar::mount($pname . '/testit/extfile.php', dirname(__FILE__));
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tempmanifest1.phar.php');
+@unlink(dirname(__FILE__) . '/testit/extfile.php');
+@unlink(dirname(__FILE__) . '/testit/extfile2.php');
+@rmdir(dirname(__FILE__) . '/testit/directory');
+@rmdir(dirname(__FILE__) . '/testit');
+
+?>
+--EXPECTF--
+string(%d) "%sextfile.php"
+<?php
+var_dump(__FILE__);
+?>
+
+Warning: file_get_contents(phar://%stempmanifest1.phar.php/testit/directory): failed to open stream: phar error: path "testit/directory" is a directory in phar://%stempmanifest1.phar.php/index.php on line %d
+
+oops
+string(%d) "phar://%sextfile.php"
+string(%d) "phar://%sextfile2.php"
+Mounting of .phar/stub.php to %sextfile.php within phar %stests/tempmanifest1.phar.php failed
+.
+..
+directory
+extfile.php
+extfile2.php
+phar://%stempmanifest1.phar.php/testit%cdirectory
+phar://%stempmanifest1.phar.php/testit%cextfile.php
+phar://%stempmanifest1.phar.php/testit%cextfile2.php
+Mounting of /testit to another\..\mistake within phar %stempmanifest1.phar.php failed
+Mounting of /notfound to %stests/this/does/not/exist within phar %stempmanifest1.phar.php failed
+Mounting of /testit to %stests within phar %stests/tempmanifest1.phar.php failed
+Mounting of /testit/extfile.php to %stests within phar %stests/tempmanifest1.phar.php failed
+===DONE===
diff --git a/ext/phar/tests/mounteddirU.phpt b/ext/phar/tests/mounteddirU.phpt
new file mode 100644
index 0000000..d05cb00
--- /dev/null
+++ b/ext/phar/tests/mounteddirU.phpt
@@ -0,0 +1,118 @@
+--TEST--
+Phar: mounted manifest directory test
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/tempmanifest1.phar.php';
+$pname = 'phar://' . $fname;
+
+$a = new Phar($fname);
+$a['index.php'] = '<?php
+Phar::mount("testit", dirname(Phar::running(0)) . "/testit");
+echo file_get_contents(Phar::running(1) . "/testit/extfile.php"), "\n";
+echo file_get_contents(Phar::running(1) . "/testit/directory"), "\n";
+echo file_get_contents(Phar::running(1) . "/testit/existing.txt"), "\n";
+include "testit/extfile.php";
+include "testit/extfile2.php";
+try {
+Phar::mount(".phar/stub.php", dirname(Phar::running(0)) . "/testit/extfile.php");
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+?>';
+$a['testit/existing.txt'] = 'oops';
+$a->setStub('<?php
+set_include_path("phar://" . __FILE__);
+include "index.php";
+__HALT_COMPILER();');
+unset($a);
+mkdir(dirname(__FILE__) . '/testit');
+mkdir(dirname(__FILE__) . '/testit/directory');
+file_put_contents(dirname(__FILE__) . '/testit/extfile.php', '<?php
+var_dump(__FILE__);
+?>');
+file_put_contents(dirname(__FILE__) . '/testit/extfile2.php', '<?php
+var_dump(__FILE__);
+?>');
+include dirname(__FILE__) . '/testit/extfile.php';
+include $fname;
+
+$a = opendir($pname . '/testit');
+$out = array();
+while (false !== ($b = readdir($a))) {
+ $out[] = $b;
+}
+sort($out);
+foreach ($out as $b) {
+ echo "$b\n";
+}
+$out = array();
+foreach (new Phar($pname . '/testit') as $b) {
+ $out[] = $b->getPathName();
+}
+sort($out);
+foreach ($out as $b) {
+ echo "$b\n";
+}
+try {
+Phar::mount($pname . '/testit', 'another\\..\\mistake');
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+try {
+Phar::mount($pname . '/notfound', dirname(__FILE__) . '/this/does/not/exist');
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+try {
+Phar::mount($pname . '/testit', dirname(__FILE__));
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+try {
+Phar::mount($pname . '/testit/extfile.php', dirname(__FILE__));
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tempmanifest1.phar.php');
+@unlink(dirname(__FILE__) . '/testit/extfile.php');
+@unlink(dirname(__FILE__) . '/testit/extfile2.php');
+@rmdir(dirname(__FILE__) . '/testit/directory');
+@rmdir(dirname(__FILE__) . '/testit');
+
+?>
+--EXPECTF--
+unicode(%d) "%sextfile.php"
+<?php
+var_dump(__FILE__);
+?>
+
+Warning: file_get_contents(phar://%stempmanifest1.phar.php/testit/directory): failed to open stream: phar error: path "testit/directory" is a directory in phar://%stempmanifest1.phar.php/index.php on line %d
+
+oops
+unicode(%d) "phar://%sextfile.php"
+unicode(%d) "phar://%sextfile2.php"
+Mounting of .phar/stub.php to %sextfile.php within phar %stests/tempmanifest1.phar.php failed
+.
+..
+directory
+extfile.php
+extfile2.php
+phar://%stempmanifest1.phar.php/testit%cdirectory
+phar://%stempmanifest1.phar.php/testit%cextfile.php
+phar://%stempmanifest1.phar.php/testit%cextfile2.php
+Mounting of /testit to another\..\mistake within phar %stempmanifest1.phar.php failed
+Mounting of /notfound to %stests/this/does/not/exist within phar %stempmanifest1.phar.php failed
+Mounting of /testit to %stests within phar %stests/tempmanifest1.phar.php failed
+Mounting of /testit/extfile.php to %stests within phar %stests/tempmanifest1.phar.php failed
+===DONE===
diff --git a/ext/phar/tests/nophar.phpt b/ext/phar/tests/nophar.phpt
new file mode 100644
index 0000000..d97df8a
--- /dev/null
+++ b/ext/phar/tests/nophar.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar: phar run without pecl/phar with default stub
+--SKIPIF--
+<?php if (extension_loaded("phar")) die("skip Phar extension must be disabled for this test"); ?>
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/nophar.phar';
+?>
+===DONE===
+--EXPECT--
+in b
+<?php include "b/c.php";
+in d
+===DONE===
diff --git a/ext/phar/tests/nophar_web.phpt b/ext/phar/tests/nophar_web.phpt
new file mode 100644
index 0000000..7ee67b4
--- /dev/null
+++ b/ext/phar/tests/nophar_web.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Phar: default web stub, no phar extension
+--SKIPIF--
+<?php if (extension_loaded("phar")) die("skip Phar extension must be disabled for this test"); ?>
+--ENV--
+SCRIPT_NAME=/nophar.phar
+REQUEST_URI=/nophar.phar
+--FILE_EXTERNAL--
+files/nophar.phar
+--EXPECT--
+web
diff --git a/ext/phar/tests/open_for_write_existing.phpt b/ext/phar/tests/open_for_write_existing.phpt
new file mode 100644
index 0000000..9d27cd8
--- /dev/null
+++ b/ext/phar/tests/open_for_write_existing.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+include 'files/phar_test.inc';
+
+$fp = fopen($pname . '/b/c.php', 'wb');
+fwrite($fp, b'extra');
+fclose($fp);
+include $pname . '/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+extra
+===DONE===
diff --git a/ext/phar/tests/open_for_write_existing_b.phpt b/ext/phar/tests/open_for_write_existing_b.phpt
new file mode 100644
index 0000000..ef48906
--- /dev/null
+++ b/ext/phar/tests/open_for_write_existing_b.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later");
+?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+include 'files/phar_test.inc';
+
+function err_handler($errno, $errstr, $errfile, $errline) {
+ echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
+}
+
+set_error_handler("err_handler", E_RECOVERABLE_ERROR);
+
+$fp = fopen($pname . '/b/c.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+include $pname . '/b/c.php';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_existing_b.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b.php on line %d
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_existing_b.php on line %d
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in %sopen_for_write_existing_b.php on line %d
+This is b/c
+===DONE===
diff --git a/ext/phar/tests/open_for_write_existing_b_5_2.phpt b/ext/phar/tests/open_for_write_existing_b_5_2.phpt
new file mode 100644
index 0000000..03edd54
--- /dev/null
+++ b/ext/phar/tests/open_for_write_existing_b_5_2.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+include 'files/phar_test.inc';
+
+function err_handler($errno, $errstr, $errfile, $errline) {
+ echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
+}
+
+set_error_handler("err_handler", E_RECOVERABLE_ERROR);
+
+$fp = fopen($pname . '/b/c.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+include $pname . '/b/c.php';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_existing_b_5_2.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b_5_2.php on line %d
+
+Warning: fwrite(): supplied argument is not a valid stream resource in %spen_for_write_existing_b_5_2.php on line %d
+
+Warning: fclose(): supplied argument is not a valid stream resource in %spen_for_write_existing_b_5_2.php on line %d
+This is b/c
+===DONE===
diff --git a/ext/phar/tests/open_for_write_existing_c.phpt b/ext/phar/tests/open_for_write_existing_c.phpt
new file mode 100644
index 0000000..f64d538
--- /dev/null
+++ b/ext/phar/tests/open_for_write_existing_c.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later");
+?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+include 'files/phar_test.inc';
+
+$fp = fopen($pname . '/b/c.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+include $pname . '/b/c.php';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_existing_c.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c.php on line %d
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in %spen_for_write_existing_c.php on line %d
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in %spen_for_write_existing_c.php on line %d
+This is b/c
+===DONE===
diff --git a/ext/phar/tests/open_for_write_existing_c_5_2.phpt b/ext/phar/tests/open_for_write_existing_c_5_2.phpt
new file mode 100644
index 0000000..2d5a983
--- /dev/null
+++ b/ext/phar/tests/open_for_write_existing_c_5_2.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+include 'files/phar_test.inc';
+
+$fp = fopen($pname . '/b/c.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+include $pname . '/b/c.php';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_existing_c_5_2.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c_5_2.php on line %d
+
+Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_existing_c_5_2.php on line %d
+
+Warning: fclose(): supplied argument is not a valid stream resource in %sopen_for_write_existing_c_5_2.php on line %d
+This is b/c
+===DONE===
diff --git a/ext/phar/tests/open_for_write_newfile.phpt b/ext/phar/tests/open_for_write_newfile.phpt
new file mode 100644
index 0000000..735e3b4
--- /dev/null
+++ b/ext/phar/tests/open_for_write_newfile.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Phar: fopen a .phar for writing (new file)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+include 'files/phar_test.inc';
+
+$fp = fopen($pname . '/b/new.php', 'wb');
+fwrite($fp, b'extra');
+fclose($fp);
+include $pname . '/b/c.php';
+include $pname . '/b/new.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+This is b/c
+extra
+===DONE===
diff --git a/ext/phar/tests/open_for_write_newfile_b.phpt b/ext/phar/tests/open_for_write_newfile_b.phpt
new file mode 100644
index 0000000..45131c4
--- /dev/null
+++ b/ext/phar/tests/open_for_write_newfile_b.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Phar: fopen a .phar for writing (new file)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later");
+?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+include 'files/phar_test.inc';
+
+function err_handler($errno, $errstr, $errfile, $errline) {
+ echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
+}
+
+set_error_handler("err_handler", E_RECOVERABLE_ERROR);
+
+$fp = fopen($pname . '/b/new.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+include $pname . '/b/c.php';
+include $pname . '/b/new.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_newfile_b.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b.php on line %d
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_b.php on line %d
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_b.php on line %d
+This is b/c
+
+Warning: include(phar://%sopen_for_write_newfile_b.phar.php/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_b.phar.php" in %sopen_for_write_newfile_b.php on line 22
+
+Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_b.phar.php/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_b.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/open_for_write_newfile_b_5_2.phpt b/ext/phar/tests/open_for_write_newfile_b_5_2.phpt
new file mode 100644
index 0000000..7d43f1c
--- /dev/null
+++ b/ext/phar/tests/open_for_write_newfile_b_5_2.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Phar: fopen a .phar for writing (new file)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+include 'files/phar_test.inc';
+
+function err_handler($errno, $errstr, $errfile, $errline) {
+ echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
+}
+
+set_error_handler("err_handler", E_RECOVERABLE_ERROR);
+
+$fp = fopen($pname . '/b/new.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+include $pname . '/b/c.php';
+include $pname . '/b/new.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_newfile_b_5_2.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b_5_2.php on line %d
+
+Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_b_5_2.php on line %d
+
+Warning: fclose(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_b_5_2.php on line %d
+This is b/c
+
+Warning: include(phar://%sopen_for_write_newfile_b_5_2.phar.php/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_b_5_2.phar.php" in %sopen_for_write_newfile_b_5_2.php on line %d
+
+Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_b_5_2.phar.php/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_b_5_2.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/open_for_write_newfile_c.phpt b/ext/phar/tests/open_for_write_newfile_c.phpt
new file mode 100644
index 0000000..d790051
--- /dev/null
+++ b/ext/phar/tests/open_for_write_newfile_c.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Phar: fopen a .phar for writing (new file)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later");
+?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+include 'files/phar_test.inc';
+
+$fp = fopen($pname . '/b/new.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+include $pname . '/b/c.php';
+include $pname . '/b/new.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_newfile_c.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c.php on line %d
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_c.php on line %d
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_c.php on line %d
+This is b/c
+
+Warning: include(phar://%sopen_for_write_newfile_c.phar.php/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_c.phar.php" in %sopen_for_write_newfile_c.php on line %d
+
+Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_c.phar.php/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_c.php on line %d
+
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/open_for_write_newfile_c_5_2.phpt b/ext/phar/tests/open_for_write_newfile_c_5_2.phpt
new file mode 100644
index 0000000..421aa98
--- /dev/null
+++ b/ext/phar/tests/open_for_write_newfile_c_5_2.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Phar: fopen a .phar for writing (new file)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+include 'files/phar_test.inc';
+
+$fp = fopen($pname . '/b/new.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+include $pname . '/b/c.php';
+include $pname . '/b/new.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_newfile_c_5_2.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c_5_2.php on line %d
+
+Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_c_5_2.php on line %d
+
+Warning: fclose(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_c_5_2.php on line %d
+This is b/c
+
+Warning: include(phar://%sopen_for_write_newfile_c_5_2.phar.php/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_c_5_2.phar.php" in %sopen_for_write_newfile_c_5_2.php on line %d
+
+Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_c_5_2.phar.php/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_c_5_2.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/opendir.phpt b/ext/phar/tests/opendir.phpt
new file mode 100644
index 0000000..ca6e391
--- /dev/null
+++ b/ext/phar/tests/opendir.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Phar: test opendir() interception
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.require_hash=1
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$a = new Phar($fname);
+$a['index.php'] = '<?php
+$a = opendir("dir");
+if ($a) {
+ while (false !== ($e = readdir($a))) {
+ echo $e;
+ }
+}
+?>';
+$a['dir/file1.txt'] = 'hi';
+$a['dir/file2.txt'] = 'hi2';
+$a['dir/file3.txt'] = 'hi3';
+$a->setStub('<?php
+Phar::interceptFileFuncs();
+set_include_path("phar://" . __FILE__);
+include "index.php";
+__HALT_COMPILER();');
+include $fname;
+echo "\n";
+opendir('phar://');
+opendir('phar://hi.phar');
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+file1.txtfile2.txtfile3.txt
+
+Warning: opendir(phar://): failed to open dir: phar error: no directory in "phar://", must have at least phar:/// for root directory (always use full path to a new phar)
+phar url "phar://" is unknown in %sopendir.php on line %d
+
+Warning: opendir(phar://hi.phar): failed to open dir: phar error: invalid url or non-existent phar "phar://hi.phar"
+phar url "phar://hi.phar" is unknown in %sopendir.php on line %d
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/opendir_edgecases.phpt b/ext/phar/tests/opendir_edgecases.phpt
new file mode 100644
index 0000000..be899df
--- /dev/null
+++ b/ext/phar/tests/opendir_edgecases.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Phar: test edge cases of opendir() function interception
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+Phar::interceptFileFuncs();
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+
+opendir(array());
+
+mkdir(dirname(__FILE__) . '/poo');
+chdir(dirname(__FILE__));
+
+$a = opendir('poo');
+
+$arr = array();
+while (false !== ($b = readdir($a))) {
+ $arr[] = $b;
+}
+sort($arr);
+foreach ($arr as $b) {
+ echo "$b\n";
+}
+
+closedir($a);
+
+file_put_contents($pname . '/foo', '<?php
+$context = stream_context_create();
+$a = opendir(".", $context);
+$res = array();
+while (false !== ($b = readdir($a))) {
+$res[] = $b;
+}
+sort($res);
+foreach ($res as $b) {
+echo "$b\n";
+}
+opendir("oops");
+?>');
+
+include $pname . '/foo';
+
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php rmdir(dirname(__FILE__) . '/poo');
+--EXPECTF--
+Warning: opendir() expects parameter 1 to be a valid path, array given in %sopendir_edgecases.php on line %d
+.
+..
+foo
+
+Warning: opendir(phar://%sopendir_edgecases.phar.php/oops): failed to open dir: %s in phar://%sopendir_edgecases.phar.php/foo on line %d
+===DONE===
diff --git a/ext/phar/tests/phar_begin_setstub_commit.phpt b/ext/phar/tests/phar_begin_setstub_commit.phpt
new file mode 100644
index 0000000..9d3e383
--- /dev/null
+++ b/ext/phar/tests/phar_begin_setstub_commit.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Phar::startBuffering()/setStub()/stopBuffering()
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$p = new Phar(dirname(__FILE__) . '/brandnewphar.phar', 0, 'brandnewphar.phar');
+//var_dump($p->getStub());
+var_dump($p->isBuffering());
+$p->startBuffering();
+var_dump($p->isBuffering());
+$p['a.php'] = '<?php var_dump("Hello");';
+$p->setStub('<?php var_dump("First"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>');
+include 'phar://brandnewphar.phar/a.php';
+var_dump($p->getStub());
+$p['b.php'] = '<?php var_dump("World");';
+$p->setStub('<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER();');
+include 'phar://brandnewphar.phar/b.php';
+var_dump($p->getStub());
+$p->stopBuffering();
+echo "===COMMIT===\n";
+var_dump($p->isBuffering());
+include 'phar://brandnewphar.phar/a.php';
+include 'phar://brandnewphar.phar/b.php';
+var_dump($p->getStub());
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/brandnewphar.phar');
+?>
+--EXPECT--
+bool(false)
+bool(true)
+string(5) "Hello"
+string(84) "<?php var_dump("First"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+string(5) "World"
+string(85) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+===COMMIT===
+bool(false)
+string(5) "Hello"
+string(5) "World"
+string(85) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+===DONE===
diff --git a/ext/phar/tests/phar_begin_setstub_commitU.phpt b/ext/phar/tests/phar_begin_setstub_commitU.phpt
new file mode 100644
index 0000000..805e762
--- /dev/null
+++ b/ext/phar/tests/phar_begin_setstub_commitU.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Phar::startBuffering()/setStub()/stopBuffering()
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$p = new Phar(dirname(__FILE__) . '/brandnewphar.phar', 0, 'brandnewphar.phar');
+//var_dump($p->getStub());
+var_dump($p->isBuffering());
+$p->startBuffering();
+var_dump($p->isBuffering());
+$p['a.php'] = '<?php var_dump("Hello");';
+$p->setStub('<?php var_dump("First"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>');
+include 'phar://brandnewphar.phar/a.php';
+var_dump($p->getStub());
+$p['b.php'] = '<?php var_dump("World");';
+$p->setStub('<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER();');
+include 'phar://brandnewphar.phar/b.php';
+var_dump($p->getStub());
+$p->stopBuffering();
+echo "===COMMIT===\n";
+var_dump($p->isBuffering());
+include 'phar://brandnewphar.phar/a.php';
+include 'phar://brandnewphar.phar/b.php';
+var_dump($p->getStub());
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/brandnewphar.phar');
+?>
+--EXPECT--
+bool(false)
+bool(true)
+unicode(5) "Hello"
+string(84) "<?php var_dump("First"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+unicode(5) "World"
+string(85) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+===COMMIT===
+bool(false)
+unicode(5) "Hello"
+unicode(5) "World"
+string(85) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromdirectory1.phpt b/ext/phar/tests/phar_buildfromdirectory1.phpt
new file mode 100644
index 0000000..63e06fa
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromdirectory1.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Phar::buildFromDirectory() - readonly
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$phar = new Phar(dirname(__FILE__) . '/buildfromdirectory.phar');
+try {
+ ini_set('phar.readonly', 1);
+ $phar->buildFromDirectory(1);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromdirectory.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+%s(24) "UnexpectedValueException"
+Cannot write to archive - write operations restricted by INI setting
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromdirectory2-win.phpt b/ext/phar/tests/phar_buildfromdirectory2-win.phpt
new file mode 100644
index 0000000..9dbcf96
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromdirectory2-win.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Phar::buildFromDirectory() - non-directory passed as first parameter
+--SKIPIF--
+<?php
+ if (!extension_loaded("phar")) die("skip");
+ if (substr(PHP_OS, 0, 3) != "WIN") die("skip Windows only test");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+try {
+ $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory.phar');
+ $phar->buildFromDirectory(1);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromdirectory.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+%s(24) "UnexpectedValueException"
+RecursiveDirectoryIterator::__construct(1,1): The system cannot find the file specified. (code: 2)
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromdirectory2.phpt b/ext/phar/tests/phar_buildfromdirectory2.phpt
new file mode 100644
index 0000000..639ff0b
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromdirectory2.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Phar::buildFromDirectory() - non-directory passed as first parameter
+--SKIPIF--
+<?php
+ if (!extension_loaded("phar")) die("skip");
+ if (substr(PHP_OS, 0, 3) == "WIN") die("skip not for Windows");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+try {
+ $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory.phar');
+ $phar->buildFromDirectory(1);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromdirectory.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+%s(24) "UnexpectedValueException"
+RecursiveDirectoryIterator::__construct(1): failed to open dir: No such file or directory
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromdirectory3.phpt b/ext/phar/tests/phar_buildfromdirectory3.phpt
new file mode 100644
index 0000000..2134cbd
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromdirectory3.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Phar::buildFromDirectory() - object passed as second parameter
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+try {
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar');
+ $phar->buildFromDirectory('files', new stdClass);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+Warning: Phar::buildFromDirectory() expects parameter 2 to be %string, object given in %sphar_buildfromdirectory3.php on line %d
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromdirectory4.phpt b/ext/phar/tests/phar_buildfromdirectory4.phpt
new file mode 100644
index 0000000..683ac4b
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromdirectory4.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Phar::buildFromDirectory(), directory exists
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+open_basedir=
+--FILE--
+<?php
+
+mkdir(dirname(__FILE__).'/testdir');
+foreach(range(1, 4) as $i) {
+ file_put_contents(dirname(__FILE__)."/testdir/file$i.txt", "some content for file $i");
+}
+
+try {
+ $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory.phar');
+ $a = $phar->buildFromDirectory(dirname(__FILE__) . '/testdir');
+ asort($a);
+ var_dump($a);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+
+var_dump(file_exists(dirname(__FILE__) . '/buildfromdirectory.phar'));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromdirectory.phar');
+foreach(range(1, 4) as $i) {
+ unlink(dirname(__FILE__) . "/testdir/file$i.txt");
+}
+rmdir(dirname(__FILE__) . '/testdir');
+?>
+--EXPECTF--
+array(4) {
+ ["file1.txt"]=>
+ string(%d) "%stestdir%cfile1.txt"
+ ["file2.txt"]=>
+ string(%d) "%stestdir%cfile2.txt"
+ ["file3.txt"]=>
+ string(%d) "%stestdir%cfile3.txt"
+ ["file4.txt"]=>
+ string(%d) "%stestdir%cfile4.txt"
+}
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromdirectory5.phpt b/ext/phar/tests/phar_buildfromdirectory5.phpt
new file mode 100644
index 0000000..51e5cec
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromdirectory5.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Phar::buildFromDirectory() with matching regex
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+mkdir(dirname(__FILE__).'/testdir');
+foreach(range(1, 4) as $i) {
+ file_put_contents(dirname(__FILE__)."/testdir/file$i.txt", "some content for file $i");
+}
+
+try {
+ $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory.phar');
+ $a = $phar->buildFromDirectory(dirname(__FILE__) . '/testdir', '/\.txt/');
+ asort($a);
+ var_dump($a);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+
+var_dump(file_exists(dirname(__FILE__) . '/buildfromdirectory.phar'));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromdirectory.phar');
+foreach(range(1, 4) as $i) {
+ unlink(dirname(__FILE__) . "/testdir/file$i.txt");
+}
+rmdir(dirname(__FILE__) . '/testdir');
+?>
+--EXPECTF--
+array(4) {
+ ["file1.txt"]=>
+ string(%d) "%stestdir%cfile1.txt"
+ ["file2.txt"]=>
+ string(%d) "%stestdir%cfile2.txt"
+ ["file3.txt"]=>
+ string(%d) "%stestdir%cfile3.txt"
+ ["file4.txt"]=>
+ string(%d) "%stestdir%cfile4.txt"
+}
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromdirectory6.phpt b/ext/phar/tests/phar_buildfromdirectory6.phpt
new file mode 100644
index 0000000..99566c1
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromdirectory6.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Phar::buildFromDirectory() with non-matching regex
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+mkdir(dirname(__FILE__).'/testdir', 0777);
+foreach(range(1, 4) as $i) {
+ file_put_contents(dirname(__FILE__)."/testdir/file$i.txt", "some content for file $i");
+}
+
+try {
+ $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory.phar');
+ var_dump($phar->buildFromDirectory(dirname(__FILE__) . '/testdir', '/\.php$/'));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+
+var_dump(file_exists(dirname(__FILE__) . '/buildfromdirectory.phar'));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromdirectory.phar');
+foreach(range(1, 4) as $i) {
+ unlink(dirname(__FILE__) . "/testdir/file$i.txt");
+}
+rmdir(dirname(__FILE__) . '/testdir');
+?>
+--EXPECT--
+array(0) {
+}
+bool(false)
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromiterator1.phpt b/ext/phar/tests/phar_buildfromiterator1.phpt
new file mode 100644
index 0000000..238ede6
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromiterator1.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Phar::buildFromIterator() readonly
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar');
+try {
+ ini_set('phar.readonly', 1);
+ $phar->buildFromIterator(1);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+%s(24) "UnexpectedValueException"
+Cannot write out phar archive, phar is read-only
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromiterator10.phpt b/ext/phar/tests/phar_buildfromiterator10.phpt
new file mode 100644
index 0000000..024277e
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromiterator10.phpt
@@ -0,0 +1,104 @@
+--TEST--
+Phar::buildFromIterator() RegexIterator(RecursiveIteratorIterator), SplFileInfo as current
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar');
+ $dir = new RecursiveDirectoryIterator('.');
+ $iter = new RecursiveIteratorIterator($dir);
+ $a = $phar->buildFromIterator(new RegexIterator($iter, '/_\d{3}\.phpt$/'), dirname(__FILE__) . DIRECTORY_SEPARATOR);
+ asort($a);
+ var_dump($a);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+array(35) {
+ ["phar_ctx_001.phpt"]=>
+ string(%d) "%sphar_ctx_001.phpt"
+ ["phar_get_supported_signatures_001.phpt"]=>
+ string(%d) "%sphar_get_supported_signatures_001.phpt"
+ ["phar_get_supported_signatures_002.phpt"]=>
+ string(%d) "%sphar_get_supported_signatures_002.phpt"
+ ["phar_oo_001.phpt"]=>
+ string(%d) "%sphar_oo_001.phpt"
+ ["phar_oo_002.phpt"]=>
+ string(%d) "%sphar_oo_002.phpt"
+ ["phar_oo_003.phpt"]=>
+ string(%d) "%sphar_oo_003.phpt"
+ ["phar_oo_004.phpt"]=>
+ string(%d) "%sphar_oo_004.phpt"
+ ["phar_oo_005.phpt"]=>
+ string(%d) "%sphar_oo_005.phpt"
+ ["phar_oo_006.phpt"]=>
+ string(%d) "%sphar_oo_006.phpt"
+ ["phar_oo_007.phpt"]=>
+ string(%d) "%sphar_oo_007.phpt"
+ ["phar_oo_008.phpt"]=>
+ string(%d) "%sphar_oo_008.phpt"
+ ["phar_oo_009.phpt"]=>
+ string(%d) "%sphar_oo_009.phpt"
+ ["phar_oo_010.phpt"]=>
+ string(%d) "%sphar_oo_010.phpt"
+ ["phar_oo_011.phpt"]=>
+ string(%d) "%sphar_oo_011.phpt"
+ ["phar_oo_012.phpt"]=>
+ string(%d) "%sphar_oo_012.phpt"
+ ["phar_oo_compressed_001.phpt"]=>
+ string(%d) "%sphar_oo_compressed_001.phpt"
+ ["phar_oo_compressed_002.phpt"]=>
+ string(%d) "%sphar_oo_compressed_002.phpt"
+ ["phpinfo_001.phpt"]=>
+ string(%d) "%sphpinfo_001.phpt"
+ ["phpinfo_002.phpt"]=>
+ string(%d) "%sphpinfo_002.phpt"
+ ["phpinfo_003.phpt"]=>
+ string(%d) "%sphpinfo_003.phpt"
+ ["phpinfo_004.phpt"]=>
+ string(%d) "%sphpinfo_004.phpt"
+ ["tar/tar_001.phpt"]=>
+ string(%d) "%star%ctar_001.phpt"
+ ["tar/tar_002.phpt"]=>
+ string(%d) "%star%ctar_002.phpt"
+ ["tar/tar_003.phpt"]=>
+ string(%d) "%star%ctar_003.phpt"
+ ["tar/tar_004.phpt"]=>
+ string(%d) "%star%ctar_004.phpt"
+ ["zip/corrupt_001.phpt"]=>
+ string(%d) "%szip%ccorrupt_001.phpt"
+ ["zip/corrupt_002.phpt"]=>
+ string(%d) "%szip%ccorrupt_002.phpt"
+ ["zip/corrupt_003.phpt"]=>
+ string(%d) "%szip%ccorrupt_003.phpt"
+ ["zip/corrupt_004.phpt"]=>
+ string(%d) "%szip%ccorrupt_004.phpt"
+ ["zip/corrupt_005.phpt"]=>
+ string(%d) "%szip%ccorrupt_005.phpt"
+ ["zip/corrupt_006.phpt"]=>
+ string(%d) "%szip%ccorrupt_006.phpt"
+ ["zip/corrupt_007.phpt"]=>
+ string(%d) "%szip%ccorrupt_007.phpt"
+ ["zip/corrupt_008.phpt"]=>
+ string(%d) "%szip%ccorrupt_008.phpt"
+ ["zip/corrupt_009.phpt"]=>
+ string(%d) "%szip%ccorrupt_009.phpt"
+ ["zip/corrupt_010.phpt"]=>
+ string(%d) "%szip%ccorrupt_010.phpt"
+}
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromiterator2.phpt b/ext/phar/tests/phar_buildfromiterator2.phpt
new file mode 100644
index 0000000..cdc2df1
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromiterator2.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Phar::buildFromIterator() wrong object
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+try {
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar');
+ $phar->buildFromIterator(new stdClass);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+Warning: Phar::buildFromIterator() expects parameter 1 to be Traversable, object given in %sphar_buildfromiterator2.php on line %d
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromiterator3.phpt b/ext/phar/tests/phar_buildfromiterator3.phpt
new file mode 100644
index 0000000..4a3bc7c
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromiterator3.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Phar::buildFromIterator() iterator, but object passed
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar');
+ $phar->buildFromIterator(new myIterator(array()), new stdClass);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+Warning: Phar::buildFromIterator() expects parameter 2 to be %string, object given in %sphar_buildfromiterator3.php on line %d
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromiterator4.phpt b/ext/phar/tests/phar_buildfromiterator4.phpt
new file mode 100644
index 0000000..cd26138
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromiterator4.phpt
@@ -0,0 +1,83 @@
+--TEST--
+Phar::buildFromIterator() iterator, 1 file passed in
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar');
+ var_dump($phar->buildFromIterator(new myIterator(
+ array(
+ 'a' => basename(__FILE__, 'php') . 'phpt',
+ // demonstrate that none of these are added
+ '.phar/stub.php' => basename(__FILE__, 'php') . 'phpt',
+ '.phar/alias.txt' => basename(__FILE__, 'php') . 'phpt',
+ '.phar/oops' => basename(__FILE__, 'php') . 'phpt',
+ ))));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+key
+next
+valid
+current
+key
+next
+valid
+current
+key
+next
+valid
+current
+key
+next
+valid
+array(1) {
+ ["a"]=>
+ string(%d) "%sphar_buildfromiterator4.phpt"
+}
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromiterator5.phpt b/ext/phar/tests/phar_buildfromiterator5.phpt
new file mode 100644
index 0000000..8431c12
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromiterator5.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Phar::buildFromIterator() iterator, iterator returns non-string
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar');
+ var_dump($phar->buildFromIterator(new myIterator(array('a' => new stdClass))));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+%s(24) "UnexpectedValueException"
+Iterator myIterator returned an invalid value (must return a string)
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromiterator6.phpt b/ext/phar/tests/phar_buildfromiterator6.phpt
new file mode 100644
index 0000000..9c506c8
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromiterator6.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Phar::buildFromIterator() iterator, key is int
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar');
+ var_dump($phar->buildFromIterator(new myIterator(array(basename(__FILE__, 'php') . 'phpt'))));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+key
+%s(24) "UnexpectedValueException"
+Iterator myIterator returned an invalid key (must return a string)
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromiterator7.phpt b/ext/phar/tests/phar_buildfromiterator7.phpt
new file mode 100644
index 0000000..2bac4c8
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromiterator7.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Phar::buildFromIterator() iterator, file can't be opened
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar');
+ var_dump($phar->buildFromIterator(new myIterator(array('a' => basename(__FILE__, 'php') . '/oopsie/there.phpt'))));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+key
+%s(24) "UnexpectedValueException"
+Iterator myIterator returned a file that could not be opened "phar_buildfromiterator7./oopsie/there.phpt"
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromiterator8.phpt b/ext/phar/tests/phar_buildfromiterator8.phpt
new file mode 100644
index 0000000..bb1b780
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromiterator8.phpt
@@ -0,0 +1,95 @@
+--TEST--
+Phar::buildFromIterator() RegexIterator(DirectoryIterator), SplFileInfo as current
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar');
+ $a = $phar->buildFromIterator(new RegexIterator(new DirectoryIterator('.'), '/^\d{0,3}\.phpt\\z|^\.\\z|^\.\.\\z/'), dirname(__FILE__) . DIRECTORY_SEPARATOR);
+ asort($a);
+ var_dump($a);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+array(33) {
+ ["001.phpt"]=>
+ string(%d) "%s001.phpt"
+ ["002.phpt"]=>
+ string(%d) "%s002.phpt"
+ ["003.phpt"]=>
+ string(%d) "%s003.phpt"
+ ["004.phpt"]=>
+ string(%d) "%s004.phpt"
+ ["005.phpt"]=>
+ string(%d) "%s005.phpt"
+ ["006.phpt"]=>
+ string(%d) "%s006.phpt"
+ ["007.phpt"]=>
+ string(%d) "%s007.phpt"
+ ["008.phpt"]=>
+ string(%d) "%s008.phpt"
+ ["009.phpt"]=>
+ string(%d) "%s009.phpt"
+ ["010.phpt"]=>
+ string(%d) "%s010.phpt"
+ ["011.phpt"]=>
+ string(%d) "%s011.phpt"
+ ["012.phpt"]=>
+ string(%d) "%s012.phpt"
+ ["013.phpt"]=>
+ string(%d) "%s013.phpt"
+ ["014.phpt"]=>
+ string(%d) "%s014.phpt"
+ ["015.phpt"]=>
+ string(%d) "%s015.phpt"
+ ["016.phpt"]=>
+ string(%d) "%s016.phpt"
+ ["017.phpt"]=>
+ string(%d) "%s017.phpt"
+ ["018.phpt"]=>
+ string(%d) "%s018.phpt"
+ ["019.phpt"]=>
+ string(%d) "%s019.phpt"
+ ["020.phpt"]=>
+ string(%d) "%s020.phpt"
+ ["021.phpt"]=>
+ string(%d) "%s021.phpt"
+ ["022.phpt"]=>
+ string(%d) "%s022.phpt"
+ ["023.phpt"]=>
+ string(%d) "%s023.phpt"
+ ["024.phpt"]=>
+ string(%d) "%s024.phpt"
+ ["025.phpt"]=>
+ string(%d) "%s025.phpt"
+ ["026.phpt"]=>
+ string(%d) "%s026.phpt"
+ ["027.phpt"]=>
+ string(%d) "%s027.phpt"
+ ["028.phpt"]=>
+ string(%d) "%s028.phpt"
+ ["029.phpt"]=>
+ string(%d) "%s029.phpt"
+ ["030.phpt"]=>
+ string(%d) "%s030.phpt"
+ ["031.phpt"]=>
+ string(%d) "%s031.phpt"
+ ["032.phpt"]=>
+ string(%d) "%s032.phpt"
+ ["033.phpt"]=>
+ string(%d) "%s033.phpt"
+}
+===DONE===
diff --git a/ext/phar/tests/phar_buildfromiterator9.phpt b/ext/phar/tests/phar_buildfromiterator9.phpt
new file mode 100644
index 0000000..0b56307
--- /dev/null
+++ b/ext/phar/tests/phar_buildfromiterator9.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Phar::buildFromIterator() iterator, 1 file resource passed in
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar');
+ var_dump($phar->buildFromIterator(new myIterator(array('a' => $a = fopen(basename(__FILE__, 'php') . 'phpt', 'r')))));
+ fclose($a);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+key
+next
+valid
+array(1) {
+ ["a"]=>
+ string(%d) "[stream]"
+}
+===DONE===
diff --git a/ext/phar/tests/phar_bz2.phpt b/ext/phar/tests/phar_bz2.phpt
new file mode 100644
index 0000000..0e6e3ec
--- /dev/null
+++ b/ext/phar/tests/phar_bz2.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Phar: bzipped phar
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (!extension_loaded("bz2")) die("skip bz2 not available");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/phar_bz2.phar';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/phar_bz2.2.phar';
+$pname2 = 'phar://' . $fname2;
+
+$file = '<?php
+Phar::mapPhar();
+var_dump("it worked");
+include "phar://" . __FILE__ . "/tar_004.php";
+__HALT_COMPILER();';
+
+$files = array();
+$files['tar_004.php'] = '<?php var_dump(__FILE__);';
+$files['internal/file/here'] = "hi there!\n";
+$files['internal/dir/'] = '';
+$files['dir/'] = '';
+$bz2 = true;
+
+include 'files/phar_test.inc';
+
+include $fname;
+
+$a = new Phar($fname);
+$a['test'] = 'hi';
+copy($fname, $fname2);
+$a->setAlias('another');
+$b = new Phar($fname2);
+var_dump($b->isFileFormat(Phar::PHAR));
+var_dump($b->isCompressed() == Phar::BZ2);
+// additional code coverage
+$b->isFileFormat(array());
+try {
+$b->isFileFormat(25);
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/phar_bz2.phar');
+@unlink(dirname(__FILE__) . '/phar_bz2.2.phar');
+?>
+--EXPECTF--
+%unicode|string%(9) "it worked"
+%unicode|string%(%d) "phar://%sphar_bz2.phar/tar_004.php"
+bool(true)
+bool(true)
+
+Warning: Phar::isFileFormat() expects parameter 1 to be long, array given in %sphar_bz2.php on line %d
+Unknown file format specified
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_commitwrite.phpt b/ext/phar/tests/phar_commitwrite.phpt
new file mode 100644
index 0000000..8e36681
--- /dev/null
+++ b/ext/phar/tests/phar_commitwrite.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Phar::setStub()/stopBuffering()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$p = new Phar(dirname(__FILE__) . '/brandnewphar.phar', 0, 'brandnewphar.phar');
+$p['file1.txt'] = 'hi';
+$p->stopBuffering();
+var_dump(strlen($p->getStub()));
+$p->setStub("<?php
+function __autoload(\$class)
+{
+ include 'phar://' . str_replace('_', '/', \$class);
+}
+Phar::mapPhar('brandnewphar.phar');
+include 'phar://brandnewphar.phar/startup.php';
+__HALT_COMPILER();
+?>");
+var_dump($p->getStub());
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/brandnewphar.phar');
+__HALT_COMPILER();
+?>
+--EXPECT--
+int(6683)
+string(200) "<?php
+function __autoload($class)
+{
+ include 'phar://' . str_replace('_', '/', $class);
+}
+Phar::mapPhar('brandnewphar.phar');
+include 'phar://brandnewphar.phar/startup.php';
+__HALT_COMPILER(); ?>
+"
+===DONE===
diff --git a/ext/phar/tests/phar_construct_invalidurl.phpt b/ext/phar/tests/phar_construct_invalidurl.phpt
new file mode 100644
index 0000000..30a4687
--- /dev/null
+++ b/ext/phar/tests/phar_construct_invalidurl.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Phar object passed URL
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+try {
+ $a = new Phar('http://should.fail.com');
+} catch (UnexpectedValueException $e) {
+ echo $e->getMessage(),"\n";
+}
+try {
+ $a = new Phar('http://');
+} catch (UnexpectedValueException $e) {
+ echo $e->getMessage(),"\n";
+}
+try {
+ $a = new Phar('http:/');
+} catch (UnexpectedValueException $e) {
+ echo $e->getMessage(),"\n";
+}
+?>
+===DONE===
+--EXPECT--
+Cannot create a phar archive from a URL like "http://should.fail.com". Phar objects can only be created from local files
+Cannot create a phar archive from a URL like "http://". Phar objects can only be created from local files
+Cannot create phar 'http:/', file extension (or combination) not recognised or the directory does not exist
+===DONE===
diff --git a/ext/phar/tests/phar_convert_again.phpt b/ext/phar/tests/phar_convert_again.phpt
new file mode 100644
index 0000000..bbf2c66
--- /dev/null
+++ b/ext/phar/tests/phar_convert_again.phpt
@@ -0,0 +1,205 @@
+--TEST--
+Phar::conversion to other formats
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip no zlib"); ?>
+<?php if (!extension_loaded("bz2")) die("skip no bz2"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.tbz';
+$pname = 'phar://' . $fname;
+$stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
+$file = $stub;
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+$zip = $phar->convertToData(Phar::ZIP);
+echo $zip->getPath() . "\n";
+$tgz = $phar->convertToData(Phar::TAR, Phar::GZ);
+echo $tgz->getPath() . "\n";
+$tbz = $phar->convertToData(Phar::TAR, Phar::BZ2);
+echo $tbz->getPath() . "\n";
+try {
+$phar = $tbz->convertToExecutable(Phar::PHAR, Phar::NONE);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+copy($tbz->getPath(), $fname2);
+$tbz = new PharData($fname2);
+$phar = $tbz->convertToExecutable(Phar::PHAR, Phar::NONE);
+echo $phar->getPath() . "\n";
+$phar['a'] = 'hi';
+$phar['a']->setMetadata('hi');
+$zip = $phar->convertToExecutable(Phar::ZIP);
+echo $zip->getPath() . "\n";
+echo $zip['a']->getMetadata() . "\n";
+$data = $zip->convertToData();
+echo $data->getPath() . "\n";
+// extra code coverage
+try {
+$data->setStub('hi');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$data->setDefaultStub();
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$data->setAlias('hi');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+$tar = $phar->convertToExecutable(Phar::TAR);
+echo $tar->getPath() . "\n";
+$data = $tar->convertToData();
+echo $data->getPath() . "\n";
+$tgz = $tar->convertToExecutable(null, Phar::GZ);
+echo $tgz->getPath() . "\n";
+try {
+$tgz->convertToExecutable(25);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$tgz->convertToExecutable(Phar::ZIP, Phar::GZ);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$tgz->convertToExecutable(Phar::ZIP, Phar::BZ2);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$phar->convertToData();
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$tgz->convertToData(Phar::PHAR);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$tgz->convertToData(25);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$tgz->convertToData(Phar::ZIP, Phar::GZ);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$tgz->convertToData(Phar::ZIP, Phar::BZ2);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$tgz->convertToExecutable(Phar::TAR, 25);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$tgz->convertToData(Phar::TAR, 25);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+// extra code coverage
+try {
+$data->setStub('hi');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$data->setAlias('hi');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$data->setDefaultStub();
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$tgz->convertToData(Phar::TAR, Phar::GZ, '.phar.tgz.oops');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+
+try {
+$phar->convertToExecutable(Phar::TAR, Phar::GZ, '.tgz.oops');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+
+try {
+$tgz->convertToData(Phar::TAR, Phar::GZ, '.phar/.tgz.oops');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.gz');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar.gz');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar.bz2');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.tbz');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.tar.gz');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+%sphar_convert_again.zip
+%sphar_convert_again.tar.gz
+%sphar_convert_again.tar.bz2
+Unable to add newly converted phar "%sphar_convert_again.phar" to the list of phars, a phar with that name already exists
+%sphar_convert_again2.phar
+%sphar_convert_again2.phar.zip
+hi
+%sphar_convert_again2.zip
+A Phar stub cannot be set in a plain zip archive
+A Phar stub cannot be set in a plain zip archive
+A Phar alias cannot be set in a plain zip archive
+%sphar_convert_again2.phar.tar
+%sphar_convert_again2.tar
+%sphar_convert_again2.phar.tar.gz
+Unknown file format specified, please pass one of Phar::PHAR, Phar::TAR or Phar::ZIP
+Cannot compress entire archive with gzip, zip archives do not support whole-archive compression
+Cannot compress entire archive with bz2, zip archives do not support whole-archive compression
+Cannot write out data phar archive, use Phar::TAR or Phar::ZIP
+Cannot write out data phar archive, use Phar::TAR or Phar::ZIP
+Unknown file format specified, please pass one of Phar::TAR or Phar::ZIP
+Cannot compress entire archive with gzip, zip archives do not support whole-archive compression
+Cannot compress entire archive with bz2, zip archives do not support whole-archive compression
+Unknown compression specified, please pass one of Phar::GZ or Phar::BZ2
+Unknown compression specified, please pass one of Phar::GZ or Phar::BZ2
+A Phar stub cannot be set in a plain tar archive
+A Phar alias cannot be set in a plain tar archive
+A Phar stub cannot be set in a plain tar archive
+data phar "%sphar_convert_again2.phar.tgz.oops" has invalid extension phar.tgz.oops
+phar "%sphar_convert_again2.tgz.oops" has invalid extension tgz.oops
+data phar "%sphar_convert_again2.phar/.tgz.oops" has invalid extension phar/.tgz.oops
+===DONE===
diff --git a/ext/phar/tests/phar_convert_repeated.phpt b/ext/phar/tests/phar_convert_repeated.phpt
new file mode 100644
index 0000000..e4b1fe4
--- /dev/null
+++ b/ext/phar/tests/phar_convert_repeated.phpt
@@ -0,0 +1,149 @@
+--TEST--
+Phar::convertToZip|Tar|Phar() repeated (phar_based archives)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
+$file = $stub;
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+echo "=================== new Phar() =======================\n";
+$phar = new Phar($fname);
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+var_dump($phar->getAlias());
+
+echo "================= convertToTar() =====================\n";
+
+$phar = $phar->convertToExecutable(Phar::TAR);
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+var_dump($phar->getAlias());
+
+echo "================= convertToZip() =====================\n";
+
+$phar = $phar->convertToExecutable(Phar::ZIP);
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+var_dump($phar->getAlias());
+
+echo "================= convertToPhar() ====================\n";
+
+$phar = $phar->convertToExecutable(Phar::PHAR, Phar::NONE, '.2.phar');
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump(strlen($phar->getStub()));
+var_dump($phar->getAlias());
+
+echo "================= convertToZip() =====================\n";
+
+$phar = $phar->convertToExecutable(Phar::ZIP, Phar::NONE, '.2.phar.zip');
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+var_dump($phar->getAlias());
+
+echo "================= convertToTar() =====================\n";
+
+$phar = $phar->convertToExecutable(Phar::TAR, Phar::NONE, '2.phar.tar');
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+var_dump($phar->getAlias());
+
+echo "================= convertToZip() =====================\n";
+
+$phar = $phar->convertToExecutable(Phar::ZIP, Phar::NONE, '3.phar.zip');
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+var_dump($phar->getAlias());
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.3.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.3.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.3.phar');
+?>
+--EXPECTF--
+=================== new Phar() =======================
+bool(true)
+bool(false)
+bool(false)
+string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
+string(3) "hio"
+================= convertToTar() =====================
+bool(false)
+bool(true)
+bool(false)
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+string(%d) "%sphar_convert_repeated.phar.tar"
+================= convertToZip() =====================
+bool(false)
+bool(false)
+bool(true)
+string(60) "<?php // zip-based phar archive stub file
+__HALT_COMPILER();"
+NULL
+================= convertToPhar() ====================
+bool(true)
+bool(false)
+bool(false)
+int(6683)
+NULL
+================= convertToZip() =====================
+bool(false)
+bool(false)
+bool(true)
+string(60) "<?php // zip-based phar archive stub file
+__HALT_COMPILER();"
+NULL
+================= convertToTar() =====================
+bool(false)
+bool(true)
+bool(false)
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+NULL
+================= convertToZip() =====================
+bool(false)
+bool(false)
+bool(true)
+string(60) "<?php // zip-based phar archive stub file
+__HALT_COMPILER();"
+NULL
+===DONE===
diff --git a/ext/phar/tests/phar_convert_repeated_b.phpt b/ext/phar/tests/phar_convert_repeated_b.phpt
new file mode 100644
index 0000000..10e6973
--- /dev/null
+++ b/ext/phar/tests/phar_convert_repeated_b.phpt
@@ -0,0 +1,118 @@
+--TEST--
+PharData::convertToZip|Tar|Phar() repeated (phardata_based archives)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--INI--
+phar.readonly=1
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.zip';
+
+echo "=================== new PharData() ==================\n";
+$phar = new PharData($fname);
+$phar['a'] = 'a';
+$phar['b'] = 'b';
+$phar['c'] = 'c';
+
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+var_dump($phar->getAlias());
+
+echo "================= convertToTar() =====================\n";
+
+$phar = $phar->convertToData(Phar::TAR);
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+var_dump($phar->getAlias());
+
+echo "================= convertToZip() =====================\n";
+
+$phar = $phar->convertToData(Phar::ZIP, Phar::NONE, '.1.zip');
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+var_dump($phar->getAlias());
+
+echo "================= convertToPhar() ====================\n";
+
+try {
+ $phar = $phar->convertToExecutable(Phar::PHAR);
+ var_dump($phar->isFileFormat(Phar::PHAR));
+ var_dump($phar->isFileFormat(Phar::TAR));
+ var_dump($phar->isFileFormat(Phar::ZIP));
+ var_dump(strlen($phar->getStub()));
+ var_dump($phar->getAlias());
+} catch(Exception $e) {
+ echo $e->getMessage()."\n";
+}
+
+echo "================ convertToTar(GZ) ====================\n";
+
+$phar = $phar->convertToData(Phar::TAR, Phar::GZ, '.2.tar');
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+var_dump($phar->getAlias());
+
+echo "================= convertToPhar() ====================\n";
+
+try {
+ $phar = $phar->convertToExecutable(Phar::PHAR);
+ var_dump($phar->isFileFormat(Phar::PHAR));
+ var_dump($phar->isFileFormat(Phar::TAR));
+ var_dump($phar->isFileFormat(Phar::ZIP));
+ var_dump(strlen($phar->getStub()));
+ var_dump($phar->getAlias());
+} catch(Exception $e) {
+ echo $e->getMessage()."\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.gz');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar.gz');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.zip');
+?>
+--EXPECT--
+=================== new PharData() ==================
+bool(false)
+bool(false)
+bool(true)
+string(0) ""
+NULL
+================= convertToTar() =====================
+bool(false)
+bool(true)
+bool(false)
+string(0) ""
+NULL
+================= convertToZip() =====================
+bool(false)
+bool(false)
+bool(true)
+string(0) ""
+NULL
+================= convertToPhar() ====================
+Cannot write out executable phar archive, phar is read-only
+================ convertToTar(GZ) ====================
+bool(false)
+bool(true)
+bool(false)
+string(0) ""
+NULL
+================= convertToPhar() ====================
+Cannot write out executable phar archive, phar is read-only
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_convert_tar.phpt b/ext/phar/tests/phar_convert_tar.phpt
new file mode 100644
index 0000000..d4031ec
--- /dev/null
+++ b/ext/phar/tests/phar_convert_tar.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Phar::convertToTar()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.tar';
+$stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
+$file = $stub;
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->getStub());
+
+$phar = $phar->convertToExecutable(Phar::TAR);
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->getStub());
+
+copy($fname2, $fname3);
+
+$phar = new Phar($fname3);
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->getStub());
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar');
+__HALT_COMPILER();
+?>
+--EXPECT--
+bool(false)
+string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
+bool(true)
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+bool(true)
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+===DONE===
diff --git a/ext/phar/tests/phar_convert_tar2.phpt b/ext/phar/tests/phar_convert_tar2.phpt
new file mode 100644
index 0000000..f0f0f69
--- /dev/null
+++ b/ext/phar/tests/phar_convert_tar2.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Phar::convertToTar() gzip compressed
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.gz';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.tar';
+$stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
+$file = $stub;
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isCompressed());
+var_dump($phar->getStub());
+
+$phar = $phar->convertToExecutable(Phar::TAR, Phar::GZ);
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isCompressed());
+var_dump($phar->getStub());
+
+copy($fname2, $fname3);
+
+$phar = new Phar($fname3);
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isCompressed() == Phar::GZ);
+var_dump($phar->getStub());
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.gz');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+?>
+--EXPECT--
+bool(false)
+bool(false)
+string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
+bool(true)
+int(4096)
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+bool(true)
+bool(true)
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+===DONE===
diff --git a/ext/phar/tests/phar_convert_tar3.phpt b/ext/phar/tests/phar_convert_tar3.phpt
new file mode 100644
index 0000000..52fd0f5
--- /dev/null
+++ b/ext/phar/tests/phar_convert_tar3.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Phar::convertToTar() bz2 compressed
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("bz2")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.tar';
+$stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
+$file = $stub;
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isCompressed());
+var_dump($phar->getStub());
+
+$phar = $phar->convertToExecutable(Phar::TAR, Phar::BZ2);
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isCompressed());
+var_dump($phar->getStub());
+
+copy($fname2 . '.bz2', $fname3);
+
+$phar = new Phar($fname3);
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->isCompressed() == Phar::BZ2);
+var_dump($phar->getStub());
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.bz2');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+__HALT_COMPILER();
+?>
+--EXPECT--
+bool(false)
+bool(false)
+string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
+bool(true)
+int(8192)
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+bool(true)
+bool(true)
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+===DONE===
diff --git a/ext/phar/tests/phar_convert_zip.phpt b/ext/phar/tests/phar_convert_zip.phpt
new file mode 100644
index 0000000..734551e
--- /dev/null
+++ b/ext/phar/tests/phar_convert_zip.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Phar::convertToZip()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip';
+$stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
+$file = $stub;
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+
+$phar = $phar->convertToExecutable(Phar::ZIP);
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+
+copy($fname2, $fname3);
+
+$phar = new Phar($fname3);
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip');
+__HALT_COMPILER();
+?>
+--EXPECT--
+bool(false)
+string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
+bool(true)
+string(60) "<?php // zip-based phar archive stub file
+__HALT_COMPILER();"
+bool(true)
+string(60) "<?php // zip-based phar archive stub file
+__HALT_COMPILER();"
+===DONE===
diff --git a/ext/phar/tests/phar_copy.phpt b/ext/phar/tests/phar_copy.phpt
new file mode 100644
index 0000000..382b7f0
--- /dev/null
+++ b/ext/phar/tests/phar_copy.phpt
@@ -0,0 +1,84 @@
+--TEST--
+Phar: copy()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=1
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar.php';
+
+$pname = 'phar://'.$fname;
+$iname = '/file.txt';
+$ename = '/error/..';
+
+$p = new Phar($fname);
+
+try
+{
+ $p['a'] = 'hi';
+ $p->startBuffering();
+ $p->copy('a', 'b');
+ echo file_get_contents($p['b']->getPathName());
+ $p['a']->compress(Phar::GZ);
+ $p['b']->setMetadata('a');
+ $p->copy('b', 'c');
+ $p->stopBuffering();
+ echo file_get_contents($p['c']->getPathName());
+ copy($fname, $fname2);
+ $p->copy('a', $ename);
+}
+catch(Exception $e)
+{
+ echo $e->getMessage() . "\n";
+}
+ini_set('phar.readonly',1);
+$p2 = new Phar($fname2);
+echo "\n";
+echo 'a: ' , file_get_contents($p2['a']->getPathName());
+echo 'b: ' ,file_get_contents($p2['b']->getPathName());
+echo 'c: ' ,file_get_contents($p2['c']->getPathName()), $p2['c']->getMetaData(), "\n";
+ini_set('phar.readonly', 0);
+try {
+$p2->copy('notexisting', 'another');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$p2->copy('a', 'b');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+$p2['a']->compress(Phar::GZ);
+$p2->copy('a', 'd');
+echo $p2['d']->getContent() . "\n";
+try {
+$p2->copy('d', '.phar/stub.php');
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+try {
+$p2->copy('.phar/stub.php', 'd');
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.php'); ?>
+--EXPECTF--
+hihifile "/error/.." contains invalid characters upper directory reference, cannot be copied from "a" in phar %s
+
+a: hib: hic: hia
+file "notexisting" cannot be copied to file "another", file does not exist in %sphar_copy2.phar.php
+file "a" cannot be copied to file "b", file must not already exist in phar %sphar_copy2.phar.php
+hi
+file "d" cannot be copied to file ".phar/stub.php", cannot copy to Phar meta-file in %sphar_copy2.phar.php
+file ".phar/stub.php" cannot be copied to file "d", cannot copy Phar meta-file in %sphar_copy2.phar.php
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_create_in_cwd.phpt b/ext/phar/tests/phar_create_in_cwd.phpt
new file mode 100644
index 0000000..1828fe7
--- /dev/null
+++ b/ext/phar/tests/phar_create_in_cwd.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Phar: attempt to create a Phar with relative path
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+chdir(dirname(__FILE__));
+try {
+ $p = new Phar('brandnewphar.phar');
+ $p['file1.txt'] = 'hi';
+ var_dump(strlen($p->getStub()));
+ $p->setStub("<?php
+function __autoload(\$class)
+{
+ include 'phar://' . str_replace('_', '/', \$class);
+}
+Phar::mapPhar('brandnewphar.phar');
+include 'phar://brandnewphar.phar/startup.php';
+__HALT_COMPILER();
+?>");
+ var_dump($p->getStub());
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/brandnewphar.phar');
+?>
+--EXPECT--
+int(6683)
+string(200) "<?php
+function __autoload($class)
+{
+ include 'phar://' . str_replace('_', '/', $class);
+}
+Phar::mapPhar('brandnewphar.phar');
+include 'phar://brandnewphar.phar/startup.php';
+__HALT_COMPILER(); ?>
+"
+===DONE===
diff --git a/ext/phar/tests/phar_createdefaultstub.phpt b/ext/phar/tests/phar_createdefaultstub.phpt
new file mode 100644
index 0000000..abc9ad8
--- /dev/null
+++ b/ext/phar/tests/phar_createdefaultstub.phpt
@@ -0,0 +1,929 @@
+--TEST--
+Phar: Phar::createDefaultStub() with and without arg
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+try {
+var_dump(Phar::createDefaultStub());
+echo "============================================================================\n";
+echo "============================================================================\n";
+var_dump(Phar::createDefaultStub('my/custom/thingy.php'));
+echo "============================================================================\n";
+echo "============================================================================\n";
+var_dump(strlen(Phar::createDefaultStub(str_repeat('a', 400))));
+echo "============================================================================\n";
+echo "============================================================================\n";
+var_dump(Phar::createDefaultStub(str_repeat('a', 401)));
+} catch(Exception $e) {
+echo $e->getMessage() . "\n";
+}
+echo "============================================================================\n";
+echo "============================================================================\n";
+echo "============================================================================\n";
+echo "============================================================================\n";
+try {
+var_dump(Phar::createDefaultStub('my/custom/thingy.php', 'the/web.php'));
+echo "============================================================================\n";
+echo "============================================================================\n";
+var_dump(strlen(Phar::createDefaultStub('index.php', str_repeat('a', 400))));
+var_dump(Phar::createDefaultStub('hio', str_repeat('a', 401)));
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECT--
+string(6683) "<?php
+
+$web = 'index.php';
+
+if (in_array('phar', stream_get_wrappers()) && class_exists('Phar', 0)) {
+Phar::interceptFileFuncs();
+set_include_path('phar://' . __FILE__ . PATH_SEPARATOR . get_include_path());
+Phar::webPhar(null, $web);
+include 'phar://' . __FILE__ . '/' . Extract_Phar::START;
+return;
+}
+
+if (@(isset($_SERVER['REQUEST_URI']) && isset($_SERVER['REQUEST_METHOD']) && ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'POST'))) {
+Extract_Phar::go(true);
+$mimes = array(
+'phps' => 2,
+'c' => 'text/plain',
+'cc' => 'text/plain',
+'cpp' => 'text/plain',
+'c++' => 'text/plain',
+'dtd' => 'text/plain',
+'h' => 'text/plain',
+'log' => 'text/plain',
+'rng' => 'text/plain',
+'txt' => 'text/plain',
+'xsd' => 'text/plain',
+'php' => 1,
+'inc' => 1,
+'avi' => 'video/avi',
+'bmp' => 'image/bmp',
+'css' => 'text/css',
+'gif' => 'image/gif',
+'htm' => 'text/html',
+'html' => 'text/html',
+'htmls' => 'text/html',
+'ico' => 'image/x-ico',
+'jpe' => 'image/jpeg',
+'jpg' => 'image/jpeg',
+'jpeg' => 'image/jpeg',
+'js' => 'application/x-javascript',
+'midi' => 'audio/midi',
+'mid' => 'audio/midi',
+'mod' => 'audio/mod',
+'mov' => 'movie/quicktime',
+'mp3' => 'audio/mp3',
+'mpg' => 'video/mpeg',
+'mpeg' => 'video/mpeg',
+'pdf' => 'application/pdf',
+'png' => 'image/png',
+'swf' => 'application/shockwave-flash',
+'tif' => 'image/tiff',
+'tiff' => 'image/tiff',
+'wav' => 'audio/wav',
+'xbm' => 'image/xbm',
+'xml' => 'text/xml',
+);
+
+header("Cache-Control: no-cache, must-revalidate");
+header("Pragma: no-cache");
+
+$basename = basename(__FILE__);
+if (!strpos($_SERVER['REQUEST_URI'], $basename)) {
+chdir(Extract_Phar::$temp);
+include $web;
+return;
+}
+$pt = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $basename) + strlen($basename));
+if (!$pt || $pt == '/') {
+$pt = $web;
+header('HTTP/1.1 301 Moved Permanently');
+header('Location: ' . $_SERVER['REQUEST_URI'] . '/' . $pt);
+exit;
+}
+$a = realpath(Extract_Phar::$temp . DIRECTORY_SEPARATOR . $pt);
+if (!$a || strlen(dirname($a)) < strlen(Extract_Phar::$temp)) {
+header('HTTP/1.0 404 Not Found');
+echo "<html>\n <head>\n <title>File Not Found<title>\n </head>\n <body>\n <h1>404 - File ", $pt, " Not Found</h1>\n </body>\n</html>";
+exit;
+}
+$b = pathinfo($a);
+if (!isset($b['extension'])) {
+header('Content-Type: text/plain');
+header('Content-Length: ' . filesize($a));
+readfile($a);
+exit;
+}
+if (isset($mimes[$b['extension']])) {
+if ($mimes[$b['extension']] === 1) {
+include $a;
+exit;
+}
+if ($mimes[$b['extension']] === 2) {
+highlight_file($a);
+exit;
+}
+header('Content-Type: ' .$mimes[$b['extension']]);
+header('Content-Length: ' . filesize($a));
+readfile($a);
+exit;
+}
+}
+
+class Extract_Phar
+{
+static $temp;
+static $origdir;
+const GZ = 0x1000;
+const BZ2 = 0x2000;
+const MASK = 0x3000;
+const START = 'index.php';
+const LEN = 6685;
+
+static function go($return = false)
+{
+$fp = fopen(__FILE__, 'rb');
+fseek($fp, self::LEN);
+$L = unpack('V', $a = (binary)fread($fp, 4));
+$m = (binary)'';
+
+do {
+$read = 8192;
+if ($L[1] - strlen($m) < 8192) {
+$read = $L[1] - strlen($m);
+}
+$last = (binary)fread($fp, $read);
+$m .= $last;
+} while (strlen($last) && strlen($m) < $L[1]);
+
+if (strlen($m) < $L[1]) {
+die('ERROR: manifest length read was "' .
+strlen($m) .'" should be "' .
+$L[1] . '"');
+}
+
+$info = self::_unpack($m);
+$f = $info['c'];
+
+if ($f & self::GZ) {
+if (!function_exists('gzinflate')) {
+die('Error: zlib extension is not enabled -' .
+' gzinflate() function needed for zlib-compressed .phars');
+}
+}
+
+if ($f & self::BZ2) {
+if (!function_exists('bzdecompress')) {
+die('Error: bzip2 extension is not enabled -' .
+' bzdecompress() function needed for bz2-compressed .phars');
+}
+}
+
+$temp = self::tmpdir();
+
+if (!$temp || !is_writable($temp)) {
+$sessionpath = session_save_path();
+if (strpos ($sessionpath, ";") !== false)
+$sessionpath = substr ($sessionpath, strpos ($sessionpath, ";")+1);
+if (!file_exists($sessionpath) || !is_dir($sessionpath)) {
+die('Could not locate temporary directory to extract phar');
+}
+$temp = $sessionpath;
+}
+
+$temp .= '/pharextract/'.basename(__FILE__, '.phar');
+self::$temp = $temp;
+self::$origdir = getcwd();
+@mkdir($temp, 0777, true);
+$temp = realpath($temp);
+
+if (!file_exists($temp . DIRECTORY_SEPARATOR . md5_file(__FILE__))) {
+self::_removeTmpFiles($temp, getcwd());
+@mkdir($temp, 0777, true);
+@file_put_contents($temp . '/' . md5_file(__FILE__), '');
+
+foreach ($info['m'] as $path => $file) {
+$a = !file_exists(dirname($temp . '/' . $path));
+@mkdir(dirname($temp . '/' . $path), 0777, true);
+clearstatcache();
+
+if ($path[strlen($path) - 1] == '/') {
+@mkdir($temp . '/' . $path, 0777);
+} else {
+file_put_contents($temp . '/' . $path, self::extractFile($path, $file, $fp));
+@chmod($temp . '/' . $path, 0666);
+}
+}
+}
+
+chdir($temp);
+
+if (!$return) {
+include self::START;
+}
+}
+
+static function tmpdir()
+{
+if (strpos(PHP_OS, 'WIN') !== false) {
+if ($var = getenv('TMP') ? getenv('TMP') : getenv('TEMP')) {
+return $var;
+}
+if (is_dir('/temp') || mkdir('/temp')) {
+return realpath('/temp');
+}
+return false;
+}
+if ($var = getenv('TMPDIR')) {
+return $var;
+}
+return realpath('/tmp');
+}
+
+static function _unpack($m)
+{
+$info = unpack('V', substr($m, 0, 4));
+ $l = unpack('V', substr($m, 10, 4));
+$m = substr($m, 14 + $l[1]);
+$s = unpack('V', substr($m, 0, 4));
+$o = 0;
+$start = 4 + $s[1];
+$ret['c'] = 0;
+
+for ($i = 0; $i < $info[1]; $i++) {
+ $len = unpack('V', substr($m, $start, 4));
+$start += 4;
+ $savepath = substr($m, $start, $len[1]);
+$start += $len[1];
+ $ret['m'][$savepath] = array_values(unpack('Va/Vb/Vc/Vd/Ve/Vf', substr($m, $start, 24)));
+$ret['m'][$savepath][3] = sprintf('%u', $ret['m'][$savepath][3]
+& 0xffffffff);
+$ret['m'][$savepath][7] = $o;
+$o += $ret['m'][$savepath][2];
+$start += 24 + $ret['m'][$savepath][5];
+$ret['c'] |= $ret['m'][$savepath][4] & self::MASK;
+}
+return $ret;
+}
+
+static function extractFile($path, $entry, $fp)
+{
+$data = '';
+$c = $entry[2];
+
+while ($c) {
+if ($c < 8192) {
+$data .= @fread($fp, $c);
+$c = 0;
+} else {
+$c -= 8192;
+$data .= @fread($fp, 8192);
+}
+}
+
+if ($entry[4] & self::GZ) {
+$data = gzinflate($data);
+} elseif ($entry[4] & self::BZ2) {
+$data = bzdecompress($data);
+}
+
+if (strlen($data) != $entry[0]) {
+die("Invalid internal .phar file (size error " . strlen($data) . " != " .
+$stat[7] . ")");
+}
+
+if ($entry[3] != sprintf("%u", crc32((binary)$data) & 0xffffffff)) {
+die("Invalid internal .phar file (checksum error)");
+}
+
+return $data;
+}
+
+static function _removeTmpFiles($temp, $origdir)
+{
+chdir($temp);
+
+foreach (glob('*') as $f) {
+if (file_exists($f)) {
+is_dir($f) ? @rmdir($f) : @unlink($f);
+if (file_exists($f) && is_dir($f)) {
+self::_removeTmpFiles($f, getcwd());
+}
+}
+}
+
+@rmdir($temp);
+clearstatcache();
+chdir($origdir);
+}
+}
+
+Extract_Phar::go();
+__HALT_COMPILER(); ?>"
+============================================================================
+============================================================================
+string(6694) "<?php
+
+$web = 'index.php';
+
+if (in_array('phar', stream_get_wrappers()) && class_exists('Phar', 0)) {
+Phar::interceptFileFuncs();
+set_include_path('phar://' . __FILE__ . PATH_SEPARATOR . get_include_path());
+Phar::webPhar(null, $web);
+include 'phar://' . __FILE__ . '/' . Extract_Phar::START;
+return;
+}
+
+if (@(isset($_SERVER['REQUEST_URI']) && isset($_SERVER['REQUEST_METHOD']) && ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'POST'))) {
+Extract_Phar::go(true);
+$mimes = array(
+'phps' => 2,
+'c' => 'text/plain',
+'cc' => 'text/plain',
+'cpp' => 'text/plain',
+'c++' => 'text/plain',
+'dtd' => 'text/plain',
+'h' => 'text/plain',
+'log' => 'text/plain',
+'rng' => 'text/plain',
+'txt' => 'text/plain',
+'xsd' => 'text/plain',
+'php' => 1,
+'inc' => 1,
+'avi' => 'video/avi',
+'bmp' => 'image/bmp',
+'css' => 'text/css',
+'gif' => 'image/gif',
+'htm' => 'text/html',
+'html' => 'text/html',
+'htmls' => 'text/html',
+'ico' => 'image/x-ico',
+'jpe' => 'image/jpeg',
+'jpg' => 'image/jpeg',
+'jpeg' => 'image/jpeg',
+'js' => 'application/x-javascript',
+'midi' => 'audio/midi',
+'mid' => 'audio/midi',
+'mod' => 'audio/mod',
+'mov' => 'movie/quicktime',
+'mp3' => 'audio/mp3',
+'mpg' => 'video/mpeg',
+'mpeg' => 'video/mpeg',
+'pdf' => 'application/pdf',
+'png' => 'image/png',
+'swf' => 'application/shockwave-flash',
+'tif' => 'image/tiff',
+'tiff' => 'image/tiff',
+'wav' => 'audio/wav',
+'xbm' => 'image/xbm',
+'xml' => 'text/xml',
+);
+
+header("Cache-Control: no-cache, must-revalidate");
+header("Pragma: no-cache");
+
+$basename = basename(__FILE__);
+if (!strpos($_SERVER['REQUEST_URI'], $basename)) {
+chdir(Extract_Phar::$temp);
+include $web;
+return;
+}
+$pt = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $basename) + strlen($basename));
+if (!$pt || $pt == '/') {
+$pt = $web;
+header('HTTP/1.1 301 Moved Permanently');
+header('Location: ' . $_SERVER['REQUEST_URI'] . '/' . $pt);
+exit;
+}
+$a = realpath(Extract_Phar::$temp . DIRECTORY_SEPARATOR . $pt);
+if (!$a || strlen(dirname($a)) < strlen(Extract_Phar::$temp)) {
+header('HTTP/1.0 404 Not Found');
+echo "<html>\n <head>\n <title>File Not Found<title>\n </head>\n <body>\n <h1>404 - File ", $pt, " Not Found</h1>\n </body>\n</html>";
+exit;
+}
+$b = pathinfo($a);
+if (!isset($b['extension'])) {
+header('Content-Type: text/plain');
+header('Content-Length: ' . filesize($a));
+readfile($a);
+exit;
+}
+if (isset($mimes[$b['extension']])) {
+if ($mimes[$b['extension']] === 1) {
+include $a;
+exit;
+}
+if ($mimes[$b['extension']] === 2) {
+highlight_file($a);
+exit;
+}
+header('Content-Type: ' .$mimes[$b['extension']]);
+header('Content-Length: ' . filesize($a));
+readfile($a);
+exit;
+}
+}
+
+class Extract_Phar
+{
+static $temp;
+static $origdir;
+const GZ = 0x1000;
+const BZ2 = 0x2000;
+const MASK = 0x3000;
+const START = 'my/custom/thingy.php';
+const LEN = 6696;
+
+static function go($return = false)
+{
+$fp = fopen(__FILE__, 'rb');
+fseek($fp, self::LEN);
+$L = unpack('V', $a = (binary)fread($fp, 4));
+$m = (binary)'';
+
+do {
+$read = 8192;
+if ($L[1] - strlen($m) < 8192) {
+$read = $L[1] - strlen($m);
+}
+$last = (binary)fread($fp, $read);
+$m .= $last;
+} while (strlen($last) && strlen($m) < $L[1]);
+
+if (strlen($m) < $L[1]) {
+die('ERROR: manifest length read was "' .
+strlen($m) .'" should be "' .
+$L[1] . '"');
+}
+
+$info = self::_unpack($m);
+$f = $info['c'];
+
+if ($f & self::GZ) {
+if (!function_exists('gzinflate')) {
+die('Error: zlib extension is not enabled -' .
+' gzinflate() function needed for zlib-compressed .phars');
+}
+}
+
+if ($f & self::BZ2) {
+if (!function_exists('bzdecompress')) {
+die('Error: bzip2 extension is not enabled -' .
+' bzdecompress() function needed for bz2-compressed .phars');
+}
+}
+
+$temp = self::tmpdir();
+
+if (!$temp || !is_writable($temp)) {
+$sessionpath = session_save_path();
+if (strpos ($sessionpath, ";") !== false)
+$sessionpath = substr ($sessionpath, strpos ($sessionpath, ";")+1);
+if (!file_exists($sessionpath) || !is_dir($sessionpath)) {
+die('Could not locate temporary directory to extract phar');
+}
+$temp = $sessionpath;
+}
+
+$temp .= '/pharextract/'.basename(__FILE__, '.phar');
+self::$temp = $temp;
+self::$origdir = getcwd();
+@mkdir($temp, 0777, true);
+$temp = realpath($temp);
+
+if (!file_exists($temp . DIRECTORY_SEPARATOR . md5_file(__FILE__))) {
+self::_removeTmpFiles($temp, getcwd());
+@mkdir($temp, 0777, true);
+@file_put_contents($temp . '/' . md5_file(__FILE__), '');
+
+foreach ($info['m'] as $path => $file) {
+$a = !file_exists(dirname($temp . '/' . $path));
+@mkdir(dirname($temp . '/' . $path), 0777, true);
+clearstatcache();
+
+if ($path[strlen($path) - 1] == '/') {
+@mkdir($temp . '/' . $path, 0777);
+} else {
+file_put_contents($temp . '/' . $path, self::extractFile($path, $file, $fp));
+@chmod($temp . '/' . $path, 0666);
+}
+}
+}
+
+chdir($temp);
+
+if (!$return) {
+include self::START;
+}
+}
+
+static function tmpdir()
+{
+if (strpos(PHP_OS, 'WIN') !== false) {
+if ($var = getenv('TMP') ? getenv('TMP') : getenv('TEMP')) {
+return $var;
+}
+if (is_dir('/temp') || mkdir('/temp')) {
+return realpath('/temp');
+}
+return false;
+}
+if ($var = getenv('TMPDIR')) {
+return $var;
+}
+return realpath('/tmp');
+}
+
+static function _unpack($m)
+{
+$info = unpack('V', substr($m, 0, 4));
+ $l = unpack('V', substr($m, 10, 4));
+$m = substr($m, 14 + $l[1]);
+$s = unpack('V', substr($m, 0, 4));
+$o = 0;
+$start = 4 + $s[1];
+$ret['c'] = 0;
+
+for ($i = 0; $i < $info[1]; $i++) {
+ $len = unpack('V', substr($m, $start, 4));
+$start += 4;
+ $savepath = substr($m, $start, $len[1]);
+$start += $len[1];
+ $ret['m'][$savepath] = array_values(unpack('Va/Vb/Vc/Vd/Ve/Vf', substr($m, $start, 24)));
+$ret['m'][$savepath][3] = sprintf('%u', $ret['m'][$savepath][3]
+& 0xffffffff);
+$ret['m'][$savepath][7] = $o;
+$o += $ret['m'][$savepath][2];
+$start += 24 + $ret['m'][$savepath][5];
+$ret['c'] |= $ret['m'][$savepath][4] & self::MASK;
+}
+return $ret;
+}
+
+static function extractFile($path, $entry, $fp)
+{
+$data = '';
+$c = $entry[2];
+
+while ($c) {
+if ($c < 8192) {
+$data .= @fread($fp, $c);
+$c = 0;
+} else {
+$c -= 8192;
+$data .= @fread($fp, 8192);
+}
+}
+
+if ($entry[4] & self::GZ) {
+$data = gzinflate($data);
+} elseif ($entry[4] & self::BZ2) {
+$data = bzdecompress($data);
+}
+
+if (strlen($data) != $entry[0]) {
+die("Invalid internal .phar file (size error " . strlen($data) . " != " .
+$stat[7] . ")");
+}
+
+if ($entry[3] != sprintf("%u", crc32((binary)$data) & 0xffffffff)) {
+die("Invalid internal .phar file (checksum error)");
+}
+
+return $data;
+}
+
+static function _removeTmpFiles($temp, $origdir)
+{
+chdir($temp);
+
+foreach (glob('*') as $f) {
+if (file_exists($f)) {
+is_dir($f) ? @rmdir($f) : @unlink($f);
+if (file_exists($f) && is_dir($f)) {
+self::_removeTmpFiles($f, getcwd());
+}
+}
+}
+
+@rmdir($temp);
+clearstatcache();
+chdir($origdir);
+}
+}
+
+Extract_Phar::go();
+__HALT_COMPILER(); ?>"
+============================================================================
+============================================================================
+int(7074)
+============================================================================
+============================================================================
+Illegal filename passed in for stub creation, was 401 characters long, and only 400 or less is allowed
+============================================================================
+============================================================================
+============================================================================
+============================================================================
+string(6696) "<?php
+
+$web = 'the/web.php';
+
+if (in_array('phar', stream_get_wrappers()) && class_exists('Phar', 0)) {
+Phar::interceptFileFuncs();
+set_include_path('phar://' . __FILE__ . PATH_SEPARATOR . get_include_path());
+Phar::webPhar(null, $web);
+include 'phar://' . __FILE__ . '/' . Extract_Phar::START;
+return;
+}
+
+if (@(isset($_SERVER['REQUEST_URI']) && isset($_SERVER['REQUEST_METHOD']) && ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'POST'))) {
+Extract_Phar::go(true);
+$mimes = array(
+'phps' => 2,
+'c' => 'text/plain',
+'cc' => 'text/plain',
+'cpp' => 'text/plain',
+'c++' => 'text/plain',
+'dtd' => 'text/plain',
+'h' => 'text/plain',
+'log' => 'text/plain',
+'rng' => 'text/plain',
+'txt' => 'text/plain',
+'xsd' => 'text/plain',
+'php' => 1,
+'inc' => 1,
+'avi' => 'video/avi',
+'bmp' => 'image/bmp',
+'css' => 'text/css',
+'gif' => 'image/gif',
+'htm' => 'text/html',
+'html' => 'text/html',
+'htmls' => 'text/html',
+'ico' => 'image/x-ico',
+'jpe' => 'image/jpeg',
+'jpg' => 'image/jpeg',
+'jpeg' => 'image/jpeg',
+'js' => 'application/x-javascript',
+'midi' => 'audio/midi',
+'mid' => 'audio/midi',
+'mod' => 'audio/mod',
+'mov' => 'movie/quicktime',
+'mp3' => 'audio/mp3',
+'mpg' => 'video/mpeg',
+'mpeg' => 'video/mpeg',
+'pdf' => 'application/pdf',
+'png' => 'image/png',
+'swf' => 'application/shockwave-flash',
+'tif' => 'image/tiff',
+'tiff' => 'image/tiff',
+'wav' => 'audio/wav',
+'xbm' => 'image/xbm',
+'xml' => 'text/xml',
+);
+
+header("Cache-Control: no-cache, must-revalidate");
+header("Pragma: no-cache");
+
+$basename = basename(__FILE__);
+if (!strpos($_SERVER['REQUEST_URI'], $basename)) {
+chdir(Extract_Phar::$temp);
+include $web;
+return;
+}
+$pt = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $basename) + strlen($basename));
+if (!$pt || $pt == '/') {
+$pt = $web;
+header('HTTP/1.1 301 Moved Permanently');
+header('Location: ' . $_SERVER['REQUEST_URI'] . '/' . $pt);
+exit;
+}
+$a = realpath(Extract_Phar::$temp . DIRECTORY_SEPARATOR . $pt);
+if (!$a || strlen(dirname($a)) < strlen(Extract_Phar::$temp)) {
+header('HTTP/1.0 404 Not Found');
+echo "<html>\n <head>\n <title>File Not Found<title>\n </head>\n <body>\n <h1>404 - File ", $pt, " Not Found</h1>\n </body>\n</html>";
+exit;
+}
+$b = pathinfo($a);
+if (!isset($b['extension'])) {
+header('Content-Type: text/plain');
+header('Content-Length: ' . filesize($a));
+readfile($a);
+exit;
+}
+if (isset($mimes[$b['extension']])) {
+if ($mimes[$b['extension']] === 1) {
+include $a;
+exit;
+}
+if ($mimes[$b['extension']] === 2) {
+highlight_file($a);
+exit;
+}
+header('Content-Type: ' .$mimes[$b['extension']]);
+header('Content-Length: ' . filesize($a));
+readfile($a);
+exit;
+}
+}
+
+class Extract_Phar
+{
+static $temp;
+static $origdir;
+const GZ = 0x1000;
+const BZ2 = 0x2000;
+const MASK = 0x3000;
+const START = 'my/custom/thingy.php';
+const LEN = 6698;
+
+static function go($return = false)
+{
+$fp = fopen(__FILE__, 'rb');
+fseek($fp, self::LEN);
+$L = unpack('V', $a = (binary)fread($fp, 4));
+$m = (binary)'';
+
+do {
+$read = 8192;
+if ($L[1] - strlen($m) < 8192) {
+$read = $L[1] - strlen($m);
+}
+$last = (binary)fread($fp, $read);
+$m .= $last;
+} while (strlen($last) && strlen($m) < $L[1]);
+
+if (strlen($m) < $L[1]) {
+die('ERROR: manifest length read was "' .
+strlen($m) .'" should be "' .
+$L[1] . '"');
+}
+
+$info = self::_unpack($m);
+$f = $info['c'];
+
+if ($f & self::GZ) {
+if (!function_exists('gzinflate')) {
+die('Error: zlib extension is not enabled -' .
+' gzinflate() function needed for zlib-compressed .phars');
+}
+}
+
+if ($f & self::BZ2) {
+if (!function_exists('bzdecompress')) {
+die('Error: bzip2 extension is not enabled -' .
+' bzdecompress() function needed for bz2-compressed .phars');
+}
+}
+
+$temp = self::tmpdir();
+
+if (!$temp || !is_writable($temp)) {
+$sessionpath = session_save_path();
+if (strpos ($sessionpath, ";") !== false)
+$sessionpath = substr ($sessionpath, strpos ($sessionpath, ";")+1);
+if (!file_exists($sessionpath) || !is_dir($sessionpath)) {
+die('Could not locate temporary directory to extract phar');
+}
+$temp = $sessionpath;
+}
+
+$temp .= '/pharextract/'.basename(__FILE__, '.phar');
+self::$temp = $temp;
+self::$origdir = getcwd();
+@mkdir($temp, 0777, true);
+$temp = realpath($temp);
+
+if (!file_exists($temp . DIRECTORY_SEPARATOR . md5_file(__FILE__))) {
+self::_removeTmpFiles($temp, getcwd());
+@mkdir($temp, 0777, true);
+@file_put_contents($temp . '/' . md5_file(__FILE__), '');
+
+foreach ($info['m'] as $path => $file) {
+$a = !file_exists(dirname($temp . '/' . $path));
+@mkdir(dirname($temp . '/' . $path), 0777, true);
+clearstatcache();
+
+if ($path[strlen($path) - 1] == '/') {
+@mkdir($temp . '/' . $path, 0777);
+} else {
+file_put_contents($temp . '/' . $path, self::extractFile($path, $file, $fp));
+@chmod($temp . '/' . $path, 0666);
+}
+}
+}
+
+chdir($temp);
+
+if (!$return) {
+include self::START;
+}
+}
+
+static function tmpdir()
+{
+if (strpos(PHP_OS, 'WIN') !== false) {
+if ($var = getenv('TMP') ? getenv('TMP') : getenv('TEMP')) {
+return $var;
+}
+if (is_dir('/temp') || mkdir('/temp')) {
+return realpath('/temp');
+}
+return false;
+}
+if ($var = getenv('TMPDIR')) {
+return $var;
+}
+return realpath('/tmp');
+}
+
+static function _unpack($m)
+{
+$info = unpack('V', substr($m, 0, 4));
+ $l = unpack('V', substr($m, 10, 4));
+$m = substr($m, 14 + $l[1]);
+$s = unpack('V', substr($m, 0, 4));
+$o = 0;
+$start = 4 + $s[1];
+$ret['c'] = 0;
+
+for ($i = 0; $i < $info[1]; $i++) {
+ $len = unpack('V', substr($m, $start, 4));
+$start += 4;
+ $savepath = substr($m, $start, $len[1]);
+$start += $len[1];
+ $ret['m'][$savepath] = array_values(unpack('Va/Vb/Vc/Vd/Ve/Vf', substr($m, $start, 24)));
+$ret['m'][$savepath][3] = sprintf('%u', $ret['m'][$savepath][3]
+& 0xffffffff);
+$ret['m'][$savepath][7] = $o;
+$o += $ret['m'][$savepath][2];
+$start += 24 + $ret['m'][$savepath][5];
+$ret['c'] |= $ret['m'][$savepath][4] & self::MASK;
+}
+return $ret;
+}
+
+static function extractFile($path, $entry, $fp)
+{
+$data = '';
+$c = $entry[2];
+
+while ($c) {
+if ($c < 8192) {
+$data .= @fread($fp, $c);
+$c = 0;
+} else {
+$c -= 8192;
+$data .= @fread($fp, 8192);
+}
+}
+
+if ($entry[4] & self::GZ) {
+$data = gzinflate($data);
+} elseif ($entry[4] & self::BZ2) {
+$data = bzdecompress($data);
+}
+
+if (strlen($data) != $entry[0]) {
+die("Invalid internal .phar file (size error " . strlen($data) . " != " .
+$stat[7] . ")");
+}
+
+if ($entry[3] != sprintf("%u", crc32((binary)$data) & 0xffffffff)) {
+die("Invalid internal .phar file (checksum error)");
+}
+
+return $data;
+}
+
+static function _removeTmpFiles($temp, $origdir)
+{
+chdir($temp);
+
+foreach (glob('*') as $f) {
+if (file_exists($f)) {
+is_dir($f) ? @rmdir($f) : @unlink($f);
+if (file_exists($f) && is_dir($f)) {
+self::_removeTmpFiles($f, getcwd());
+}
+}
+}
+
+@rmdir($temp);
+clearstatcache();
+chdir($origdir);
+}
+}
+
+Extract_Phar::go();
+__HALT_COMPILER(); ?>"
+============================================================================
+============================================================================
+int(7074)
+Illegal web filename passed in for stub creation, was 401 characters long, and only 400 or less is allowed
+===DONE===
diff --git a/ext/phar/tests/phar_ctx_001.phpt b/ext/phar/tests/phar_ctx_001.phpt
new file mode 100644
index 0000000..72edc5a
--- /dev/null
+++ b/ext/phar/tests/phar_ctx_001.phpt
@@ -0,0 +1,100 @@
+--TEST--
+Phar context
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not present"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = '<?php __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+
+$context = stream_context_create(array('phar'=> array('compress'=>Phar::GZ, 'metadata' => array(2, b'hi' => 3))));
+$context2 = stream_context_create(array('phar' => array('metadata' => array(4))));
+
+file_put_contents($pname . '/a', b'new a', 0); // no compression
+file_put_contents($pname . '/b', b'new b', 0, $context);
+file_put_contents($pname . '/d', b'new d', 0, $context2);
+
+$phar = new Phar($fname);
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump($phar['a']->getMetaData());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump($phar['b']->getMetaData());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+var_dump($phar['c']->getMetaData());
+var_dump(file_get_contents($pname . '/d'));
+var_dump($phar['d']->isCompressed());
+var_dump($phar['d']->getMetaData());
+$context2 = stream_context_create(array('phar' => array('metadata' => array(4))));
+$fp = fopen($pname . '/b', 'r+', 0, $context2);
+fclose($fp);
+?>
+==AFTER==
+<?php
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump($phar['b']->getMetaData());
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+?>
+--EXPECT--
+string(1) "a"
+bool(false)
+string(1) "b"
+bool(false)
+string(1) "c"
+bool(false)
+string(5) "new a"
+bool(false)
+NULL
+string(5) "new b"
+bool(true)
+array(2) {
+ [0]=>
+ int(2)
+ ["hi"]=>
+ int(3)
+}
+string(1) "c"
+bool(false)
+NULL
+string(5) "new d"
+bool(false)
+array(1) {
+ [0]=>
+ int(4)
+}
+==AFTER==
+string(5) "new b"
+bool(true)
+array(1) {
+ [0]=>
+ int(4)
+}
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_decompress.phpt b/ext/phar/tests/phar_decompress.phpt
new file mode 100644
index 0000000..abf385a
--- /dev/null
+++ b/ext/phar/tests/phar_decompress.phpt
@@ -0,0 +1,69 @@
+--TEST--
+Phar::decompress()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not present"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar.gz';
+$pname = 'phar://' . $fname;
+$file = '<?php __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+
+$gz = $phar->compress(Phar::GZ);
+copy($gz->getPath(), $fname2);
+$a = new Phar($fname2);
+var_dump($a->isCompressed());
+$unc = $a->compress(Phar::NONE);
+echo $unc->getPath() . "\n";
+$unc2 = $gz->decompress();
+echo $unc2->getPath() . "\n";
+$unc3 = $gz->decompress('hooba.phar');
+echo $unc3->getPath() . "\n";
+$gz->decompress(array());
+$zip = $phar->convertToData(Phar::ZIP);
+ini_set('phar.readonly', 1);
+try {
+$gz->decompress();
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$zip->decompress();
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.hooba.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.gz');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.gz');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar');
+?>
+--EXPECTF--
+int(4096)
+%sphar_decompress2.phar
+%sphar_decompress.phar
+%sphar_decompress.hooba.phar
+
+Warning: Phar::decompress() expects parameter 1 to be %string, array given in %sphar_decompress.php on line %d
+Cannot decompress phar archive, phar is read-only
+Cannot decompress zip-based archives with whole-archive compression
+===DONE===
diff --git a/ext/phar/tests/phar_dir_iterate.phpt b/ext/phar/tests/phar_dir_iterate.phpt
new file mode 100644
index 0000000..04968f2
--- /dev/null
+++ b/ext/phar/tests/phar_dir_iterate.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Phar object: iterate test with sub-directories and RecursiveIteratorIterator
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+
+$phar = new Phar($fname);
+$phar['top.txt'] = 'hi';
+$phar['sub/top.txt'] = 'there';
+$phar['another.file.txt'] = 'wowee';
+$newphar = new Phar($fname);
+foreach (new RecursiveIteratorIterator($newphar) as $path => $obj) {
+ var_dump($obj->getPathName());
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+__halt_compiler();
+?>
+--EXPECTF--
+string(%d) "phar://%sphar_dir_iterate.phar.php%canother.file.txt"
+string(%d) "phar://%sphar_dir_iterate.phar.php/sub%ctop.txt"
+string(%d) "phar://%sphar_dir_iterate.phar.php%ctop.txt"
+===DONE===
diff --git a/ext/phar/tests/phar_dotted_path.phpt b/ext/phar/tests/phar_dotted_path.phpt
new file mode 100644
index 0000000..f6d626e
--- /dev/null
+++ b/ext/phar/tests/phar_dotted_path.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Phar: create new Phar with broken.dirname in path
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+default_charset=
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$dir = dirname(__FILE__) . '/broken.dirname';
+mkdir($dir, 0777);
+
+$fname = $dir . '/dotted_path.phar';
+$stub = Phar::createDefaultStub();
+$file = $stub;
+
+$files = array();
+$files['a'] = 'this is a';
+$files['b'] = 'this is b';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+
+foreach ($phar as $entry) {
+ echo file_get_contents($entry)."\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/broken.dirname/dotted_path.phar');
+rmdir(dirname(__FILE__) . '/broken.dirname');
+?>
+--EXPECT--
+this is a
+this is b
+===DONE===
diff --git a/ext/phar/tests/phar_extract.phpt b/ext/phar/tests/phar_extract.phpt
new file mode 100644
index 0000000..01d65f9
--- /dev/null
+++ b/ext/phar/tests/phar_extract.phpt
@@ -0,0 +1,150 @@
+--TEST--
+Phar: Phar::extractTo()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/tempmanifest1.phar.php';
+$pname = 'phar://' . $fname;
+
+$a = new Phar($fname);
+$a['file1.txt'] = 'hi';
+$a['file2.txt'] = 'hi2';
+$a['subdir/ectory/file.txt'] = 'hi3';
+$a->mount($pname . '/mount', __FILE__);
+$a->addEmptyDir('one/level');
+
+$a->extractTo(dirname(__FILE__) . '/extract', 'mount');
+$a->extractTo(dirname(__FILE__) . '/extract');
+
+$out = array();
+
+foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . '/extract', 0x00003000), RecursiveIteratorIterator::CHILD_FIRST) as $p => $b) {
+ $out[] = $p;
+}
+
+sort($out);
+
+foreach ($out as $b) {
+ echo "$b\n";
+}
+
+$a->extractTo(dirname(__FILE__) . '/extract1', 'file1.txt');
+var_dump(file_get_contents(dirname(__FILE__) . '/extract1/file1.txt'));
+
+$a->extractTo(dirname(__FILE__) . '/extract1', 'subdir/ectory/file.txt');
+var_dump(file_get_contents(dirname(__FILE__) . '/extract1/subdir/ectory/file.txt'));
+
+$a->extractTo(dirname(__FILE__) . '/extract2', array('file2.txt', 'one/level'));
+var_dump(file_get_contents(dirname(__FILE__) . '/extract2/file2.txt'));
+var_dump(is_dir(dirname(__FILE__) . '/extract2/one/level'));
+
+try {
+ $a->extractTo(dirname(__FILE__) . '/whatever', 134);
+} catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+$a->extractTo(array());
+
+try {
+ $a->extractTo('');
+} catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+file_put_contents(dirname(__FILE__) . '/oops', 'I is file');
+
+try {
+ $a->extractTo(dirname(__FILE__) . '/oops', 'file1.txt');
+} catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+try {
+ $a->extractTo(dirname(__FILE__) . '/oops1', array(array(), 'file1.txt'));
+} catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+try {
+ $a->extractTo(dirname(__FILE__) . '/extract', 'file1.txt');
+} catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+file_put_contents(dirname(__FILE__) . '/extract/file1.txt', 'first');
+var_dump(file_get_contents(dirname(__FILE__) . '/extract/file1.txt'));
+
+$a->extractTo(dirname(__FILE__) . '/extract', 'file1.txt', true);
+var_dump(file_get_contents(dirname(__FILE__) . '/extract/file1.txt'));
+
+try {
+ $a->extractTo(str_repeat('a', 20000), 'file1.txt');
+} catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+$a[str_repeat('a', 20000)] = 'long';
+
+try {
+ $a->extractTo(dirname(__FILE__) . '/extract', str_repeat('a', 20000));
+} catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+@rmdir(dirname(__FILE__) . '/whatever');
+@unlink(dirname(__FILE__) . '/oops');
+@rmdir(dirname(__FILE__) . '/oops1');
+@unlink(dirname(__FILE__) . '/tempmanifest1.phar.php');
+$e = dirname(__FILE__) . '/extract/';
+@unlink($e . 'file1.txt');
+@unlink($e . 'file2.txt');
+@unlink($e . 'subdir/ectory/file.txt');
+@rmdir($e . 'subdir/ectory');
+@rmdir($e . 'subdir');
+@rmdir($e . 'one/level');
+@rmdir($e . 'one');
+@rmdir($e);
+$e = dirname(__FILE__) . '/extract1/';
+@unlink($e . 'file1.txt');
+@unlink($e . 'subdir/ectory/file.txt');
+@rmdir($e . 'subdir/ectory');
+@rmdir($e . 'subdir');
+@rmdir($e);
+$e = dirname(__FILE__) . '/extract2/';
+@unlink($e . 'file2.txt');
+@rmdir($e . 'one/level');
+@rmdir($e . 'one');
+@rmdir($e);
+?>
+--EXPECTF--
+%sextract%cfile1.txt
+%sextract%cfile2.txt
+%sextract%cone
+%sextract%csubdir
+%sextract%csubdir%cectory
+%sextract%csubdir%cectory%cfile.txt
+string(2) "hi"
+string(3) "hi3"
+string(3) "hi2"
+bool(false)
+Invalid argument, expected a filename (string) or array of filenames
+
+Warning: Phar::extractTo() expects parameter 1 to be %string, array given in %sphar_extract.php on line %d
+Invalid argument, extraction path must be non-zero length
+Unable to use path "%soops" for extraction, it is a file, must be a directory
+Invalid argument, array of filenames to extract contains non-string value
+Extraction from phar "%stempmanifest1.phar.php" failed: Cannot extract "file1.txt" to "%sextract/file1.txt", path already exists
+string(5) "first"
+string(2) "hi"
+Cannot extract to "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...", destination directory is too long for filesystem
+Extraction from phar "%stempmanifest1.phar.php" failed: Cannot extract "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..." to "%s...", extracted filename is too long for filesystem
+===DONE===
diff --git a/ext/phar/tests/phar_extract2.phpt b/ext/phar/tests/phar_extract2.phpt
new file mode 100644
index 0000000..cac509f
--- /dev/null
+++ b/ext/phar/tests/phar_extract2.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Phar: Phar::extractTo() - .phar safety
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/tempmanifest2.phar.php';
+$pname = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setDefaultStub();
+$phar->setAlias('fred');
+$phar['file1.txt'] = 'hi';
+$phar['file2.txt'] = 'hi2';
+$phar['subdir/ectory/file.txt'] = 'hi3';
+$phar->mount($pname . '/mount', __FILE__);
+$phar->addEmptyDir('one/level');
+
+$phar->extractTo(dirname(__FILE__) . '/extract', 'mount');
+$phar->extractTo(dirname(__FILE__) . '/extract');
+$out = array();
+
+foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . '/extract', 0x00003000), RecursiveIteratorIterator::CHILD_FIRST) as $path => $file) {
+ $extracted[] = $path;
+}
+
+sort($extracted);
+
+foreach ($extracted as $out) {
+ echo "$out\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tempmanifest2.phar.php');
+$dir = dirname(__FILE__) . '/extract/';
+@unlink($dir . 'file1.txt');
+@unlink($dir . 'file2.txt');
+@unlink($dir . 'subdir/ectory/file.txt');
+@rmdir($dir . 'subdir/ectory');
+@rmdir($dir . 'subdir');
+@rmdir($dir . 'one/level');
+@rmdir($dir . 'one');
+@rmdir($dir);
+$dir = dirname(__FILE__) . '/extract1/';
+@rmdir($dir);
+?>
+--EXPECTF--
+%sextract%cfile1.txt
+%sextract%cfile2.txt
+%sextract%cone
+%sextract%csubdir
+%sextract%csubdir%cectory
+%sextract%csubdir%cectory%cfile.txt
+===DONE===
diff --git a/ext/phar/tests/phar_extract3.phpt b/ext/phar/tests/phar_extract3.phpt
new file mode 100644
index 0000000..df85211
--- /dev/null
+++ b/ext/phar/tests/phar_extract3.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Phar: Phar::extractTo() - check that phar exists
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/files/bogus.zip';
+$fname2 = dirname(__FILE__) . '/files/notbogus.zip';
+$extract = dirname(__FILE__) . '/test';
+
+$phar = new PharData($fname);
+
+try {
+ $phar->extractTo($extract);
+} catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+$phar = new PharData($fname2);
+foreach ($phar as $filename) {
+ echo "$filename\n";
+}
+
+try {
+ $phar->extractTo($extract);
+} catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir = dirname(__FILE__) . '/test/';
+@unlink($dir . 'stuff.txt');
+@unlink($dir . 'nonsense.txt');
+@rmdir($dir);
+?>
+--EXPECTF--
+Invalid argument, %sfiles/bogus.zip cannot be found
+phar://%sfiles/notbogus.zip%cnonsense.txt
+phar://%sfiles/notbogus.zip%cstuff.txt
+===DONE===
diff --git a/ext/phar/tests/phar_get_supported_signatures_001.phpt b/ext/phar/tests/phar_get_supported_signatures_001.phpt
new file mode 100644
index 0000000..64874f6
--- /dev/null
+++ b/ext/phar/tests/phar_get_supported_signatures_001.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Phar::getSupportedSignatures()
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (extension_loaded("hash")) die("skip extension hash conflicts");
+$arr = Phar::getSupportedSignatures();
+if (in_array("OpenSSL", $arr)) die("skip openssl support enabled");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+var_dump(Phar::getSupportedSignatures());
+?>
+===DONE===
+?>
+--EXPECT--
+array(2) {
+ [0]=>
+ string(3) "MD5"
+ [1]=>
+ string(5) "SHA-1"
+}
+===DONE===
diff --git a/ext/phar/tests/phar_get_supported_signatures_001a.phpt b/ext/phar/tests/phar_get_supported_signatures_001a.phpt
new file mode 100644
index 0000000..ad929df
--- /dev/null
+++ b/ext/phar/tests/phar_get_supported_signatures_001a.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Phar::getSupportedSignatures()
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (extension_loaded("hash")) die("skip extension hash conflicts");
+$arr = Phar::getSupportedSignatures();
+if (!in_array("OpenSSL", $arr)) die("skip openssl support required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+var_dump(Phar::getSupportedSignatures());
+?>
+===DONE===
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ string(3) "MD5"
+ [1]=>
+ string(5) "SHA-1"
+ [2]=>
+ string(7) "OpenSSL"
+}
+===DONE===
diff --git a/ext/phar/tests/phar_get_supported_signatures_002.phpt b/ext/phar/tests/phar_get_supported_signatures_002.phpt
new file mode 100644
index 0000000..3c5cf7f
--- /dev/null
+++ b/ext/phar/tests/phar_get_supported_signatures_002.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Phar::getSupportedSignatures()
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("hash")) die("skip extension hash required");
+$arr = Phar::getSupportedSignatures();
+if (in_array("OpenSSL", $arr)) die("skip openssl support enabled");
+if (!in_array('SHA-256', $arr)) die("skip hash extension loaded shared");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+var_dump(Phar::getSupportedSignatures());
+?>
+===DONE===
+?>
+--EXPECT--
+array(4) {
+ [0]=>
+ string(3) "MD5"
+ [1]=>
+ string(5) "SHA-1"
+ [2]=>
+ string(7) "SHA-256"
+ [3]=>
+ string(7) "SHA-512"
+}
+===DONE===
diff --git a/ext/phar/tests/phar_get_supported_signatures_002a.phpt b/ext/phar/tests/phar_get_supported_signatures_002a.phpt
new file mode 100644
index 0000000..32437a3
--- /dev/null
+++ b/ext/phar/tests/phar_get_supported_signatures_002a.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Phar::getSupportedSignatures()
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("hash")) die("skip extension hash required");
+$arr = Phar::getSupportedSignatures();
+if (!in_array("OpenSSL", $arr)) die("skip openssl support required");
+if (!in_array('SHA-256', $arr)) die("skip hash extension loaded shared");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+var_dump(Phar::getSupportedSignatures());
+?>
+===DONE===
+--EXPECT--
+array(5) {
+ [0]=>
+ string(3) "MD5"
+ [1]=>
+ string(5) "SHA-1"
+ [2]=>
+ string(7) "SHA-256"
+ [3]=>
+ string(7) "SHA-512"
+ [4]=>
+ string(7) "OpenSSL"
+}
+===DONE===
diff --git a/ext/phar/tests/phar_get_supportedcomp1.phpt b/ext/phar/tests/phar_get_supportedcomp1.phpt
new file mode 100644
index 0000000..d32e12c
--- /dev/null
+++ b/ext/phar/tests/phar_get_supportedcomp1.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Phar::getSupportedCompression() (bz2 and zlib)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("bz2")) die("skip bz2 not available"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+var_dump(Phar::getSupportedCompression());
+?>
+===DONE===
+--EXPECT--
+array(2) {
+ [0]=>
+ string(2) "GZ"
+ [1]=>
+ string(5) "BZIP2"
+}
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_get_supportedcomp2.phpt b/ext/phar/tests/phar_get_supportedcomp2.phpt
new file mode 100644
index 0000000..c607724
--- /dev/null
+++ b/ext/phar/tests/phar_get_supportedcomp2.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Phar::getSupportedCompression() (bz2 only)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("bz2")) die("skip bz2 not available"); ?>
+<?php if (extension_loaded("zlib")) die("skip zlib is available"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+var_dump(Phar::getSupportedCompression());
+?>
+===DONE===
+--EXPECT--
+array(1) {
+ [0]=>
+ string(5) "BZIP2"
+}
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_get_supportedcomp3.phpt b/ext/phar/tests/phar_get_supportedcomp3.phpt
new file mode 100644
index 0000000..c300407
--- /dev/null
+++ b/ext/phar/tests/phar_get_supportedcomp3.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Phar::getSupportedCompression() (zlib only)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (extension_loaded("bz2")) die("skip bz2 is available"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+var_dump(Phar::getSupportedCompression());
+?>
+===DONE===
+--EXPECT--
+array(1) {
+ [0]=>
+ string(2) "GZ"
+}
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_get_supportedcomp4.phpt b/ext/phar/tests/phar_get_supportedcomp4.phpt
new file mode 100644
index 0000000..fba2c71
--- /dev/null
+++ b/ext/phar/tests/phar_get_supportedcomp4.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar::getSupportedCompression() (none)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (extension_loaded("bz2")) die("skip bz2 is available"); ?>
+<?php if (extension_loaded("zlib")) die("skip zlib is available"); ?>
+--FILE--
+<?php
+var_dump(Phar::getSupportedCompression());
+?>
+===DONE===
+--EXPECT--
+array(0) {
+}
+===DONE===
diff --git a/ext/phar/tests/phar_gobyebye-win32.phpt b/ext/phar/tests/phar_gobyebye-win32.phpt
new file mode 100644
index 0000000..43c8c77
--- /dev/null
+++ b/ext/phar/tests/phar_gobyebye-win32.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Phar: test edge cases of intercepted functions when the underlying phar archive has been unlinkArchive()d
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");
+if (strpos(PHP_OS, 'WIN') === false) die("skip Extra warning on Windows.");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+Phar::interceptFileFuncs();
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.php';
+$pname = 'phar://' . $fname;
+file_put_contents($fname2, '<?php Phar::unlinkArchive("' . addslashes($fname) . '");');
+file_put_contents($pname . '/foo/hi', '<?php
+include "' . addslashes($fname2) . '";
+readfile("foo/hi");
+fopen("foo/hi", "r");
+echo file_get_contents("foo/hi");
+var_dump(is_file("foo/hi"),is_link("foo/hi"),is_dir("foo/hi"),file_exists("foo/hi"),stat("foo/hi"));
+opendir("foo/hi");
+?>
+');
+include $pname . '/foo/hi';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.php'); ?>
+--EXPECTF--
+Warning: readfile(foo/hi): failed to open stream: No such file or directory in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d
+
+Warning: fopen(foo/hi): failed to open stream: No such file or directory in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d
+
+Warning: file_get_contents(foo/hi): failed to open stream: No such file or directory in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d
+
+Warning: stat(): stat failed for foo/hi in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+
+Warning: opendir(foo/hi,foo/hi): The system cannot find the path specified. (code: 3) in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d
+
+Warning: opendir(foo/hi): failed to open dir: No such file or directory in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d
+===DONE===
diff --git a/ext/phar/tests/phar_gobyebye.phpt b/ext/phar/tests/phar_gobyebye.phpt
new file mode 100644
index 0000000..93e153b
--- /dev/null
+++ b/ext/phar/tests/phar_gobyebye.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Phar: test edge cases of intercepted functions when the underlying phar archive has been unlinkArchive()d
+--SKIPIF--
+<?php
+if (defined('PHP_WINDOWS_VERSION_MAJOR')) die("skip");
+if (!extension_loaded("phar")) die("skip");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+Phar::interceptFileFuncs();
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.php';
+$pname = 'phar://' . $fname;
+file_put_contents($fname2, '<?php Phar::unlinkArchive("' . addslashes($fname) . '");');
+file_put_contents($pname . '/foo/hi', '<?php
+include "' . addslashes($fname2) . '";
+readfile("foo/hi");
+fopen("foo/hi", "r");
+echo file_get_contents("foo/hi");
+var_dump(is_file("foo/hi"),is_link("foo/hi"),is_dir("foo/hi"),file_exists("foo/hi"),stat("foo/hi"));
+opendir("foo/hi");
+?>
+');
+include $pname . '/foo/hi';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.php'); ?>
+--EXPECTF--
+Warning: readfile(foo/hi): failed to open stream: No such file or directory in phar://%sphar_gobyebye.phar.php/foo/hi on line %d
+
+Warning: fopen(foo/hi): failed to open stream: No such file or directory in phar://%sphar_gobyebye.phar.php/foo/hi on line %d
+
+Warning: file_get_contents(foo/hi): failed to open stream: No such file or directory in phar://%sphar_gobyebye.phar.php/foo/hi on line %d
+
+Warning: stat(): stat failed for foo/hi in phar://%sphar_gobyebye.phar.php/foo/hi on line %d
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+
+Warning: opendir(foo/hi): failed to open dir: No such file or directory in phar://%sphar_gobyebye.phar.php/foo/hi on line %d
+===DONE===
diff --git a/ext/phar/tests/phar_gzip.phpt b/ext/phar/tests/phar_gzip.phpt
new file mode 100644
index 0000000..c722834
--- /dev/null
+++ b/ext/phar/tests/phar_gzip.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Phar: gzipped phar
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (!extension_loaded("zlib")) die("skip zlib not available");
+if (version_compare(phpversion(), '5.2.6', '<')) die("skip zlib is buggy in PHP < 5.2.6");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/phar_gzip.phar';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/phar_gzip.2.phar';
+$pname2 = 'phar://' . $fname2;
+
+$file = '<?php
+Phar::mapPhar();
+var_dump("it worked");
+include "phar://" . __FILE__ . "/tar_004.php";
+__HALT_COMPILER();';
+
+$files = array();
+$files['tar_004.php'] = '<?php var_dump(__FILE__);';
+$files['internal/file/here'] = "hi there!\n";
+$files['internal/dir/'] = '';
+$files['dir/'] = '';
+$gzip = true;
+
+include 'files/phar_test.inc';
+
+include $fname;
+
+$a = new Phar($fname);
+$a['test'] = 'hi';
+copy($fname, $fname2);
+$a->setAlias('another');
+$b = new Phar($fname2);
+var_dump($b->isFileFormat(Phar::PHAR));
+var_dump($b->isCompressed() == Phar::GZ);
+$a = stat($pname . '/test');
+$b = stat($pname2 . '/test');
+if ($a['mtime'] != $b['mtime']) {
+ echo "timestamp changed, was $a[mtime], now $b[mtime]!\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/phar_gzip.phar');
+@unlink(dirname(__FILE__) . '/phar_gzip.2.phar');
+?>
+--EXPECTF--
+string(9) "it worked"
+string(%d) "phar://%sphar_gzip.phar/tar_004.php"
+bool(true)
+bool(true)
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_gzipU.phpt b/ext/phar/tests/phar_gzipU.phpt
new file mode 100644
index 0000000..662f862
--- /dev/null
+++ b/ext/phar/tests/phar_gzipU.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Phar: gzipped phar
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (!extension_loaded("zlib")) die("skip zlib not available");
+if (version_compare(phpversion(), '5.2.6', '<')) die("skip zlib is buggy in PHP < 5.2.6");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/phar_gzip.phar';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/phar_gzip.2.phar';
+$pname2 = 'phar://' . $fname2;
+
+$file = '<?php
+Phar::mapPhar();
+var_dump("it worked");
+include "phar://" . __FILE__ . "/tar_004.php";
+__HALT_COMPILER();';
+
+$files = array();
+$files['tar_004.php'] = '<?php var_dump(__FILE__);';
+$files['internal/file/here'] = "hi there!\n";
+$files['internal/dir/'] = '';
+$files['dir/'] = '';
+$gzip = true;
+
+include 'files/phar_test.inc';
+
+include $fname;
+
+$a = new Phar($fname);
+$a['test'] = 'hi';
+copy($fname, $fname2);
+$a->setAlias('another');
+$b = new Phar($fname2);
+var_dump($b->isFileFormat(Phar::PHAR));
+var_dump($b->isCompressed() == Phar::GZ);
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/phar_gzip.phar');
+@unlink(dirname(__FILE__) . '/phar_gzip.2.phar');
+?>
+--EXPECTF--
+unicode(9) "it worked"
+unicode(%d) "phar://%sphar_gzip.phar/tar_004.php"
+bool(true)
+bool(true)
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_isvalidpharfilename.phpt b/ext/phar/tests/phar_isvalidpharfilename.phpt
new file mode 100644
index 0000000..dee9b7d
--- /dev/null
+++ b/ext/phar/tests/phar_isvalidpharfilename.phpt
@@ -0,0 +1,140 @@
+--TEST--
+Phar: Phar::isValidPharFilename()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.readonly=1
+--FILE--
+<?php
+chdir(dirname(__FILE__));
+Phar::isValidPharFilename(array());
+echo "*\n";
+var_dump(Phar::isValidPharFilename('*'));
+var_dump(Phar::isValidPharFilename('*', true));
+var_dump(Phar::isValidPharFilename('*', false));
+
+echo "\nboo.phar\n";
+var_dump(Phar::isValidPharFilename('boo.phar'));
+var_dump(Phar::isValidPharFilename('boo.phar', true));
+var_dump(Phar::isValidPharFilename('boo.phar', false));
+
+echo "\nboo.tar\n";
+var_dump(Phar::isValidPharFilename('boo.tar'));
+var_dump(Phar::isValidPharFilename('boo.tar', true));
+var_dump(Phar::isValidPharFilename('boo.tar', false));
+
+echo "\nboo.phar.tar\n";
+var_dump(Phar::isValidPharFilename('boo.phar.tar'));
+var_dump(Phar::isValidPharFilename('boo.phar.tar', true));
+var_dump(Phar::isValidPharFilename('boo.phar.tar', false));
+
+mkdir(dirname(__FILE__) . '/.phar');
+
+echo "\n.phar/boo.tar\n";
+var_dump(Phar::isValidPharFilename('.phar/boo.tar'));
+var_dump(Phar::isValidPharFilename('.phar/boo.tar', true));
+var_dump(Phar::isValidPharFilename('.phar/boo.tar', false));
+
+echo "\n.phar.tar\n";
+var_dump(Phar::isValidPharFilename('.phar.tar'));
+var_dump(Phar::isValidPharFilename('.phar.tar', true));
+var_dump(Phar::isValidPharFilename('.phar.tar', false));
+
+echo "\n.phar.phar\n";
+var_dump(Phar::isValidPharFilename('.phar.phar'));
+var_dump(Phar::isValidPharFilename('.phar.phar', true));
+var_dump(Phar::isValidPharFilename('.phar.phar', false));
+
+echo "\n.phar.phart\n";
+var_dump(Phar::isValidPharFilename('.phar.phart'));
+var_dump(Phar::isValidPharFilename('.phar.phart', true));
+var_dump(Phar::isValidPharFilename('.phar.phart', false));
+
+echo "\nmy.pharmy\n";
+var_dump(Phar::isValidPharFilename('my.pharmy'));
+var_dump(Phar::isValidPharFilename('my.pharmy', true));
+var_dump(Phar::isValidPharFilename('my.pharmy', false));
+
+echo "\nphar.zip\n";
+var_dump(Phar::isValidPharFilename('phar.zip'));
+var_dump(Phar::isValidPharFilename('phar.zip', true));
+var_dump(Phar::isValidPharFilename('phar.zip', false));
+
+echo "\nphar.zip.phar\n";
+var_dump(Phar::isValidPharFilename('phar.zip.phar'));
+var_dump(Phar::isValidPharFilename('phar.zip.phar', true));
+var_dump(Phar::isValidPharFilename('phar.zip.phar', false));
+
+echo "\ndir.phar.php\n";
+var_dump(Phar::isValidPharFilename('dir.phar.php'));
+var_dump(Phar::isValidPharFilename('dir.phar.php', true));
+var_dump(Phar::isValidPharFilename('dir.phar.php', false));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+rmdir(dirname(__FILE__) . '/.phar');
+--EXPECTF--
+Warning: Phar::isValidPharFilename() expects parameter 1 to be %string, array given in %sphar_isvalidpharfilename.php on line %d
+*
+bool(false)
+bool(false)
+bool(false)
+
+boo.phar
+bool(true)
+bool(true)
+bool(false)
+
+boo.tar
+bool(false)
+bool(false)
+bool(true)
+
+boo.phar.tar
+bool(true)
+bool(true)
+bool(false)
+
+.phar/boo.tar
+bool(false)
+bool(false)
+bool(true)
+
+.phar.tar
+bool(false)
+bool(false)
+bool(true)
+
+.phar.phar
+bool(true)
+bool(true)
+bool(false)
+
+.phar.phart
+bool(false)
+bool(false)
+bool(true)
+
+my.pharmy
+bool(false)
+bool(false)
+bool(true)
+
+phar.zip
+bool(false)
+bool(false)
+bool(true)
+
+phar.zip.phar
+bool(true)
+bool(true)
+bool(false)
+
+dir.phar.php
+bool(true)
+bool(true)
+bool(false)
+===DONE===
+
diff --git a/ext/phar/tests/phar_magic.phpt b/ext/phar/tests/phar_magic.phpt
new file mode 100644
index 0000000..7c60589
--- /dev/null
+++ b/ext/phar/tests/phar_magic.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Phar: include/fopen magic
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$p = new Phar($fname);
+$p['a'] = '<?php include "b/c.php";' . "\n";
+$p['b/c.php'] = '<?php echo "in b\n";$a = fopen("a", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";';
+$p['d'] = "in d\n";
+$p->setStub('<?php
+set_include_path("phar://" . __FILE__);
+if (version_compare(PHP_VERSION, "5.3", "<")) {
+Phar::interceptFileFuncs();
+}
+include "phar://" . __FILE__ . "/a";
+__HALT_COMPILER();');
+include $fname;
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+in b
+<?php include "b/c.php";
+in d
+===DONE===
diff --git a/ext/phar/tests/phar_metadata_read.phpt b/ext/phar/tests/phar_metadata_read.phpt
new file mode 100644
index 0000000..2d6586d
--- /dev/null
+++ b/ext/phar/tests/phar_metadata_read.phpt
@@ -0,0 +1,98 @@
+--TEST--
+Phar with metadata (read)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$pmeta = 'hi there';
+$files['a'] = array('cont' => 'a');
+$files['b'] = array('cont' => 'b');
+$files['c'] = array('cont' => 'c', 'meta' => array('hi', 'there'));
+$files['d'] = array('cont' => 'd', 'meta' => array('hi'=>'there','foo'=>'bar'));
+include 'files/phar_test.inc';
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+
+$phar = new Phar($fname);
+var_dump($phar->hasMetaData());
+var_dump($phar->getMetaData());
+var_dump($phar->delMetaData());
+var_dump($phar->getMetaData());
+var_dump($phar->delMetaData());
+var_dump($phar->getMetaData());
+foreach($files as $name => $cont) {
+ echo " meta $name\n";
+ var_dump($phar[$name]->hasMetadata());
+ var_dump($phar[$name]->getMetadata());
+ var_dump($phar[$name]->delMetadata());
+ var_dump($phar[$name]->getMetadata());
+}
+
+unset($phar);
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+bool(true)
+string(8) "hi there"
+bool(true)
+NULL
+bool(true)
+NULL
+ meta a
+bool(false)
+NULL
+bool(true)
+NULL
+ meta b
+bool(false)
+NULL
+bool(true)
+NULL
+ meta c
+bool(true)
+array(2) {
+ [0]=>
+ string(2) "hi"
+ [1]=>
+ string(5) "there"
+}
+bool(true)
+NULL
+ meta d
+bool(true)
+array(2) {
+ ["hi"]=>
+ string(5) "there"
+ ["foo"]=>
+ string(3) "bar"
+}
+bool(true)
+NULL
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+===DONE===
diff --git a/ext/phar/tests/phar_metadata_readU.phpt b/ext/phar/tests/phar_metadata_readU.phpt
new file mode 100644
index 0000000..281e978
--- /dev/null
+++ b/ext/phar/tests/phar_metadata_readU.phpt
@@ -0,0 +1,98 @@
+--TEST--
+Phar with metadata (read)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$pmeta = 'hi there';
+$files['a'] = array('cont' => 'a');
+$files['b'] = array('cont' => 'b');
+$files['c'] = array('cont' => 'c', 'meta' => array('hi', 'there'));
+$files['d'] = array('cont' => 'd', 'meta' => array('hi'=>'there','foo'=>'bar'));
+include 'files/phar_test.inc';
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+
+$phar = new Phar($fname);
+var_dump($phar->hasMetaData());
+var_dump($phar->getMetaData());
+var_dump($phar->delMetaData());
+var_dump($phar->getMetaData());
+var_dump($phar->delMetaData());
+var_dump($phar->getMetaData());
+foreach($files as $name => $cont) {
+ echo " meta $name\n";
+ var_dump($phar[$name]->hasMetadata());
+ var_dump($phar[$name]->getMetadata());
+ var_dump($phar[$name]->delMetadata());
+ var_dump($phar[$name]->getMetadata());
+}
+
+unset($phar);
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+bool(true)
+unicode(8) "hi there"
+bool(true)
+NULL
+bool(true)
+NULL
+ meta a
+bool(false)
+NULL
+bool(true)
+NULL
+ meta b
+bool(false)
+NULL
+bool(true)
+NULL
+ meta c
+bool(true)
+array(2) {
+ [0]=>
+ unicode(2) "hi"
+ [1]=>
+ unicode(5) "there"
+}
+bool(true)
+NULL
+ meta d
+bool(true)
+array(2) {
+ [u"hi"]=>
+ unicode(5) "there"
+ [u"foo"]=>
+ unicode(3) "bar"
+}
+bool(true)
+NULL
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+===DONE===
diff --git a/ext/phar/tests/phar_metadata_write.phpt b/ext/phar/tests/phar_metadata_write.phpt
new file mode 100644
index 0000000..0a3b66d
--- /dev/null
+++ b/ext/phar/tests/phar_metadata_write.phpt
@@ -0,0 +1,74 @@
+--TEST--
+Phar with metadata (write)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = array('cont' => 'a');
+$files['b'] = array('cont' => 'b', 'meta' => 'hi there');
+$files['c'] = array('cont' => 'c', 'meta' => array('hi', 'there'));
+$files['d'] = array('cont' => 'd', 'meta' => array('hi'=>'there','foo'=>'bar'));
+include 'files/phar_test.inc';
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+
+$phar = new Phar($fname);
+var_dump($phar->getMetadata());
+$phar->setMetadata(array('my' => 'friend'));
+$phar->setMetadata(array('my' => 'friend'));
+var_dump($phar->getMetadata());
+$phar['a']->setMetadata(42);
+$phar['b']->setMetadata(NULL);
+$phar['c']->setMetadata(array(25, 'foo'=>'bar'));
+$phar['d']->setMetadata(true);
+
+foreach($files as $name => $cont) {
+ var_dump($phar[$name]->getMetadata());
+}
+
+unset($phar);
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+NULL
+array(1) {
+ ["my"]=>
+ string(6) "friend"
+}
+int(42)
+NULL
+array(2) {
+ [0]=>
+ int(25)
+ ["foo"]=>
+ string(3) "bar"
+}
+bool(true)
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+===DONE===
diff --git a/ext/phar/tests/phar_metadata_writeU.phpt b/ext/phar/tests/phar_metadata_writeU.phpt
new file mode 100644
index 0000000..21c42d7
--- /dev/null
+++ b/ext/phar/tests/phar_metadata_writeU.phpt
@@ -0,0 +1,74 @@
+--TEST--
+Phar with metadata (write)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = array('cont' => 'a');
+$files['b'] = array('cont' => 'b', 'meta' => 'hi there');
+$files['c'] = array('cont' => 'c', 'meta' => array('hi', 'there'));
+$files['d'] = array('cont' => 'd', 'meta' => array('hi'=>'there','foo'=>'bar'));
+include 'files/phar_test.inc';
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+
+$phar = new Phar($fname);
+var_dump($phar->getMetadata());
+$phar->setMetadata(array('my' => 'friend'));
+$phar->setMetadata(array('my' => 'friend'));
+var_dump($phar->getMetadata());
+$phar['a']->setMetadata(42);
+$phar['b']->setMetadata(NULL);
+$phar['c']->setMetadata(array(25, 'foo'=>'bar'));
+$phar['d']->setMetadata(true);
+
+foreach($files as $name => $cont) {
+ var_dump($phar[$name]->getMetadata());
+}
+
+unset($phar);
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+NULL
+array(1) {
+ [u"my"]=>
+ unicode(6) "friend"
+}
+int(42)
+NULL
+array(2) {
+ [0]=>
+ int(25)
+ [u"foo"]=>
+ unicode(3) "bar"
+}
+bool(true)
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+===DONE===
diff --git a/ext/phar/tests/phar_mount.phpt b/ext/phar/tests/phar_mount.phpt
new file mode 100644
index 0000000..73bd489
--- /dev/null
+++ b/ext/phar/tests/phar_mount.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Phar: Phar::mount
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+
+$a = new Phar($fname);
+$a['index.php'] = '<?php
+Phar::mount("testit", "' . addslashes(__FILE__) . '");
+try {
+Phar::mount("testit", "' . addslashes(__FILE__) . '");
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+Phar::mount("' . addslashes($pname) . '/testit1", "' . addslashes(__FILE__) . '");
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+?>';
+$a->setStub('<?php
+set_include_path("phar://" . __FILE__);
+include "index.php";
+__HALT_COMPILER();');
+Phar::mount($pname . '/testit1', __FILE__);
+include $fname;
+// test copying of a phar with mounted entries
+$b = $a->convertToExecutable(Phar::TAR);
+$b->setStub('<?php
+set_include_path("phar://" . __FILE__);
+include "index.php";
+__HALT_COMPILER();');
+try {
+include $fname2;
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+try {
+Phar::mount($pname . '/oops', '/home/oops/../../etc/passwd:');
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+Phar::mount($pname . '/testit2', $pname . '/testit1');
+echo substr($a['testit2']->getContent(),0, 50),"\n";
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+Mounting of testit to %sphar_mount.php within phar %sphar_mount.phar.php failed
+Can only mount internal paths within a phar archive, use a relative path instead of "phar://%sphar_mount.phar.php/testit1"
+Mounting of testit to %sphar_mount.php within phar %sphar_mount.phar.tar failed
+Mounting of /oops to /home/oops/../../etc/passwd: within phar %sphar_mount.phar.php failed
+<?php
+$fname = dirname(__FILE__) . '/' . basename(
+===DONE===
diff --git a/ext/phar/tests/phar_offset_check.phpt b/ext/phar/tests/phar_offset_check.phpt
new file mode 100644
index 0000000..fe12534
--- /dev/null
+++ b/ext/phar/tests/phar_offset_check.phpt
@@ -0,0 +1,78 @@
+--TEST--
+Phar: disallow stub and alias setting via offset*() methods
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=1
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://'.$fname;
+
+$phar = new Phar($fname);
+$phar->setDefaultStub();
+$phar->setAlias('susan');
+$phar['a.txt'] = "first file\n";
+$phar['b.txt'] = "second file\n";
+
+try {
+ $phar->offsetGet('.phar/stub.php');
+} catch (Exception $e) {
+ echo $e->getMessage()."\n";
+}
+
+try {
+ $phar->offsetGet('.phar/alias.txt');
+} catch (Exception $e) {
+ echo $e->getMessage()."\n";
+}
+
+try {
+ $phar->offsetSet('.phar/stub.php', '<?php __HALT_COMPILER(); ?>');
+} catch (Exception $e) {
+ echo $e->getMessage()."\n";
+}
+
+var_dump(strlen($phar->getStub()));
+
+try {
+ $phar->offsetUnset('.phar/stub.php');
+} catch (Exception $e) {
+ echo $e->getMessage()."\n";
+}
+
+var_dump(strlen($phar->getStub()));
+
+try {
+ $phar->offsetSet('.phar/alias.txt', 'dolly');
+} catch (Exception $e) {
+ echo $e->getMessage()."\n";
+}
+
+var_dump($phar->getAlias());
+
+try {
+ $phar->offsetUnset('.phar/alias.txt');
+} catch (Exception $e) {
+ echo $e->getMessage()."\n";
+}
+
+var_dump($phar->getAlias());
+
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+Entry .phar/stub.php does not exist
+Entry .phar/alias.txt does not exist
+Cannot set stub ".phar/stub.php" directly in phar "%sphar_offset_check.phar.php", use setStub
+int(6685)
+int(6685)
+Cannot set alias ".phar/alias.txt" directly in phar "%sphar_offset_check.phar.php", use setAlias
+string(5) "susan"
+string(5) "susan"
+===DONE===
diff --git a/ext/phar/tests/phar_offset_get_error.phpt b/ext/phar/tests/phar_offset_get_error.phpt
new file mode 100644
index 0000000..dade472
--- /dev/null
+++ b/ext/phar/tests/phar_offset_get_error.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Phar: ignore filenames starting with / on offsetSet
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=1
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://'.$fname;
+$iname = '/file.txt';
+$ename = '/error/..';
+
+$p = new Phar($fname);
+$p[$iname] = "foobar\n";
+
+try
+{
+ $p[$ename] = "foobar\n";
+}
+catch(Exception $e)
+{
+ echo $e->getMessage() . "\n";
+}
+
+include($pname . $iname);
+
+// extra coverage
+try {
+$p['.phar/oops'] = 'hi';
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+try {
+$a = $p['.phar/stub.php'];
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+Entry /error/.. does not exist and cannot be created: phar error: invalid path "/error/.." contains upper directory reference
+foobar
+Cannot set any files or directories in magic ".phar" directory
+Entry .phar/stub.php does not exist
+===DONE===
diff --git a/ext/phar/tests/phar_oo_001.phpt b/ext/phar/tests/phar_oo_001.phpt
new file mode 100644
index 0000000..7a81bbb
--- /dev/null
+++ b/ext/phar/tests/phar_oo_001.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Phar object: basics
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+require_once 'files/phar_oo_test.inc';
+
+$phar = new Phar($fname);
+var_dump($phar->getVersion());
+var_dump(count($phar));
+
+class MyPhar extends Phar
+{
+ function __construct()
+ {
+ }
+}
+
+try
+{
+ $phar = new MyPhar();
+ var_dump($phar->getVersion());
+}
+catch (LogicException $e)
+{
+ var_dump($e->getMessage());
+}
+try {
+ $phar = new Phar('test.phar');
+ $phar->__construct('oops');
+} catch (LogicException $e)
+{
+ var_dump($e->getMessage());
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECT--
+string(5) "1.0.0"
+int(5)
+string(50) "Cannot call method on an uninitialized Phar object"
+string(29) "Cannot call constructor twice"
+===DONE===
diff --git a/ext/phar/tests/phar_oo_001U.phpt b/ext/phar/tests/phar_oo_001U.phpt
new file mode 100644
index 0000000..f13ddd4
--- /dev/null
+++ b/ext/phar/tests/phar_oo_001U.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Phar object: basics
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+require_once 'files/phar_oo_test.inc';
+
+$phar = new Phar($fname);
+var_dump($phar->getVersion());
+var_dump(count($phar));
+
+class MyPhar extends Phar
+{
+ function __construct()
+ {
+ }
+}
+
+try
+{
+ $phar = new MyPhar();
+ var_dump($phar->getVersion());
+}
+catch (BadMethodCallException $e)
+{
+ var_dump($e->getMessage());
+}
+try {
+ $phar = new Phar('test.phar');
+ $phar->__construct('oops');
+} catch (BadMethodCallException $e)
+{
+ var_dump($e->getMessage());
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECT--
+string(5) "1.0.0"
+int(5)
+unicode(50) "Cannot call method on an uninitialized Phar object"
+unicode(29) "Cannot call constructor twice"
+===DONE===
diff --git a/ext/phar/tests/phar_oo_002.phpt b/ext/phar/tests/phar_oo_002.phpt
new file mode 100644
index 0000000..3754151
--- /dev/null
+++ b/ext/phar/tests/phar_oo_002.phpt
@@ -0,0 +1,140 @@
+--TEST--
+Phar object: iterator & entries
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+
+require_once 'files/phar_oo_test.inc';
+
+$phar = new Phar($fname);
+$phar->setInfoClass('SplFileInfo');
+foreach($phar as $name => $ent)
+{
+ var_dump(str_replace(str_replace('\\', '/', dirname(__FILE__)), '*', $name));
+ var_dump($ent->getFilename());
+ var_dump($ent->getSize());
+ var_dump($ent->getType());
+ var_dump($ent->isWritable());
+ var_dump($ent->isReadable());
+ var_dump($ent->isExecutable());
+ var_dump($ent->isFile());
+ var_dump($ent->isDir());
+ var_dump($ent->isLink());
+ var_dump($ent->getCTime());
+ var_dump($ent->getMTime());
+ var_dump($ent->getATime());
+}
+
+echo "==RECURSIVE==\n";
+
+$phar = new Phar($fname);
+foreach(new RecursiveIteratorIterator($phar) as $name => $ent)
+{
+ var_dump(str_replace(str_replace('\\', '/', dirname(__FILE__)), '*', $name));
+ var_dump(str_replace('\\', '/', $ent->getFilename()));
+ var_dump($ent->getCompressedSize());
+ var_dump($ent->isCRCChecked());
+ var_dump($ent->isCRCChecked() ? $ent->getCRC32() : NULL);
+ var_dump($ent->getPharFlags());
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECTF--
+string(42) "phar://*/files/phar_oo_test.phar.php%ca.php"
+string(5) "a.php"
+int(32)
+string(4) "file"
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+string(38) "phar://*/files/phar_oo_test.phar.php%cb"
+string(1) "b"
+int(0)
+string(3) "dir"
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+bool(true)
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+string(42) "phar://*/files/phar_oo_test.phar.php%cb.php"
+string(5) "b.php"
+int(32)
+string(4) "file"
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+string(42) "phar://*/files/phar_oo_test.phar.php%ce.php"
+string(5) "e.php"
+int(32)
+string(4) "file"
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+==RECURSIVE==
+string(42) "phar://*/files/phar_oo_test.phar.php%ca.php"
+string(5) "a.php"
+int(32)
+bool(false)
+NULL
+int(0)
+string(44) "phar://*/files/phar_oo_test.phar.php/b%cc.php"
+string(5) "c.php"
+int(34)
+bool(false)
+NULL
+int(0)
+string(44) "phar://*/files/phar_oo_test.phar.php/b%cd.php"
+string(5) "d.php"
+int(34)
+bool(false)
+NULL
+int(0)
+string(42) "phar://*/files/phar_oo_test.phar.php%cb.php"
+string(5) "b.php"
+int(32)
+bool(false)
+NULL
+int(0)
+string(42) "phar://*/files/phar_oo_test.phar.php%ce.php"
+string(5) "e.php"
+int(32)
+bool(false)
+NULL
+int(0)
+===DONE===
diff --git a/ext/phar/tests/phar_oo_002U.phpt b/ext/phar/tests/phar_oo_002U.phpt
new file mode 100644
index 0000000..26d0d68
--- /dev/null
+++ b/ext/phar/tests/phar_oo_002U.phpt
@@ -0,0 +1,140 @@
+--TEST--
+Phar object: iterator & entries
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip requires Unicode support");
+if (!extension_loaded("spl")) die("skip SPL not available");
+?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+
+require_once 'files/phar_oo_test.inc';
+
+$phar = new Phar($fname);
+$phar->setInfoClass('SplFileInfo');
+foreach($phar as $name => $ent)
+{
+ var_dump(str_replace(str_replace('\\', '/', dirname(__FILE__)), '*', $name));
+ var_dump($ent->getFilename());
+ var_dump($ent->getSize());
+ var_dump($ent->getType());
+ var_dump($ent->isWritable());
+ var_dump($ent->isReadable());
+ var_dump($ent->isExecutable());
+ var_dump($ent->isFile());
+ var_dump($ent->isDir());
+ var_dump($ent->isLink());
+ var_dump($ent->getCTime());
+ var_dump($ent->getMTime());
+ var_dump($ent->getATime());
+}
+
+echo "==RECURSIVE==\n";
+
+$phar = new Phar($fname);
+foreach(new RecursiveIteratorIterator($phar) as $name => $ent)
+{
+ var_dump(str_replace(str_replace('\\', '/', dirname(__FILE__)), '*', $name));
+ var_dump(str_replace('\\', '/', $ent->getFilename()));
+ var_dump($ent->getCompressedSize());
+ var_dump($ent->isCRCChecked());
+ var_dump($ent->isCRCChecked() ? $ent->getCRC32() : NULL);
+ var_dump($ent->getPharFlags());
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECTF--
+unicode(42) "phar://*/files/phar_oo_test.phar.php%ca.php"
+string(5) "a.php"
+int(32)
+unicode(4) "file"
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+unicode(38) "phar://*/files/phar_oo_test.phar.php%cb"
+string(1) "b"
+int(0)
+unicode(3) "dir"
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+bool(true)
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+unicode(42) "phar://*/files/phar_oo_test.phar.php%cb.php"
+string(5) "b.php"
+int(32)
+unicode(4) "file"
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+unicode(42) "phar://*/files/phar_oo_test.phar.php%ce.php"
+string(5) "e.php"
+int(32)
+unicode(4) "file"
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+int(%d)
+int(%d)
+int(%d)
+==RECURSIVE==
+unicode(42) "phar://*/files/phar_oo_test.phar.php%ca.php"
+unicode(5) "a.php"
+int(32)
+bool(false)
+NULL
+int(0)
+unicode(44) "phar://*/files/phar_oo_test.phar.php/b%cc.php"
+unicode(5) "c.php"
+int(34)
+bool(false)
+NULL
+int(0)
+unicode(44) "phar://*/files/phar_oo_test.phar.php/b%cd.php"
+unicode(5) "d.php"
+int(34)
+bool(false)
+NULL
+int(0)
+unicode(42) "phar://*/files/phar_oo_test.phar.php%cb.php"
+unicode(5) "b.php"
+int(32)
+bool(false)
+NULL
+int(0)
+unicode(42) "phar://*/files/phar_oo_test.phar.php%ce.php"
+unicode(5) "e.php"
+int(32)
+bool(false)
+NULL
+int(0)
+===DONE===
diff --git a/ext/phar/tests/phar_oo_003.phpt b/ext/phar/tests/phar_oo_003.phpt
new file mode 100644
index 0000000..ccaf7c6
--- /dev/null
+++ b/ext/phar/tests/phar_oo_003.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Phar object: entry & openFile()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+require_once 'files/phar_oo_test.inc';
+
+$phar = new Phar($fname);
+$phar->setInfoClass();
+foreach($phar as $name => $ent)
+{
+ var_dump($ent->getFilename());
+ if ($ent->isDir()) {
+ var_dump('DIR');
+ } else {
+ var_dump($ent->openFile()->fgets());
+ include $ent->getPathName();
+ }
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECTF--
+string(5) "a.php"
+string(32) "<?php echo "This is a.php\n"; ?>"
+This is a.php
+string(1) "b"
+%s(3) "DIR"
+string(5) "b.php"
+string(32) "<?php echo "This is b.php\n"; ?>"
+This is b.php
+string(5) "e.php"
+string(32) "<?php echo "This is e.php\n"; ?>"
+This is e.php
+===DONE===
diff --git a/ext/phar/tests/phar_oo_004.phpt b/ext/phar/tests/phar_oo_004.phpt
new file mode 100644
index 0000000..ba67749
--- /dev/null
+++ b/ext/phar/tests/phar_oo_004.phpt
@@ -0,0 +1,129 @@
+--TEST--
+Phar and DirectoryIterator
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+require_once 'files/phar_oo_test.inc';
+
+$it = new DirectoryIterator('phar://'.$fname);
+
+foreach($it as $name => $ent)
+{
+ var_dump($name);
+ var_dump($ent->getFilename());
+ var_dump($ent->isDir());
+ var_dump($ent->isDot());
+}
+
+?>
+===MANUAL===
+<?php
+
+class MyDirectoryIterator extends DirectoryIterator
+{
+ function __construct($dir)
+ {
+ echo __METHOD__ . "\n";
+ parent::__construct($dir);
+ }
+
+ function rewind()
+ {
+ echo __METHOD__ . "\n";
+ parent::rewind();
+ }
+
+ function valid()
+ {
+ echo __METHOD__ . "\n";
+ return parent::valid();
+ }
+
+ function key()
+ {
+ echo __METHOD__ . "\n";
+ return parent::key();
+ }
+
+ function current()
+ {
+ echo __METHOD__ . "\n";
+ return parent::current();
+ }
+
+ function next()
+ {
+ echo __METHOD__ . "\n";
+ parent::next();
+ }
+}
+
+$it = new MyDirectoryIterator('phar://'.$fname);
+
+foreach($it as $name => $ent)
+{
+ var_dump($name);
+ var_dump($ent->getFilename());
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECT--
+int(0)
+string(5) "a.php"
+bool(false)
+bool(false)
+int(1)
+string(1) "b"
+bool(true)
+bool(false)
+int(2)
+string(5) "b.php"
+bool(false)
+bool(false)
+int(3)
+string(5) "e.php"
+bool(false)
+bool(false)
+===MANUAL===
+MyDirectoryIterator::__construct
+MyDirectoryIterator::rewind
+MyDirectoryIterator::valid
+MyDirectoryIterator::current
+MyDirectoryIterator::key
+int(0)
+string(5) "a.php"
+MyDirectoryIterator::next
+MyDirectoryIterator::valid
+MyDirectoryIterator::current
+MyDirectoryIterator::key
+int(1)
+string(1) "b"
+MyDirectoryIterator::next
+MyDirectoryIterator::valid
+MyDirectoryIterator::current
+MyDirectoryIterator::key
+int(2)
+string(5) "b.php"
+MyDirectoryIterator::next
+MyDirectoryIterator::valid
+MyDirectoryIterator::current
+MyDirectoryIterator::key
+int(3)
+string(5) "e.php"
+MyDirectoryIterator::next
+MyDirectoryIterator::valid
+===DONE===
diff --git a/ext/phar/tests/phar_oo_004U.phpt b/ext/phar/tests/phar_oo_004U.phpt
new file mode 100644
index 0000000..2762ee3
--- /dev/null
+++ b/ext/phar/tests/phar_oo_004U.phpt
@@ -0,0 +1,129 @@
+--TEST--
+Phar and DirectoryIterator
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip requires Unicode support");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+require_once 'files/phar_oo_test.inc';
+
+$it = new DirectoryIterator('phar://'.$fname);
+
+foreach($it as $name => $ent)
+{
+ var_dump($name);
+ var_dump($ent->getFilename());
+ var_dump($ent->isDir());
+ var_dump($ent->isDot());
+}
+
+?>
+===MANUAL===
+<?php
+
+class MyDirectoryIterator extends DirectoryIterator
+{
+ function __construct($dir)
+ {
+ echo __METHOD__ . "\n";
+ parent::__construct($dir);
+ }
+
+ function rewind()
+ {
+ echo __METHOD__ . "\n";
+ parent::rewind();
+ }
+
+ function valid()
+ {
+ echo __METHOD__ . "\n";
+ return parent::valid();
+ }
+
+ function key()
+ {
+ echo __METHOD__ . "\n";
+ return parent::key();
+ }
+
+ function current()
+ {
+ echo __METHOD__ . "\n";
+ return parent::current();
+ }
+
+ function next()
+ {
+ echo __METHOD__ . "\n";
+ parent::next();
+ }
+}
+
+$it = new MyDirectoryIterator('phar://'.$fname);
+
+foreach($it as $name => $ent)
+{
+ var_dump($name);
+ var_dump($ent->getFilename());
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECT--
+int(0)
+unicode(5) "a.php"
+bool(false)
+bool(false)
+int(1)
+unicode(1) "b"
+bool(true)
+bool(false)
+int(2)
+unicode(5) "b.php"
+bool(false)
+bool(false)
+int(3)
+unicode(5) "e.php"
+bool(false)
+bool(false)
+===MANUAL===
+MyDirectoryIterator::__construct
+MyDirectoryIterator::rewind
+MyDirectoryIterator::valid
+MyDirectoryIterator::current
+MyDirectoryIterator::key
+int(0)
+unicode(5) "a.php"
+MyDirectoryIterator::next
+MyDirectoryIterator::valid
+MyDirectoryIterator::current
+MyDirectoryIterator::key
+int(1)
+unicode(1) "b"
+MyDirectoryIterator::next
+MyDirectoryIterator::valid
+MyDirectoryIterator::current
+MyDirectoryIterator::key
+int(2)
+unicode(5) "b.php"
+MyDirectoryIterator::next
+MyDirectoryIterator::valid
+MyDirectoryIterator::current
+MyDirectoryIterator::key
+int(3)
+unicode(5) "e.php"
+MyDirectoryIterator::next
+MyDirectoryIterator::valid
+===DONE===
diff --git a/ext/phar/tests/phar_oo_005.phpt b/ext/phar/tests/phar_oo_005.phpt
new file mode 100644
index 0000000..cb3f298
--- /dev/null
+++ b/ext/phar/tests/phar_oo_005.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Phar and RecursiveDirectoryIterator
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (version_compare(PHP_VERSION, "5.3", "<") or version_compare(PHP_VERSION, "5.4", ">="))
+ die("skip requires 5.3");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+require_once 'files/phar_oo_test.inc';
+$fname = str_replace('\\', '/', $fname);
+
+$it = new RecursiveDirectoryIterator('phar://'.$fname);
+$it = new RecursiveIteratorIterator($it);
+
+foreach($it as $name => $ent)
+{
+ var_dump(str_replace(array('\\', $fname), array('/', '*'), $name));
+ var_dump(str_replace(array('\\', $fname), array('/', '*'), $ent->getPathname()));
+ var_dump(str_replace('\\', '/', $it->getSubPath()));
+ var_dump(str_replace('\\', '/', $it->getSubPathName()));
+ $sub = $it->getPathInfo();
+ var_dump(str_replace('\\', '/', $sub->getFilename()));
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECT--
+string(14) "phar://*/a.php"
+string(14) "phar://*/a.php"
+string(0) ""
+string(5) "a.php"
+string(21) "phar_oo_test.phar.php"
+string(16) "phar://*/b/c.php"
+string(16) "phar://*/b/c.php"
+string(1) "b"
+string(7) "b/c.php"
+string(1) "b"
+string(16) "phar://*/b/d.php"
+string(16) "phar://*/b/d.php"
+string(1) "b"
+string(7) "b/d.php"
+string(1) "b"
+string(14) "phar://*/b.php"
+string(14) "phar://*/b.php"
+string(0) ""
+string(5) "b.php"
+string(21) "phar_oo_test.phar.php"
+string(14) "phar://*/e.php"
+string(14) "phar://*/e.php"
+string(0) ""
+string(5) "e.php"
+string(21) "phar_oo_test.phar.php"
+===DONE===
diff --git a/ext/phar/tests/phar_oo_005U.phpt b/ext/phar/tests/phar_oo_005U.phpt
new file mode 100644
index 0000000..bcdcb08
--- /dev/null
+++ b/ext/phar/tests/phar_oo_005U.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Phar and RecursiveDirectoryIterator
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip requires Unicode support");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+require_once 'files/phar_oo_test.inc';
+$fname = str_replace('\\', '/', $fname);
+
+$it = new RecursiveDirectoryIterator('phar://'.$fname);
+$it = new RecursiveIteratorIterator($it);
+
+foreach($it as $name => $ent)
+{
+ var_dump(str_replace(array('\\', $fname), array('/', '*'), $name));
+ var_dump(str_replace(array('\\', $fname), array('/', '*'), $ent->getPathname()));
+ var_dump(str_replace('\\', '/', $it->getSubPath()));
+ var_dump(str_replace('\\', '/', $it->getSubPathName()));
+ $sub = $it->getPathInfo();
+ var_dump(str_replace('\\', '/', $sub->getFilename()));
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECT--
+unicode(14) "phar://*/a.php"
+unicode(14) "phar://*/a.php"
+unicode(0) ""
+unicode(5) "a.php"
+unicode(5) "a.php"
+unicode(16) "phar://*/b/c.php"
+unicode(16) "phar://*/b/c.php"
+unicode(1) "b"
+unicode(7) "b/c.php"
+unicode(5) "c.php"
+unicode(16) "phar://*/b/d.php"
+unicode(16) "phar://*/b/d.php"
+unicode(1) "b"
+unicode(7) "b/d.php"
+unicode(5) "d.php"
+unicode(14) "phar://*/b.php"
+unicode(14) "phar://*/b.php"
+unicode(0) ""
+unicode(5) "b.php"
+unicode(5) "b.php"
+unicode(14) "phar://*/e.php"
+unicode(14) "phar://*/e.php"
+unicode(0) ""
+unicode(5) "e.php"
+unicode(5) "e.php"
+===DONE===
diff --git a/ext/phar/tests/phar_oo_005_5.2.phpt b/ext/phar/tests/phar_oo_005_5.2.phpt
new file mode 100644
index 0000000..9e509d9
--- /dev/null
+++ b/ext/phar/tests/phar_oo_005_5.2.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Phar and RecursiveDirectoryIterator
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+require_once 'files/phar_oo_test.inc';
+$fname = str_replace('\\', '/', $fname);
+
+$it = new RecursiveDirectoryIterator('phar://'.$fname);
+$it = new RecursiveIteratorIterator($it);
+
+foreach($it as $name => $ent)
+{
+ var_dump(str_replace(array('\\', $fname), array('/', '*'), $name));
+ var_dump(str_replace(array('\\', $fname), array('/', '*'), $ent->getPathname()));
+ var_dump(str_replace('\\', '/', $it->getSubPath()));
+ var_dump(str_replace('\\', '/', $it->getSubPathName()));
+ $sub = $it->getPathInfo();
+ var_dump(str_replace('\\', '/', $sub->getFilename()));
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECT--
+string(14) "phar://*/a.php"
+string(14) "phar://*/a.php"
+string(0) ""
+string(5) "a.php"
+string(21) "phar_oo_test.phar.php"
+string(16) "phar://*/b/c.php"
+string(16) "phar://*/b/c.php"
+string(1) "b"
+string(7) "b/c.php"
+string(1) "b"
+string(16) "phar://*/b/d.php"
+string(16) "phar://*/b/d.php"
+string(1) "b"
+string(7) "b/d.php"
+string(1) "b"
+string(14) "phar://*/b.php"
+string(14) "phar://*/b.php"
+string(0) ""
+string(5) "b.php"
+string(21) "phar_oo_test.phar.php"
+string(14) "phar://*/e.php"
+string(14) "phar://*/e.php"
+string(0) ""
+string(5) "e.php"
+string(21) "phar_oo_test.phar.php"
+===DONE===
diff --git a/ext/phar/tests/phar_oo_006.phpt b/ext/phar/tests/phar_oo_006.phpt
new file mode 100644
index 0000000..556c98c
--- /dev/null
+++ b/ext/phar/tests/phar_oo_006.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Phar object: array access
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+require_once 'files/phar_oo_test.inc';
+
+class MyFile extends SplFileObject
+{
+ function __construct($what)
+ {
+ echo __METHOD__ . "($what)\n";
+ parent::__construct($what);
+ }
+}
+
+$phar = new Phar($fname);
+try
+{
+ $phar->setFileClass('SplFileInfo');
+}
+catch (UnexpectedValueException $e)
+{
+ echo $e->getMessage() . "\n";
+}
+$phar->setInfoClass('MyFile');
+
+echo $phar['a.php']->getFilename() . "\n";
+echo $phar['b/c.php']->getFilename() . "\n";
+echo $phar['b.php']->getFilename() . "\n";
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECTF--
+SplFileInfo::setFileClass() expects parameter 1 to be a class name derived from SplFileObject, 'SplFileInfo' given
+MyFile::__construct(phar://%s/a.php)
+a.php
+MyFile::__construct(phar://%s/b/c.php)
+c.php
+MyFile::__construct(phar://%s/b.php)
+b.php
+===DONE===
diff --git a/ext/phar/tests/phar_oo_007.phpt b/ext/phar/tests/phar_oo_007.phpt
new file mode 100644
index 0000000..788b11f
--- /dev/null
+++ b/ext/phar/tests/phar_oo_007.phpt
@@ -0,0 +1,87 @@
+--TEST--
+Phar object: access through SplFileObject
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+require_once 'files/phar_oo_test.inc';
+
+class MyFile extends SplFileObject
+{
+ function __construct($name)
+ {
+ echo __METHOD__ . "(" . str_replace(str_replace('\\', '/', dirname(__FILE__)), '*', $name) . ")\n";
+ parent::__construct($name);
+ }
+}
+
+$phar = new Phar($fname);
+$phar->setInfoClass('MyFile');
+
+$f = $phar['a.php'];
+
+$s = $f->fstat();
+
+var_dump($s['atime']);
+var_dump($s['ctime']);
+var_dump($s['mtime']);
+
+var_dump($f->ftell());
+var_dump($f->eof());
+var_dump($f->fgets());
+var_dump($f->eof());
+var_dump($f->fseek(20));
+var_dump($f->ftell());
+var_dump($f->fgets());
+var_dump($f->rewind());
+var_dump($f->ftell());
+var_dump($f->fgets());
+var_dump($f->ftell());
+
+?>
+===AGAIN===
+<?php
+
+$f = $phar['a.php'];
+
+var_dump($f->ftell());
+var_dump($f->eof());
+var_dump($f->fgets());
+var_dump($f->eof());
+
+//unset($f); without unset we check for working refcounting
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECTF--
+MyFile::__construct(phar://*/files/phar_oo_test.phar.php/a.php)
+int(%d)
+int(%d)
+int(%d)
+int(0)
+bool(false)
+string(32) "<?php echo "This is a.php\n"; ?>"
+bool(true)
+int(0)
+int(20)
+string(12) "a.php\n"; ?>"
+NULL
+int(0)
+string(32) "<?php echo "This is a.php\n"; ?>"
+int(32)
+===AGAIN===
+MyFile::__construct(phar://*/files/phar_oo_test.phar.php/a.php)
+int(0)
+bool(false)
+string(32) "<?php echo "This is a.php\n"; ?>"
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/phar_oo_008.phpt b/ext/phar/tests/phar_oo_008.phpt
new file mode 100644
index 0000000..80d1ece
--- /dev/null
+++ b/ext/phar/tests/phar_oo_008.phpt
@@ -0,0 +1,119 @@
+--TEST--
+Phar object: iterating via SplFileObject
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+$pharconfig = 1;
+
+require_once 'files/phar_oo_test.inc';
+
+$phar = new Phar($fname);
+$phar->setInfoClass('SplFileObject');
+
+$f = $phar['a.csv'];
+echo "===1===\n";
+foreach($f as $k => $v)
+{
+ echo "$k=>$v\n";
+}
+
+$f->setFlags(SplFileObject::DROP_NEW_LINE);
+
+echo "===2===\n";
+foreach($f as $k => $v)
+{
+ echo "$k=>$v\n";
+}
+
+class MyCSVFile extends SplFileObject
+{
+ function current()
+ {
+ return parent::fgetcsv(',', '"');
+ }
+}
+
+$phar->setInfoClass('MyCSVFile');
+$v = $phar['a.csv'];
+
+echo "===3===\n";
+while(!$v->eof())
+{
+ echo $v->key() . "=>" . join('|',$v->fgetcsv()) . "\n";
+}
+
+echo "===4===\n";
+$v->rewind();
+while(!$v->eof())
+{
+ $l = $v->fgetcsv();
+ echo $v->key() . "=>" . join('|',$l) . "\n";
+}
+
+echo "===5===\n";
+foreach($v as $k => $d)
+{
+ echo "$k=>" . join('|',$d) . "\n";
+}
+
+class MyCSVFile2 extends SplFileObject
+{
+ function getCurrentLine()
+ {
+ echo __METHOD__ . "\n";
+ return parent::fgetcsv(',', '"');
+ }
+}
+
+$phar->setInfoClass('MyCSVFile2');
+$v = $phar['a.csv'];
+
+echo "===6===\n";
+foreach($v as $k => $d)
+{
+ echo "$k=>" . join('|',$d) . "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECTF--
+===1===
+0=>1,2,3
+
+1=>2,a,b
+
+2=>3,"c","'e'"
+===2===
+0=>1,2,3
+1=>2,a,b
+2=>3,"c","'e'"
+===3===
+0=>1|2|3
+0=>2|a|b
+1=>3|c|'e'
+===4===
+0=>1|2|3
+1=>2|a|b
+2=>3|c|'e'
+===5===
+0=>1|2|3
+1=>2|a|b
+2=>3|c|'e'
+===6===
+MyCSVFile2::getCurrentLine
+1=>1|2|3
+MyCSVFile2::getCurrentLine
+3=>2|a|b
+MyCSVFile2::getCurrentLine
+5=>3|c|'e'
+===DONE===
diff --git a/ext/phar/tests/phar_oo_009.phpt b/ext/phar/tests/phar_oo_009.phpt
new file mode 100644
index 0000000..6abd03e
--- /dev/null
+++ b/ext/phar/tests/phar_oo_009.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Phar object: iterating via SplFileObject and reading csv
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!defined('SplFileObject::READ_CSV') || !defined('SplFileObject::SKIP_EMPTY')) die('skip newer SPL version is required'); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+$pharconfig = 2;
+
+require_once 'files/phar_oo_test.inc';
+
+$phar = new Phar($fname);
+$phar->setInfoClass('SplFileObject');
+
+$f = $phar['a.csv'];
+$f->setFlags(SplFileObject::SKIP_EMPTY | SplFileObject::DROP_NEW_LINE);
+foreach($f as $k => $v)
+{
+ echo "$k=>$v\n";
+}
+
+?>
+===CSV===
+<?php
+
+$f->setFlags(SplFileObject::SKIP_EMPTY | SplFileObject::DROP_NEW_LINE | SplFileObject::READ_CSV);
+foreach($f as $k => $v)
+{
+ echo "$k=>" . join('|', $v) . "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECTF--
+0=>1,2,3
+1=>2,a,b
+2=>3,"c","'e'"
+3=>4
+4=>5,5
+5=>7,777
+===CSV===
+0=>1|2|3
+1=>2|a|b
+2=>3|c|'e'
+3=>4
+4=>5|5
+6=>7|777
+===DONE===
diff --git a/ext/phar/tests/phar_oo_010.phpt b/ext/phar/tests/phar_oo_010.phpt
new file mode 100644
index 0000000..1d3ff73
--- /dev/null
+++ b/ext/phar/tests/phar_oo_010.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Phar object: ArrayAccess and isset
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+$pharconfig = 0;
+
+require_once 'files/phar_oo_test.inc';
+
+$phar = new Phar($fname);
+
+var_dump(isset($phar['a.php']));
+var_dump(isset($phar['b.php']));
+var_dump(isset($phar['b/c.php']));
+var_dump(isset($phar['b/d.php']));
+var_dump(isset($phar['e.php']));
+
+?>
+===DIR===
+<?php
+var_dump(isset($phar['b']));
+?>
+===NA===
+<?php
+var_dump(isset($phar['a']));
+var_dump(isset($phar['b/c']));
+var_dump(isset($phar[12]));
+var_dump(isset($phar['b']));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECTF--
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+===DIR===
+bool(true)
+===NA===
+bool(false)
+bool(false)
+bool(false)
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/phar_oo_011.phpt b/ext/phar/tests/phar_oo_011.phpt
new file mode 100644
index 0000000..cfbab70
--- /dev/null
+++ b/ext/phar/tests/phar_oo_011.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Phar object: add file
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$pharconfig = 0;
+
+require_once 'files/phar_oo_test.inc';
+
+$phar = new Phar($fname);
+$phar->setInfoClass('SplFileObject');
+
+$phar['hi/f.php'] = 'hi';
+var_dump(isset($phar['hi']));
+var_dump(isset($phar['hi/f.php']));
+echo $phar['hi/f.php'];
+echo "\n";
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECT--
+bool(true)
+bool(true)
+hi
+===DONE===
diff --git a/ext/phar/tests/phar_oo_011b.phpt b/ext/phar/tests/phar_oo_011b.phpt
new file mode 100644
index 0000000..36d9963
--- /dev/null
+++ b/ext/phar/tests/phar_oo_011b.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Phar object: add file
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+
+try
+{
+ $pharconfig = 0;
+
+ require_once 'files/phar_oo_test.inc';
+
+ $phar = new Phar($fname);
+
+ $phar['f.php'] = 'hi';
+ var_dump(isset($phar['f.php']));
+ echo $phar['f.php'];
+ echo "\n";
+}
+catch (BadMethodCallException $e)
+{
+ echo "Exception: " . $e->getMessage() . "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECTF--
+Exception: Write operations disabled by the php.ini setting phar.readonly
+===DONE===
diff --git a/ext/phar/tests/phar_oo_012.phpt b/ext/phar/tests/phar_oo_012.phpt
new file mode 100644
index 0000000..e79ac09
--- /dev/null
+++ b/ext/phar/tests/phar_oo_012.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Phar object: unset file
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$pharconfig = 0;
+
+require_once 'files/phar_oo_test.inc';
+
+$phar = new Phar($fname);
+$phar->setInfoClass('SplFileObject');
+
+$phar['f.php'] = 'hi';
+var_dump(isset($phar['f.php']));
+echo $phar['f.php'];
+echo "\n";
+unset($phar['f.php']);
+var_dump(isset($phar['f.php']));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECT--
+bool(true)
+hi
+bool(false)
+===DONE===
diff --git a/ext/phar/tests/phar_oo_012_confirm.phpt b/ext/phar/tests/phar_oo_012_confirm.phpt
new file mode 100644
index 0000000..58a3be8
--- /dev/null
+++ b/ext/phar/tests/phar_oo_012_confirm.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Phar object: unset file (confirm disk file is changed)
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$pharconfig = 0;
+
+require_once 'files/phar_oo_test.inc';
+
+$phar = new Phar($fname);
+$phar->setInfoClass('SplFileObject');
+
+$phar['f.php'] = 'hi';
+var_dump(isset($phar['f.php']));
+echo $phar['f.php'];
+echo "\n";
+$md5 = md5_file($fname);
+unset($phar['f.php']);
+$md52 = md5_file($fname);
+if ($md5 == $md52) echo 'File on disk has not changed';
+var_dump(isset($phar['f.php']));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECT--
+bool(true)
+hi
+bool(false)
+===DONE===
diff --git a/ext/phar/tests/phar_oo_012b.phpt b/ext/phar/tests/phar_oo_012b.phpt
new file mode 100644
index 0000000..80d8ed8
--- /dev/null
+++ b/ext/phar/tests/phar_oo_012b.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Phar object: unset file
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+
+try
+{
+ $pharconfig = 0;
+
+ require_once 'files/phar_oo_test.inc';
+
+ $phar = new Phar($fname);
+ $phar->setInfoClass('SplFileObject');
+
+ $phar['f.php'] = 'hi';
+ var_dump(isset($phar['f.php']));
+ echo $phar['f.php'];
+ echo "\n";
+ unset($phar['f.php']);
+ var_dump(isset($phar['f.php']));
+}
+catch (BadMethodCallException $e)
+{
+ echo "Exception: " . $e->getMessage() . "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECTF--
+Exception: Write operations disabled by the php.ini setting phar.readonly
+===DONE===
diff --git a/ext/phar/tests/phar_oo_compressallbz2.phpt b/ext/phar/tests/phar_oo_compressallbz2.phpt
new file mode 100644
index 0000000..3f52227
--- /dev/null
+++ b/ext/phar/tests/phar_oo_compressallbz2.phpt
@@ -0,0 +1,66 @@
+--TEST--
+Phar::compressFiles(Phar::BZ2)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("bz2")) die("skip bz2 not present"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = '<?php __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+
+$phar = new Phar($fname);
+$phar->compressFiles(Phar::BZ2);
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed(Phar::GZ));
+var_dump($phar['a']->isCompressed(Phar::BZ2));
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed(Phar::GZ));
+var_dump($phar['b']->isCompressed(Phar::BZ2));
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed(Phar::GZ));
+var_dump($phar['b']->isCompressed(Phar::BZ2));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+?>
+--EXPECTF--
+string(1) "a"
+bool(false)
+string(1) "b"
+bool(false)
+string(1) "c"
+bool(false)
+string(1) "a"
+bool(false)
+bool(true)
+string(1) "b"
+bool(false)
+bool(true)
+string(1) "c"
+bool(false)
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/phar_oo_compressallgz.phpt b/ext/phar/tests/phar_oo_compressallgz.phpt
new file mode 100644
index 0000000..55e7435
--- /dev/null
+++ b/ext/phar/tests/phar_oo_compressallgz.phpt
@@ -0,0 +1,71 @@
+--TEST--
+Phar::compressFiles(Phar::GZ)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not present"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = '<?php __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+
+$phar = new Phar($fname);
+$phar->compressFiles(Phar::GZ);
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed(Phar::GZ));
+var_dump($phar['a']->isCompressed(Phar::BZ2));
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed(Phar::GZ));
+var_dump($phar['b']->isCompressed(Phar::BZ2));
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed(Phar::GZ));
+var_dump($phar['b']->isCompressed(Phar::BZ2));
+try {
+$phar->compressFiles(25);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+?>
+--EXPECTF--
+string(1) "a"
+bool(false)
+string(1) "b"
+bool(false)
+string(1) "c"
+bool(false)
+string(1) "a"
+bool(true)
+bool(false)
+string(1) "b"
+bool(true)
+bool(false)
+string(1) "c"
+bool(true)
+bool(false)
+Unknown compression specified, please pass one of Phar::GZ or Phar::BZ2
+===DONE===
diff --git a/ext/phar/tests/phar_oo_compressed_001.phpt b/ext/phar/tests/phar_oo_compressed_001.phpt
new file mode 100644
index 0000000..af02012
--- /dev/null
+++ b/ext/phar/tests/phar_oo_compressed_001.phpt
@@ -0,0 +1,68 @@
+--TEST--
+Phar: PharFileInfo::compress(Phar::GZ)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not present"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = '<?php __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+
+$phar['a'] = 'new a';
+$phar['a']->decompress();
+$phar['b'] = 'new b';
+$phar['b']->compress(Phar::GZ);
+$phar['d'] = 'new d';
+
+$phar = new Phar($fname);
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+var_dump(file_get_contents($pname . '/d'));
+var_dump($phar['d']->isCompressed());
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+?>
+--EXPECTF--
+string(1) "a"
+bool(false)
+string(1) "b"
+bool(false)
+string(1) "c"
+bool(false)
+string(5) "new a"
+bool(false)
+string(5) "new b"
+bool(true)
+string(1) "c"
+bool(false)
+string(5) "new d"
+bool(false)
+===DONE===
diff --git a/ext/phar/tests/phar_oo_compressed_001b.phpt b/ext/phar/tests/phar_oo_compressed_001b.phpt
new file mode 100644
index 0000000..6d4c732
--- /dev/null
+++ b/ext/phar/tests/phar_oo_compressed_001b.phpt
@@ -0,0 +1,68 @@
+--TEST--
+Phar: PharFileInfo::compress(Phar::BZ2)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("bz2")) die("skip bz2 not present"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = '<?php __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+
+$phar['a'] = 'new a';
+$phar['a']->decompress();
+$phar['b'] = 'new b';
+$phar['b']->compress(Phar::BZ2);
+$phar['d'] = 'new d';
+
+$phar = new Phar($fname);
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+var_dump(file_get_contents($pname . '/d'));
+var_dump($phar['d']->isCompressed());
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+?>
+--EXPECTF--
+string(1) "a"
+bool(false)
+string(1) "b"
+bool(false)
+string(1) "c"
+bool(false)
+string(5) "new a"
+bool(false)
+string(5) "new b"
+bool(true)
+string(1) "c"
+bool(false)
+string(5) "new d"
+bool(false)
+===DONE===
diff --git a/ext/phar/tests/phar_oo_compressed_002.phpt b/ext/phar/tests/phar_oo_compressed_002.phpt
new file mode 100644
index 0000000..d4ec5cb
--- /dev/null
+++ b/ext/phar/tests/phar_oo_compressed_002.phpt
@@ -0,0 +1,73 @@
+--TEST--
+Phar: context/compress=GZ
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not present"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = '<?php __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+
+$context = stream_context_create(array('phar'=>array('compress'=>Phar::GZ)));
+
+file_put_contents($pname . '/b', b'new b');
+file_put_contents($pname . '/c', b'new c', 0, $context);
+file_put_contents($pname . '/d', b'new d');
+file_put_contents($pname . '/e', b'new e', 0, $context);
+
+$phar = new Phar($fname);
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+var_dump(file_get_contents($pname . '/d'));
+var_dump($phar['d']->isCompressed());
+var_dump(file_get_contents($pname . '/e'));
+var_dump($phar['e']->isCompressed());
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+?>
+--EXPECTF--
+string(1) "a"
+bool(false)
+string(1) "b"
+bool(false)
+string(1) "c"
+bool(false)
+string(1) "a"
+bool(false)
+string(5) "new b"
+bool(false)
+string(5) "new c"
+bool(true)
+string(5) "new d"
+bool(false)
+string(5) "new e"
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/phar_oo_compressed_002b.phpt b/ext/phar/tests/phar_oo_compressed_002b.phpt
new file mode 100644
index 0000000..d7213fd
--- /dev/null
+++ b/ext/phar/tests/phar_oo_compressed_002b.phpt
@@ -0,0 +1,73 @@
+--TEST--
+Phar: context/compress=BZip2
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("bz2")) die("skip bz2 not present"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = '<?php __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+
+$context = stream_context_create(array('phar'=>array('compress'=>Phar::BZ2)));
+
+file_put_contents($pname . '/b', b'new b');
+file_put_contents($pname . '/c', b'new c', 0, $context);
+file_put_contents($pname . '/d', b'new d');
+file_put_contents($pname . '/e', b'new e', 0, $context);
+
+$phar = new Phar($fname);
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+var_dump(file_get_contents($pname . '/d'));
+var_dump($phar['d']->isCompressed());
+var_dump(file_get_contents($pname . '/e'));
+var_dump($phar['e']->isCompressed());
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+?>
+--EXPECTF--
+string(1) "a"
+bool(false)
+string(1) "b"
+bool(false)
+string(1) "c"
+bool(false)
+string(1) "a"
+bool(false)
+string(5) "new b"
+bool(false)
+string(5) "new c"
+bool(true)
+string(5) "new d"
+bool(false)
+string(5) "new e"
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/phar_oo_getcontents.phpt b/ext/phar/tests/phar_oo_getcontents.phpt
new file mode 100644
index 0000000..e42bca4
--- /dev/null
+++ b/ext/phar/tests/phar_oo_getcontents.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Phar object: getContent()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+
+$phar = new Phar($fname);
+$phar['a/b'] = 'file contents
+this works';
+$phar->addEmptyDir('hi');
+echo $phar['a/b']->getContent() . "\n";
+try {
+echo $phar['a']->getContent(), "\n";
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+try {
+echo $phar['hi']->getContent(), "\n";
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+__halt_compiler();
+?>
+--EXPECTF--
+file contents
+this works
+Phar error: Cannot retrieve contents, "a" in phar "%sphar_oo_getcontents.phar.php" is a directory
+Phar error: Cannot retrieve contents, "hi" in phar "%sphar_oo_getcontents.phar.php" is a directory
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_oo_getcontentsgz.phpt b/ext/phar/tests/phar_oo_getcontentsgz.phpt
new file mode 100644
index 0000000..a480a69
--- /dev/null
+++ b/ext/phar/tests/phar_oo_getcontentsgz.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Phar object: getContent() (verify it works with compression)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php';
+
+$phar = new Phar($fname);
+$phar['a'] = 'file contents
+this works';
+$phar['a']->compress(Phar::GZ);
+copy($fname, $fname2);
+$phar2 = new Phar($fname2);
+var_dump($phar2['a']->isCompressed());
+echo $phar2['a']->getContent() . "\n";
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php');
+__halt_compiler();
+?>
+--EXPECT--
+bool(true)
+file contents
+this works
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_oo_getmodified.phpt b/ext/phar/tests/phar_oo_getmodified.phpt
new file mode 100644
index 0000000..d531393
--- /dev/null
+++ b/ext/phar/tests/phar_oo_getmodified.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Phar::getModified()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not present"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = '<?php __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+var_dump($phar->getModified());
+$phar->compressFiles(Phar::GZ);
+var_dump($phar->getModified());
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+?>
+--EXPECTF--
+bool(false)
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/phar_oo_iswriteable.phpt b/ext/phar/tests/phar_oo_iswriteable.phpt
new file mode 100644
index 0000000..9fbca2c
--- /dev/null
+++ b/ext/phar/tests/phar_oo_iswriteable.phpt
@@ -0,0 +1,84 @@
+--TEST--
+Phar::isWriteable
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar';
+$pname = 'phar://hio';
+$file = '<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; include "'.$pname.'/b.php"; ?>';
+$files['dir/'] = '';
+$hasdir = 1;
+include 'files/phar_test.inc';
+$a = new Phar($fname);
+$b = new PharData($fname2);
+$b['test'] = 'hi';
+
+var_dump($a['a.php']->isWritable());
+var_dump($a['a.php']->isReadable());
+$a['a.php']->chmod(000);
+var_dump($a['a.php']->isWritable());
+var_dump($a['a.php']->isReadable());
+$a['a.php']->chmod(0666);
+var_dump($a['a.php']->isWritable());
+var_dump($a['a.php']->isReadable());
+ini_set('phar.readonly',1);
+clearstatcache();
+var_dump($a['a.php']->isWritable());
+var_dump($a['a.php']->isReadable());
+ini_set('phar.readonly',0);
+clearstatcache();
+var_dump($a['a.php']->isWritable());
+var_dump($a['a.php']->isReadable());
+?>
+archive
+<?php
+ini_set('phar.readonly',0);
+$p = new Phar('doesnotexisthere.phar');
+var_dump($p->isWritable());
+clearstatcache();
+var_dump($a->isWritable());
+var_dump($b->isWritable());
+ini_set('phar.readonly',1);
+clearstatcache();
+var_dump($a->isWritable());
+var_dump($b->isWritable());
+chmod($fname2, 000);
+clearstatcache();
+var_dump($a->isWritable());
+var_dump($b->isWritable());
+chmod($fname2, 0666);
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar');
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(false)
+bool(false)
+bool(true)
+bool(true)
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+archive
+bool(true)
+bool(true)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+===DONE===
diff --git a/ext/phar/tests/phar_oo_nosig.phpt b/ext/phar/tests/phar_oo_nosig.phpt
new file mode 100644
index 0000000..d99222e
--- /dev/null
+++ b/ext/phar/tests/phar_oo_nosig.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Phar::getSignature() no signature
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+
+require_once 'files/phar_oo_test.inc';
+
+$phar = new Phar($fname);
+var_dump($phar->getSignature());
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
+__halt_compiler();
+?>
+--EXPECT--
+bool(false)
+===DONE===
diff --git a/ext/phar/tests/phar_oo_uncompressall.phpt b/ext/phar/tests/phar_oo_uncompressall.phpt
new file mode 100644
index 0000000..19cf953
--- /dev/null
+++ b/ext/phar/tests/phar_oo_uncompressall.phpt
@@ -0,0 +1,80 @@
+--TEST--
+Phar::decompressFiles()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not present"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = '<?php __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+
+$phar = new Phar($fname);
+$phar->compressFiles(Phar::GZ);
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed(Phar::GZ));
+var_dump($phar['a']->isCompressed(Phar::BZ2));
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed(Phar::GZ));
+var_dump($phar['b']->isCompressed(Phar::BZ2));
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed(Phar::GZ));
+var_dump($phar['b']->isCompressed(Phar::BZ2));
+
+$phar->decompressFiles();
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['a']->isCompressed());
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+?>
+--EXPECTF--
+string(1) "a"
+bool(false)
+string(1) "b"
+bool(false)
+string(1) "c"
+bool(false)
+string(1) "a"
+bool(true)
+bool(false)
+string(1) "b"
+bool(true)
+bool(false)
+string(1) "c"
+bool(true)
+bool(false)
+string(1) "a"
+bool(false)
+string(1) "b"
+bool(false)
+string(1) "c"
+bool(false)
+===DONE===
diff --git a/ext/phar/tests/phar_running.phpt b/ext/phar/tests/phar_running.phpt
new file mode 100644
index 0000000..2d132b9
--- /dev/null
+++ b/ext/phar/tests/phar_running.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Phar: Phar::running()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar['index.php'] = '<?php
+Phar::running(array());
+var_dump(Phar::running());
+var_dump(Phar::running(false));
+?>';
+include $pname . '/index.php';
+var_dump(Phar::running());
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+Warning: Phar::running() expects parameter 1 to be boolean, array given in phar://%sphar_running.phar.php/index.php on line 2
+string(%d) "phar://%sphar_running.phar.php"
+string(%d) "%sphar_running.phar.php"
+string(0) ""
+===DONE===
diff --git a/ext/phar/tests/phar_setalias.phpt b/ext/phar/tests/phar_setalias.phpt
new file mode 100644
index 0000000..ef9fa28
--- /dev/null
+++ b/ext/phar/tests/phar_setalias.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Phar::setAlias()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+echo $phar->getAlias() . "\n";
+$phar->setAlias('test');
+echo $phar->getAlias() . "\n";
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php');
+__HALT_COMPILER();
+?>
+--EXPECT--
+hio
+test
+===DONE===
diff --git a/ext/phar/tests/phar_setalias2.phpt b/ext/phar/tests/phar_setalias2.phpt
new file mode 100644
index 0000000..901e4d2
--- /dev/null
+++ b/ext/phar/tests/phar_setalias2.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Phar::setAlias() error
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+echo $phar->getAlias() . "\n";
+$phar->setAlias('test');
+echo $phar->getAlias() . "\n";
+$b = $phar;
+$phar = new Phar(dirname(__FILE__) . '/notphar.phar');
+try {
+ $phar->setAlias('test');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ $b = new Phar(dirname(__FILE__) . '/nope.phar', 0, 'test');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php');
+unlink(dirname(__FILE__) . '/notphar.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+hio
+test
+alias "test" is already used for archive "%sphar_setalias2.phar.php" and cannot be used for other archives
+alias "test" is already used for archive "%sphar_setalias2.phar.php" cannot be overloaded with "%snope.phar"
+===DONE===
diff --git a/ext/phar/tests/phar_setdefaultstub.phpt b/ext/phar/tests/phar_setdefaultstub.phpt
new file mode 100644
index 0000000..434e647
--- /dev/null
+++ b/ext/phar/tests/phar_setdefaultstub.phpt
@@ -0,0 +1,944 @@
+--TEST--
+Phar: Phar::setDefaultStub() with and without arg
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<php echo "this is a\n"; ?>';
+$phar['b.php'] = '<php echo "this is b\n"; ?>';
+$phar->setDefaultStub();
+$phar->stopBuffering();
+
+var_dump($phar->getStub());
+
+echo "============================================================================\n";
+echo "============================================================================\n";
+
+$phar->setDefaultStub('my/custom/thingy.php');
+$phar->stopBuffering();
+var_dump($phar->getStub());
+
+echo "============================================================================\n";
+echo "============================================================================\n";
+
+$phar->setDefaultStub('my/custom/thingy.php', 'the/web.php');
+$phar->stopBuffering();
+var_dump($phar->getStub());
+
+echo "============================================================================\n";
+echo "============================================================================\n";
+
+try {
+ $phar->setDefaultStub(str_repeat('a', 400));
+ $phar->stopBuffering();
+ var_dump(strlen($phar->getStub()));
+
+ $phar->setDefaultStub(str_repeat('a', 401));
+ $phar->stopBuffering();
+ var_dump(strlen($phar->getStub()));
+
+} catch(Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+?>
+--EXPECT--
+string(6685) "<?php
+
+$web = 'index.php';
+
+if (in_array('phar', stream_get_wrappers()) && class_exists('Phar', 0)) {
+Phar::interceptFileFuncs();
+set_include_path('phar://' . __FILE__ . PATH_SEPARATOR . get_include_path());
+Phar::webPhar(null, $web);
+include 'phar://' . __FILE__ . '/' . Extract_Phar::START;
+return;
+}
+
+if (@(isset($_SERVER['REQUEST_URI']) && isset($_SERVER['REQUEST_METHOD']) && ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'POST'))) {
+Extract_Phar::go(true);
+$mimes = array(
+'phps' => 2,
+'c' => 'text/plain',
+'cc' => 'text/plain',
+'cpp' => 'text/plain',
+'c++' => 'text/plain',
+'dtd' => 'text/plain',
+'h' => 'text/plain',
+'log' => 'text/plain',
+'rng' => 'text/plain',
+'txt' => 'text/plain',
+'xsd' => 'text/plain',
+'php' => 1,
+'inc' => 1,
+'avi' => 'video/avi',
+'bmp' => 'image/bmp',
+'css' => 'text/css',
+'gif' => 'image/gif',
+'htm' => 'text/html',
+'html' => 'text/html',
+'htmls' => 'text/html',
+'ico' => 'image/x-ico',
+'jpe' => 'image/jpeg',
+'jpg' => 'image/jpeg',
+'jpeg' => 'image/jpeg',
+'js' => 'application/x-javascript',
+'midi' => 'audio/midi',
+'mid' => 'audio/midi',
+'mod' => 'audio/mod',
+'mov' => 'movie/quicktime',
+'mp3' => 'audio/mp3',
+'mpg' => 'video/mpeg',
+'mpeg' => 'video/mpeg',
+'pdf' => 'application/pdf',
+'png' => 'image/png',
+'swf' => 'application/shockwave-flash',
+'tif' => 'image/tiff',
+'tiff' => 'image/tiff',
+'wav' => 'audio/wav',
+'xbm' => 'image/xbm',
+'xml' => 'text/xml',
+);
+
+header("Cache-Control: no-cache, must-revalidate");
+header("Pragma: no-cache");
+
+$basename = basename(__FILE__);
+if (!strpos($_SERVER['REQUEST_URI'], $basename)) {
+chdir(Extract_Phar::$temp);
+include $web;
+return;
+}
+$pt = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $basename) + strlen($basename));
+if (!$pt || $pt == '/') {
+$pt = $web;
+header('HTTP/1.1 301 Moved Permanently');
+header('Location: ' . $_SERVER['REQUEST_URI'] . '/' . $pt);
+exit;
+}
+$a = realpath(Extract_Phar::$temp . DIRECTORY_SEPARATOR . $pt);
+if (!$a || strlen(dirname($a)) < strlen(Extract_Phar::$temp)) {
+header('HTTP/1.0 404 Not Found');
+echo "<html>\n <head>\n <title>File Not Found<title>\n </head>\n <body>\n <h1>404 - File ", $pt, " Not Found</h1>\n </body>\n</html>";
+exit;
+}
+$b = pathinfo($a);
+if (!isset($b['extension'])) {
+header('Content-Type: text/plain');
+header('Content-Length: ' . filesize($a));
+readfile($a);
+exit;
+}
+if (isset($mimes[$b['extension']])) {
+if ($mimes[$b['extension']] === 1) {
+include $a;
+exit;
+}
+if ($mimes[$b['extension']] === 2) {
+highlight_file($a);
+exit;
+}
+header('Content-Type: ' .$mimes[$b['extension']]);
+header('Content-Length: ' . filesize($a));
+readfile($a);
+exit;
+}
+}
+
+class Extract_Phar
+{
+static $temp;
+static $origdir;
+const GZ = 0x1000;
+const BZ2 = 0x2000;
+const MASK = 0x3000;
+const START = 'index.php';
+const LEN = 6685;
+
+static function go($return = false)
+{
+$fp = fopen(__FILE__, 'rb');
+fseek($fp, self::LEN);
+$L = unpack('V', $a = (binary)fread($fp, 4));
+$m = (binary)'';
+
+do {
+$read = 8192;
+if ($L[1] - strlen($m) < 8192) {
+$read = $L[1] - strlen($m);
+}
+$last = (binary)fread($fp, $read);
+$m .= $last;
+} while (strlen($last) && strlen($m) < $L[1]);
+
+if (strlen($m) < $L[1]) {
+die('ERROR: manifest length read was "' .
+strlen($m) .'" should be "' .
+$L[1] . '"');
+}
+
+$info = self::_unpack($m);
+$f = $info['c'];
+
+if ($f & self::GZ) {
+if (!function_exists('gzinflate')) {
+die('Error: zlib extension is not enabled -' .
+' gzinflate() function needed for zlib-compressed .phars');
+}
+}
+
+if ($f & self::BZ2) {
+if (!function_exists('bzdecompress')) {
+die('Error: bzip2 extension is not enabled -' .
+' bzdecompress() function needed for bz2-compressed .phars');
+}
+}
+
+$temp = self::tmpdir();
+
+if (!$temp || !is_writable($temp)) {
+$sessionpath = session_save_path();
+if (strpos ($sessionpath, ";") !== false)
+$sessionpath = substr ($sessionpath, strpos ($sessionpath, ";")+1);
+if (!file_exists($sessionpath) || !is_dir($sessionpath)) {
+die('Could not locate temporary directory to extract phar');
+}
+$temp = $sessionpath;
+}
+
+$temp .= '/pharextract/'.basename(__FILE__, '.phar');
+self::$temp = $temp;
+self::$origdir = getcwd();
+@mkdir($temp, 0777, true);
+$temp = realpath($temp);
+
+if (!file_exists($temp . DIRECTORY_SEPARATOR . md5_file(__FILE__))) {
+self::_removeTmpFiles($temp, getcwd());
+@mkdir($temp, 0777, true);
+@file_put_contents($temp . '/' . md5_file(__FILE__), '');
+
+foreach ($info['m'] as $path => $file) {
+$a = !file_exists(dirname($temp . '/' . $path));
+@mkdir(dirname($temp . '/' . $path), 0777, true);
+clearstatcache();
+
+if ($path[strlen($path) - 1] == '/') {
+@mkdir($temp . '/' . $path, 0777);
+} else {
+file_put_contents($temp . '/' . $path, self::extractFile($path, $file, $fp));
+@chmod($temp . '/' . $path, 0666);
+}
+}
+}
+
+chdir($temp);
+
+if (!$return) {
+include self::START;
+}
+}
+
+static function tmpdir()
+{
+if (strpos(PHP_OS, 'WIN') !== false) {
+if ($var = getenv('TMP') ? getenv('TMP') : getenv('TEMP')) {
+return $var;
+}
+if (is_dir('/temp') || mkdir('/temp')) {
+return realpath('/temp');
+}
+return false;
+}
+if ($var = getenv('TMPDIR')) {
+return $var;
+}
+return realpath('/tmp');
+}
+
+static function _unpack($m)
+{
+$info = unpack('V', substr($m, 0, 4));
+ $l = unpack('V', substr($m, 10, 4));
+$m = substr($m, 14 + $l[1]);
+$s = unpack('V', substr($m, 0, 4));
+$o = 0;
+$start = 4 + $s[1];
+$ret['c'] = 0;
+
+for ($i = 0; $i < $info[1]; $i++) {
+ $len = unpack('V', substr($m, $start, 4));
+$start += 4;
+ $savepath = substr($m, $start, $len[1]);
+$start += $len[1];
+ $ret['m'][$savepath] = array_values(unpack('Va/Vb/Vc/Vd/Ve/Vf', substr($m, $start, 24)));
+$ret['m'][$savepath][3] = sprintf('%u', $ret['m'][$savepath][3]
+& 0xffffffff);
+$ret['m'][$savepath][7] = $o;
+$o += $ret['m'][$savepath][2];
+$start += 24 + $ret['m'][$savepath][5];
+$ret['c'] |= $ret['m'][$savepath][4] & self::MASK;
+}
+return $ret;
+}
+
+static function extractFile($path, $entry, $fp)
+{
+$data = '';
+$c = $entry[2];
+
+while ($c) {
+if ($c < 8192) {
+$data .= @fread($fp, $c);
+$c = 0;
+} else {
+$c -= 8192;
+$data .= @fread($fp, 8192);
+}
+}
+
+if ($entry[4] & self::GZ) {
+$data = gzinflate($data);
+} elseif ($entry[4] & self::BZ2) {
+$data = bzdecompress($data);
+}
+
+if (strlen($data) != $entry[0]) {
+die("Invalid internal .phar file (size error " . strlen($data) . " != " .
+$stat[7] . ")");
+}
+
+if ($entry[3] != sprintf("%u", crc32((binary)$data) & 0xffffffff)) {
+die("Invalid internal .phar file (checksum error)");
+}
+
+return $data;
+}
+
+static function _removeTmpFiles($temp, $origdir)
+{
+chdir($temp);
+
+foreach (glob('*') as $f) {
+if (file_exists($f)) {
+is_dir($f) ? @rmdir($f) : @unlink($f);
+if (file_exists($f) && is_dir($f)) {
+self::_removeTmpFiles($f, getcwd());
+}
+}
+}
+
+@rmdir($temp);
+clearstatcache();
+chdir($origdir);
+}
+}
+
+Extract_Phar::go();
+__HALT_COMPILER(); ?>
+"
+============================================================================
+============================================================================
+string(6696) "<?php
+
+$web = 'index.php';
+
+if (in_array('phar', stream_get_wrappers()) && class_exists('Phar', 0)) {
+Phar::interceptFileFuncs();
+set_include_path('phar://' . __FILE__ . PATH_SEPARATOR . get_include_path());
+Phar::webPhar(null, $web);
+include 'phar://' . __FILE__ . '/' . Extract_Phar::START;
+return;
+}
+
+if (@(isset($_SERVER['REQUEST_URI']) && isset($_SERVER['REQUEST_METHOD']) && ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'POST'))) {
+Extract_Phar::go(true);
+$mimes = array(
+'phps' => 2,
+'c' => 'text/plain',
+'cc' => 'text/plain',
+'cpp' => 'text/plain',
+'c++' => 'text/plain',
+'dtd' => 'text/plain',
+'h' => 'text/plain',
+'log' => 'text/plain',
+'rng' => 'text/plain',
+'txt' => 'text/plain',
+'xsd' => 'text/plain',
+'php' => 1,
+'inc' => 1,
+'avi' => 'video/avi',
+'bmp' => 'image/bmp',
+'css' => 'text/css',
+'gif' => 'image/gif',
+'htm' => 'text/html',
+'html' => 'text/html',
+'htmls' => 'text/html',
+'ico' => 'image/x-ico',
+'jpe' => 'image/jpeg',
+'jpg' => 'image/jpeg',
+'jpeg' => 'image/jpeg',
+'js' => 'application/x-javascript',
+'midi' => 'audio/midi',
+'mid' => 'audio/midi',
+'mod' => 'audio/mod',
+'mov' => 'movie/quicktime',
+'mp3' => 'audio/mp3',
+'mpg' => 'video/mpeg',
+'mpeg' => 'video/mpeg',
+'pdf' => 'application/pdf',
+'png' => 'image/png',
+'swf' => 'application/shockwave-flash',
+'tif' => 'image/tiff',
+'tiff' => 'image/tiff',
+'wav' => 'audio/wav',
+'xbm' => 'image/xbm',
+'xml' => 'text/xml',
+);
+
+header("Cache-Control: no-cache, must-revalidate");
+header("Pragma: no-cache");
+
+$basename = basename(__FILE__);
+if (!strpos($_SERVER['REQUEST_URI'], $basename)) {
+chdir(Extract_Phar::$temp);
+include $web;
+return;
+}
+$pt = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $basename) + strlen($basename));
+if (!$pt || $pt == '/') {
+$pt = $web;
+header('HTTP/1.1 301 Moved Permanently');
+header('Location: ' . $_SERVER['REQUEST_URI'] . '/' . $pt);
+exit;
+}
+$a = realpath(Extract_Phar::$temp . DIRECTORY_SEPARATOR . $pt);
+if (!$a || strlen(dirname($a)) < strlen(Extract_Phar::$temp)) {
+header('HTTP/1.0 404 Not Found');
+echo "<html>\n <head>\n <title>File Not Found<title>\n </head>\n <body>\n <h1>404 - File ", $pt, " Not Found</h1>\n </body>\n</html>";
+exit;
+}
+$b = pathinfo($a);
+if (!isset($b['extension'])) {
+header('Content-Type: text/plain');
+header('Content-Length: ' . filesize($a));
+readfile($a);
+exit;
+}
+if (isset($mimes[$b['extension']])) {
+if ($mimes[$b['extension']] === 1) {
+include $a;
+exit;
+}
+if ($mimes[$b['extension']] === 2) {
+highlight_file($a);
+exit;
+}
+header('Content-Type: ' .$mimes[$b['extension']]);
+header('Content-Length: ' . filesize($a));
+readfile($a);
+exit;
+}
+}
+
+class Extract_Phar
+{
+static $temp;
+static $origdir;
+const GZ = 0x1000;
+const BZ2 = 0x2000;
+const MASK = 0x3000;
+const START = 'my/custom/thingy.php';
+const LEN = 6696;
+
+static function go($return = false)
+{
+$fp = fopen(__FILE__, 'rb');
+fseek($fp, self::LEN);
+$L = unpack('V', $a = (binary)fread($fp, 4));
+$m = (binary)'';
+
+do {
+$read = 8192;
+if ($L[1] - strlen($m) < 8192) {
+$read = $L[1] - strlen($m);
+}
+$last = (binary)fread($fp, $read);
+$m .= $last;
+} while (strlen($last) && strlen($m) < $L[1]);
+
+if (strlen($m) < $L[1]) {
+die('ERROR: manifest length read was "' .
+strlen($m) .'" should be "' .
+$L[1] . '"');
+}
+
+$info = self::_unpack($m);
+$f = $info['c'];
+
+if ($f & self::GZ) {
+if (!function_exists('gzinflate')) {
+die('Error: zlib extension is not enabled -' .
+' gzinflate() function needed for zlib-compressed .phars');
+}
+}
+
+if ($f & self::BZ2) {
+if (!function_exists('bzdecompress')) {
+die('Error: bzip2 extension is not enabled -' .
+' bzdecompress() function needed for bz2-compressed .phars');
+}
+}
+
+$temp = self::tmpdir();
+
+if (!$temp || !is_writable($temp)) {
+$sessionpath = session_save_path();
+if (strpos ($sessionpath, ";") !== false)
+$sessionpath = substr ($sessionpath, strpos ($sessionpath, ";")+1);
+if (!file_exists($sessionpath) || !is_dir($sessionpath)) {
+die('Could not locate temporary directory to extract phar');
+}
+$temp = $sessionpath;
+}
+
+$temp .= '/pharextract/'.basename(__FILE__, '.phar');
+self::$temp = $temp;
+self::$origdir = getcwd();
+@mkdir($temp, 0777, true);
+$temp = realpath($temp);
+
+if (!file_exists($temp . DIRECTORY_SEPARATOR . md5_file(__FILE__))) {
+self::_removeTmpFiles($temp, getcwd());
+@mkdir($temp, 0777, true);
+@file_put_contents($temp . '/' . md5_file(__FILE__), '');
+
+foreach ($info['m'] as $path => $file) {
+$a = !file_exists(dirname($temp . '/' . $path));
+@mkdir(dirname($temp . '/' . $path), 0777, true);
+clearstatcache();
+
+if ($path[strlen($path) - 1] == '/') {
+@mkdir($temp . '/' . $path, 0777);
+} else {
+file_put_contents($temp . '/' . $path, self::extractFile($path, $file, $fp));
+@chmod($temp . '/' . $path, 0666);
+}
+}
+}
+
+chdir($temp);
+
+if (!$return) {
+include self::START;
+}
+}
+
+static function tmpdir()
+{
+if (strpos(PHP_OS, 'WIN') !== false) {
+if ($var = getenv('TMP') ? getenv('TMP') : getenv('TEMP')) {
+return $var;
+}
+if (is_dir('/temp') || mkdir('/temp')) {
+return realpath('/temp');
+}
+return false;
+}
+if ($var = getenv('TMPDIR')) {
+return $var;
+}
+return realpath('/tmp');
+}
+
+static function _unpack($m)
+{
+$info = unpack('V', substr($m, 0, 4));
+ $l = unpack('V', substr($m, 10, 4));
+$m = substr($m, 14 + $l[1]);
+$s = unpack('V', substr($m, 0, 4));
+$o = 0;
+$start = 4 + $s[1];
+$ret['c'] = 0;
+
+for ($i = 0; $i < $info[1]; $i++) {
+ $len = unpack('V', substr($m, $start, 4));
+$start += 4;
+ $savepath = substr($m, $start, $len[1]);
+$start += $len[1];
+ $ret['m'][$savepath] = array_values(unpack('Va/Vb/Vc/Vd/Ve/Vf', substr($m, $start, 24)));
+$ret['m'][$savepath][3] = sprintf('%u', $ret['m'][$savepath][3]
+& 0xffffffff);
+$ret['m'][$savepath][7] = $o;
+$o += $ret['m'][$savepath][2];
+$start += 24 + $ret['m'][$savepath][5];
+$ret['c'] |= $ret['m'][$savepath][4] & self::MASK;
+}
+return $ret;
+}
+
+static function extractFile($path, $entry, $fp)
+{
+$data = '';
+$c = $entry[2];
+
+while ($c) {
+if ($c < 8192) {
+$data .= @fread($fp, $c);
+$c = 0;
+} else {
+$c -= 8192;
+$data .= @fread($fp, 8192);
+}
+}
+
+if ($entry[4] & self::GZ) {
+$data = gzinflate($data);
+} elseif ($entry[4] & self::BZ2) {
+$data = bzdecompress($data);
+}
+
+if (strlen($data) != $entry[0]) {
+die("Invalid internal .phar file (size error " . strlen($data) . " != " .
+$stat[7] . ")");
+}
+
+if ($entry[3] != sprintf("%u", crc32((binary)$data) & 0xffffffff)) {
+die("Invalid internal .phar file (checksum error)");
+}
+
+return $data;
+}
+
+static function _removeTmpFiles($temp, $origdir)
+{
+chdir($temp);
+
+foreach (glob('*') as $f) {
+if (file_exists($f)) {
+is_dir($f) ? @rmdir($f) : @unlink($f);
+if (file_exists($f) && is_dir($f)) {
+self::_removeTmpFiles($f, getcwd());
+}
+}
+}
+
+@rmdir($temp);
+clearstatcache();
+chdir($origdir);
+}
+}
+
+Extract_Phar::go();
+__HALT_COMPILER(); ?>
+"
+============================================================================
+============================================================================
+string(6698) "<?php
+
+$web = 'the/web.php';
+
+if (in_array('phar', stream_get_wrappers()) && class_exists('Phar', 0)) {
+Phar::interceptFileFuncs();
+set_include_path('phar://' . __FILE__ . PATH_SEPARATOR . get_include_path());
+Phar::webPhar(null, $web);
+include 'phar://' . __FILE__ . '/' . Extract_Phar::START;
+return;
+}
+
+if (@(isset($_SERVER['REQUEST_URI']) && isset($_SERVER['REQUEST_METHOD']) && ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'POST'))) {
+Extract_Phar::go(true);
+$mimes = array(
+'phps' => 2,
+'c' => 'text/plain',
+'cc' => 'text/plain',
+'cpp' => 'text/plain',
+'c++' => 'text/plain',
+'dtd' => 'text/plain',
+'h' => 'text/plain',
+'log' => 'text/plain',
+'rng' => 'text/plain',
+'txt' => 'text/plain',
+'xsd' => 'text/plain',
+'php' => 1,
+'inc' => 1,
+'avi' => 'video/avi',
+'bmp' => 'image/bmp',
+'css' => 'text/css',
+'gif' => 'image/gif',
+'htm' => 'text/html',
+'html' => 'text/html',
+'htmls' => 'text/html',
+'ico' => 'image/x-ico',
+'jpe' => 'image/jpeg',
+'jpg' => 'image/jpeg',
+'jpeg' => 'image/jpeg',
+'js' => 'application/x-javascript',
+'midi' => 'audio/midi',
+'mid' => 'audio/midi',
+'mod' => 'audio/mod',
+'mov' => 'movie/quicktime',
+'mp3' => 'audio/mp3',
+'mpg' => 'video/mpeg',
+'mpeg' => 'video/mpeg',
+'pdf' => 'application/pdf',
+'png' => 'image/png',
+'swf' => 'application/shockwave-flash',
+'tif' => 'image/tiff',
+'tiff' => 'image/tiff',
+'wav' => 'audio/wav',
+'xbm' => 'image/xbm',
+'xml' => 'text/xml',
+);
+
+header("Cache-Control: no-cache, must-revalidate");
+header("Pragma: no-cache");
+
+$basename = basename(__FILE__);
+if (!strpos($_SERVER['REQUEST_URI'], $basename)) {
+chdir(Extract_Phar::$temp);
+include $web;
+return;
+}
+$pt = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $basename) + strlen($basename));
+if (!$pt || $pt == '/') {
+$pt = $web;
+header('HTTP/1.1 301 Moved Permanently');
+header('Location: ' . $_SERVER['REQUEST_URI'] . '/' . $pt);
+exit;
+}
+$a = realpath(Extract_Phar::$temp . DIRECTORY_SEPARATOR . $pt);
+if (!$a || strlen(dirname($a)) < strlen(Extract_Phar::$temp)) {
+header('HTTP/1.0 404 Not Found');
+echo "<html>\n <head>\n <title>File Not Found<title>\n </head>\n <body>\n <h1>404 - File ", $pt, " Not Found</h1>\n </body>\n</html>";
+exit;
+}
+$b = pathinfo($a);
+if (!isset($b['extension'])) {
+header('Content-Type: text/plain');
+header('Content-Length: ' . filesize($a));
+readfile($a);
+exit;
+}
+if (isset($mimes[$b['extension']])) {
+if ($mimes[$b['extension']] === 1) {
+include $a;
+exit;
+}
+if ($mimes[$b['extension']] === 2) {
+highlight_file($a);
+exit;
+}
+header('Content-Type: ' .$mimes[$b['extension']]);
+header('Content-Length: ' . filesize($a));
+readfile($a);
+exit;
+}
+}
+
+class Extract_Phar
+{
+static $temp;
+static $origdir;
+const GZ = 0x1000;
+const BZ2 = 0x2000;
+const MASK = 0x3000;
+const START = 'my/custom/thingy.php';
+const LEN = 6698;
+
+static function go($return = false)
+{
+$fp = fopen(__FILE__, 'rb');
+fseek($fp, self::LEN);
+$L = unpack('V', $a = (binary)fread($fp, 4));
+$m = (binary)'';
+
+do {
+$read = 8192;
+if ($L[1] - strlen($m) < 8192) {
+$read = $L[1] - strlen($m);
+}
+$last = (binary)fread($fp, $read);
+$m .= $last;
+} while (strlen($last) && strlen($m) < $L[1]);
+
+if (strlen($m) < $L[1]) {
+die('ERROR: manifest length read was "' .
+strlen($m) .'" should be "' .
+$L[1] . '"');
+}
+
+$info = self::_unpack($m);
+$f = $info['c'];
+
+if ($f & self::GZ) {
+if (!function_exists('gzinflate')) {
+die('Error: zlib extension is not enabled -' .
+' gzinflate() function needed for zlib-compressed .phars');
+}
+}
+
+if ($f & self::BZ2) {
+if (!function_exists('bzdecompress')) {
+die('Error: bzip2 extension is not enabled -' .
+' bzdecompress() function needed for bz2-compressed .phars');
+}
+}
+
+$temp = self::tmpdir();
+
+if (!$temp || !is_writable($temp)) {
+$sessionpath = session_save_path();
+if (strpos ($sessionpath, ";") !== false)
+$sessionpath = substr ($sessionpath, strpos ($sessionpath, ";")+1);
+if (!file_exists($sessionpath) || !is_dir($sessionpath)) {
+die('Could not locate temporary directory to extract phar');
+}
+$temp = $sessionpath;
+}
+
+$temp .= '/pharextract/'.basename(__FILE__, '.phar');
+self::$temp = $temp;
+self::$origdir = getcwd();
+@mkdir($temp, 0777, true);
+$temp = realpath($temp);
+
+if (!file_exists($temp . DIRECTORY_SEPARATOR . md5_file(__FILE__))) {
+self::_removeTmpFiles($temp, getcwd());
+@mkdir($temp, 0777, true);
+@file_put_contents($temp . '/' . md5_file(__FILE__), '');
+
+foreach ($info['m'] as $path => $file) {
+$a = !file_exists(dirname($temp . '/' . $path));
+@mkdir(dirname($temp . '/' . $path), 0777, true);
+clearstatcache();
+
+if ($path[strlen($path) - 1] == '/') {
+@mkdir($temp . '/' . $path, 0777);
+} else {
+file_put_contents($temp . '/' . $path, self::extractFile($path, $file, $fp));
+@chmod($temp . '/' . $path, 0666);
+}
+}
+}
+
+chdir($temp);
+
+if (!$return) {
+include self::START;
+}
+}
+
+static function tmpdir()
+{
+if (strpos(PHP_OS, 'WIN') !== false) {
+if ($var = getenv('TMP') ? getenv('TMP') : getenv('TEMP')) {
+return $var;
+}
+if (is_dir('/temp') || mkdir('/temp')) {
+return realpath('/temp');
+}
+return false;
+}
+if ($var = getenv('TMPDIR')) {
+return $var;
+}
+return realpath('/tmp');
+}
+
+static function _unpack($m)
+{
+$info = unpack('V', substr($m, 0, 4));
+ $l = unpack('V', substr($m, 10, 4));
+$m = substr($m, 14 + $l[1]);
+$s = unpack('V', substr($m, 0, 4));
+$o = 0;
+$start = 4 + $s[1];
+$ret['c'] = 0;
+
+for ($i = 0; $i < $info[1]; $i++) {
+ $len = unpack('V', substr($m, $start, 4));
+$start += 4;
+ $savepath = substr($m, $start, $len[1]);
+$start += $len[1];
+ $ret['m'][$savepath] = array_values(unpack('Va/Vb/Vc/Vd/Ve/Vf', substr($m, $start, 24)));
+$ret['m'][$savepath][3] = sprintf('%u', $ret['m'][$savepath][3]
+& 0xffffffff);
+$ret['m'][$savepath][7] = $o;
+$o += $ret['m'][$savepath][2];
+$start += 24 + $ret['m'][$savepath][5];
+$ret['c'] |= $ret['m'][$savepath][4] & self::MASK;
+}
+return $ret;
+}
+
+static function extractFile($path, $entry, $fp)
+{
+$data = '';
+$c = $entry[2];
+
+while ($c) {
+if ($c < 8192) {
+$data .= @fread($fp, $c);
+$c = 0;
+} else {
+$c -= 8192;
+$data .= @fread($fp, 8192);
+}
+}
+
+if ($entry[4] & self::GZ) {
+$data = gzinflate($data);
+} elseif ($entry[4] & self::BZ2) {
+$data = bzdecompress($data);
+}
+
+if (strlen($data) != $entry[0]) {
+die("Invalid internal .phar file (size error " . strlen($data) . " != " .
+$stat[7] . ")");
+}
+
+if ($entry[3] != sprintf("%u", crc32((binary)$data) & 0xffffffff)) {
+die("Invalid internal .phar file (checksum error)");
+}
+
+return $data;
+}
+
+static function _removeTmpFiles($temp, $origdir)
+{
+chdir($temp);
+
+foreach (glob('*') as $f) {
+if (file_exists($f)) {
+is_dir($f) ? @rmdir($f) : @unlink($f);
+if (file_exists($f) && is_dir($f)) {
+self::_removeTmpFiles($f, getcwd());
+}
+}
+}
+
+@rmdir($temp);
+clearstatcache();
+chdir($origdir);
+}
+}
+
+Extract_Phar::go();
+__HALT_COMPILER(); ?>
+"
+============================================================================
+============================================================================
+int(7076)
+Illegal filename passed in for stub creation, was 401 characters long, and only 400 or less is allowed
+===DONE===
diff --git a/ext/phar/tests/phar_setsignaturealgo1.phpt b/ext/phar/tests/phar_setsignaturealgo1.phpt
new file mode 100644
index 0000000..eacee7b
--- /dev/null
+++ b/ext/phar/tests/phar_setsignaturealgo1.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Phar::setSignatureAlgorithm()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if ( extension_loaded("hash")) die("skip extension hash conflicts"); ?>
+<?php if (!defined("Phar::PGP")) die("skip PGP Signature algorithm not available"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$p = new Phar(dirname(__FILE__) . '/brandnewphar.phar', 0, 'brandnewphar.phar');
+$p['file1.txt'] = 'hi';
+var_dump($p->getSignature());
+$p->setSignatureAlgorithm(Phar::MD5);
+var_dump($p->getSignature());
+$p->setSignatureAlgorithm(Phar::SHA1);
+var_dump($p->getSignature());
+try {
+$p->setSignatureAlgorithm(Phar::SHA256);
+var_dump($p->getSignature());
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+try {
+$p->setSignatureAlgorithm(Phar::SHA512);
+var_dump($p->getSignature());
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+try {
+$p->setSignatureAlgorithm(Phar::PGP);
+var_dump($p->getSignature());
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/brandnewphar.phar');
+?>
+--EXPECTF--
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(5) "SHA-1"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(3) "MD5"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(5) "SHA-1"
+}
+string (82) "SHA-256 and SHA-512 signatures are only supported if the hash extension is enabled"
+string (82) "SHA-256 and SHA-512 signatures are only supported if the hash extension is enabled"
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(5) "SHA-1"
+}
+===DONE===
diff --git a/ext/phar/tests/phar_setsignaturealgo2.phpt b/ext/phar/tests/phar_setsignaturealgo2.phpt
new file mode 100644
index 0000000..9f548d0
--- /dev/null
+++ b/ext/phar/tests/phar_setsignaturealgo2.phpt
@@ -0,0 +1,90 @@
+--TEST--
+Phar::setSupportedSignatures() with hash
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("hash")) die("skip hash extension required");
+$arr = Phar::getSupportedSignatures();
+if (!in_array("OpenSSL", $arr)) die("skip openssl support required");
+if (!in_array('SHA-256', $arr)) die("skip hash extension loaded shared");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$p = new Phar($fname);
+$p['file1.txt'] = 'hi';
+var_dump($p->getSignature());
+$p->setSignatureAlgorithm(Phar::MD5);
+var_dump($p->getSignature());
+$p->setSignatureAlgorithm(Phar::SHA1);
+var_dump($p->getSignature());
+try {
+$p->setSignatureAlgorithm(Phar::SHA256);
+var_dump($p->getSignature());
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+try {
+$p->setSignatureAlgorithm(Phar::SHA512);
+var_dump($p->getSignature());
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+try {
+$config = dirname(__FILE__) . '/files/openssl.cnf';
+$config_arg = array('config' => $config);
+$private = openssl_get_privatekey(file_get_contents(dirname(__FILE__) . '/files/private.pem'));
+$pkey = '';
+openssl_pkey_export($private, $pkey, NULL, $config_arg);
+$p->setSignatureAlgorithm(Phar::OPENSSL, $pkey);
+var_dump($p->getSignature());
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+?>
+--EXPECTF--
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(5) "SHA-1"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(3) "MD5"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(5) "SHA-1"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(7) "SHA-256"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(7) "SHA-512"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(7) "OpenSSL"
+}
+===DONE===
diff --git a/ext/phar/tests/phar_stub.phpt b/ext/phar/tests/phar_stub.phpt
new file mode 100644
index 0000000..832dc40
--- /dev/null
+++ b/ext/phar/tests/phar_stub.phpt
@@ -0,0 +1,92 @@
+--TEST--
+Phar::setStub()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$file = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
+$fp = fopen($fname, 'rb');
+//// 1
+echo fread($fp, strlen($file)) . "\n";
+fclose($fp);
+$phar = new Phar($fname);
+$file = '<?php echo "second stub\n"; __HALT_COMPILER(); ?>';
+
+//// 2
+$phar->setStub($file);
+$fp = fopen($fname, 'rb');
+echo fread($fp, strlen($file)) . "\n";
+fclose($fp);
+
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phartmp.php';
+$file = b'<?php echo "third stub\n"; __HALT_COMPILER(); ?>';
+$fp = fopen($fname2, 'wb');
+fwrite($fp, $file);
+fclose($fp);
+$fp = fopen($fname2, 'rb');
+
+//// 3
+$phar->setStub($fp);
+fclose($fp);
+
+$fp = fopen($fname, 'rb');
+echo fread($fp, strlen($file)) . "\n";
+fclose($fp);
+
+$fp = fopen($fname2, 'ab');
+fwrite($fp, b'booya');
+fclose($fp);
+echo file_get_contents($fname2) . "\n";
+
+$fp = fopen($fname2, 'rb');
+
+//// 4
+$phar->setStub($fp, strlen($file));
+fclose($fp);
+
+$fp = fopen($fname, 'rb');
+echo fread($fp, strlen($file)) . "\n";
+if (fread($fp, strlen('booya')) == 'booya') {
+ echo 'failed - copied booya';
+}
+fclose($fp);
+$phar['testing'] = 'hi';
+
+// ensure stub is not overwritten
+$fp = fopen($fname, 'rb');
+echo fread($fp, strlen($file)) . "\n";
+if (fread($fp, strlen('booya')) == 'booya') {
+ echo 'failed - copied booya';
+}
+fclose($fp);
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php');
+__HALT_COMPILER();
+?>
+--EXPECT--
+<?php echo "first stub\n"; __HALT_COMPILER(); ?>
+<?php echo "second stub\n"; __HALT_COMPILER(); ?>
+<?php echo "third stub\n"; __HALT_COMPILER(); ?>
+<?php echo "third stub\n"; __HALT_COMPILER(); ?>booya
+<?php echo "third stub\n"; __HALT_COMPILER(); ?>
+<?php echo "third stub\n"; __HALT_COMPILER(); ?>
+===DONE===
diff --git a/ext/phar/tests/phar_stub_error.phpt b/ext/phar/tests/phar_stub_error.phpt
new file mode 100644
index 0000000..bb5d63b
--- /dev/null
+++ b/ext/phar/tests/phar_stub_error.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Phar::setStub()/getStub()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$stub = b'<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
+$file = $stub;
+
+$files = array();
+$files['a'] = 'a';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+var_dump($stub);
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+
+$newstub = '<?php echo "second stub\n"; _x_HALT_COMPILER(); ?>';
+try
+{
+ $phar->setStub($newstub);
+}
+catch(exception $e)
+{
+ echo 'Exception: ' . $e->getMessage() . "\n";
+}
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+$phar->stopBuffering();
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
+string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
+bool(true)
+Exception: illegal stub for phar "%sphar_stub_error.phar.php"
+string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
+bool(true)
+string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/phar_stub_write.phpt b/ext/phar/tests/phar_stub_write.phpt
new file mode 100644
index 0000000..ecdb3b9
--- /dev/null
+++ b/ext/phar/tests/phar_stub_write.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Phar::setStub()/getStub()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$stub = b'<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
+$file = $stub;
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+var_dump($stub);
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+
+$stub = '<?php echo "second stub\n"; __HALT_COMPILER(); ?>';
+$sexp = $stub . "\r\n";
+
+$phar->setStub($stub);
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+var_dump($phar->getStub() == $sexp);
+$phar->stopBuffering();
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+var_dump($phar->getStub() == $sexp);
+
+$phar = new Phar($fname);
+var_dump($phar->getStub() == $stub);
+var_dump($phar->getStub() == $sexp);
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+__HALT_COMPILER();
+?>
+--EXPECT--
+string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
+string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
+bool(true)
+string(51) "<?php echo "second stub\n"; __HALT_COMPILER(); ?>
+"
+bool(false)
+bool(true)
+string(51) "<?php echo "second stub\n"; __HALT_COMPILER(); ?>
+"
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/phar_stub_write_file.phpt b/ext/phar/tests/phar_stub_write_file.phpt
new file mode 100644
index 0000000..e4c8676
--- /dev/null
+++ b/ext/phar/tests/phar_stub_write_file.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Phar::setStub()/getStub() from file
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+allow_url_fopen=1
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$stub = b'<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
+$file = $stub;
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+var_dump($stub);
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+
+$stub = '<?php echo "second stub\n"; __HALT_COMPILER(); ?>';
+$sexp = $stub . "\r\n";
+$stub = fopen('data://,'.$stub, 'r');
+$phar->setStub($stub);
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+var_dump($phar->getStub() == $sexp);
+$phar->stopBuffering();
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+var_dump($phar->getStub() == $sexp);
+
+$phar = new Phar($fname);
+var_dump($phar->getStub() == $stub);
+var_dump($phar->getStub() == $sexp);
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+__HALT_COMPILER();
+?>
+--EXPECT--
+string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
+string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
+bool(true)
+string(51) "<?php echo "second stub\n"; __HALT_COMPILER(); ?>
+"
+bool(false)
+bool(true)
+string(51) "<?php echo "second stub\n"; __HALT_COMPILER(); ?>
+"
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/phar_unlinkarchive.phpt b/ext/phar/tests/phar_unlinkarchive.phpt
new file mode 100644
index 0000000..4800c52
--- /dev/null
+++ b/ext/phar/tests/phar_unlinkarchive.phpt
@@ -0,0 +1,108 @@
+--TEST--
+Phar::unlinkArchive()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+try {
+Phar::unlinkArchive("");
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$pdname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+
+try {
+Phar::unlinkArchive($fname);
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+file_put_contents($pdname, 'blahblah');
+try {
+Phar::unlinkArchive($pdname);
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+Phar::unlinkArchive(array());
+
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip';
+$stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
+$file = $stub;
+
+$files = array();
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+include 'files/phar_test.inc';
+
+$phar = new Phar($fname);
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+try {
+Phar::unlinkArchive($fname);
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+$phar = $phar->convertToExecutable(Phar::ZIP);
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+
+copy($fname2, $fname3);
+
+$phar = new Phar($fname3);
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+
+Phar::unlinkArchive($fname);
+var_dump(file_exists($fname));
+$phar = new Phar($fname);
+var_dump(count($phar));
+$phar['evil.php'] = '<?php
+try {
+Phar::unlinkArchive(Phar::running(false));
+} catch (Exception $e) {echo $e->getMessage(),"\n";}
+var_dump(Phar::running(false));
+include Phar::running(true) . "/another.php";
+?>';
+$phar['another.php'] = "hi\n";
+unset($phar);
+include $pname . '/evil.php';
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+Unknown phar archive ""
+Unknown phar archive "%sphar_unlinkarchive.phar"
+Unknown phar archive "%sphar_unlinkarchive.phar.tar": internal corruption of phar "%sphar_unlinkarchive.phar.tar" (truncated entry)
+
+Warning: Phar::unlinkArchive() expects parameter 1 to be %string, array given in %sphar_unlinkarchive.php on line %d
+bool(false)
+string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
+phar archive "%sphar_unlinkarchive.phar" has open file handles or objects. fclose() all file handles, and unset() all objects prior to calling unlinkArchive()
+bool(true)
+string(60) "<?php // zip-based phar archive stub file
+__HALT_COMPILER();"
+bool(true)
+string(60) "<?php // zip-based phar archive stub file
+__HALT_COMPILER();"
+bool(false)
+int(0)
+phar archive "%sphar_unlinkarchive.phar" cannot be unlinked from within itself
+string(%d) "%sphar_unlinkarchive.phar"
+hi
+===DONE===
diff --git a/ext/phar/tests/pharfileinfo_chmod.phpt b/ext/phar/tests/pharfileinfo_chmod.phpt
new file mode 100644
index 0000000..e99be5d
--- /dev/null
+++ b/ext/phar/tests/pharfileinfo_chmod.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Phar: PharFileInfo::chmod extra code coverage
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$pname = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+
+$phar['a/b'] = 'hi there';
+
+$b = $phar['a/b'];
+try {
+$phar['a']->chmod(066);
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+$b->chmod(array());
+lstat($pname . '/a/b'); // sets BG(CurrentLStatFile)
+$b->chmod(0666);
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?>
+--EXPECTF--
+Phar entry "a" is a temporary directory (not an actual entry in the archive), cannot chmod
+
+Warning: PharFileInfo::chmod() expects parameter 1 to be long, array given in %spharfileinfo_chmod.php on line %d
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/pharfileinfo_compression.phpt b/ext/phar/tests/pharfileinfo_compression.phpt
new file mode 100644
index 0000000..fbac499
--- /dev/null
+++ b/ext/phar/tests/pharfileinfo_compression.phpt
@@ -0,0 +1,94 @@
+--TEST--
+Phar: PharFileInfo compression-related methods
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip no zlib"); ?>
+<?php if (!extension_loaded("bz2")) die("skip no bz2"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$pname = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+
+$phar['a/b'] = 'hi there';
+
+$b = $phar['a/b'];
+
+$b->isCompressed(array());
+try {
+$b->isCompressed(25);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$b->compress(25);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+$tar = $phar->convertToData(Phar::TAR);
+
+$c = $tar['a/b'];
+try {
+$c->compress(Phar::GZ);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+try {
+$phar['a']->compress(Phar::GZ);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+ini_set('phar.readonly', 1);
+try {
+$b->compress(Phar::GZ);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+ini_set('phar.readonly', 0);
+var_dump($b->compress(Phar::GZ));
+var_dump($b->compress(Phar::GZ));
+var_dump($b->compress(Phar::BZ2));
+var_dump($b->compress(Phar::BZ2));
+
+echo "decompress\n";
+
+ini_set('phar.readonly', 1);
+try {
+$phar['a/b']->decompress();
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+ini_set('phar.readonly', 0);
+try {
+$phar['a']->decompress();
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+var_dump($b->decompress());
+var_dump($b->decompress());
+
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?>
+--EXPECTF--
+Warning: PharFileInfo::isCompressed() expects parameter 1 to be long, array given in %spharfileinfo_compression.php on line 11
+Unknown compression type specified
+Unknown compression type specified
+Cannot compress with Gzip compression, not possible with tar-based phar archives
+Phar entry is a directory, cannot set compression
+Phar is readonly, cannot change compression
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+decompress
+Phar is readonly, cannot decompress
+Phar entry is a directory, cannot set compression
+bool(true)
+bool(true)
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/pharfileinfo_construct.phpt b/ext/phar/tests/pharfileinfo_construct.phpt
new file mode 100644
index 0000000..2610095
--- /dev/null
+++ b/ext/phar/tests/pharfileinfo_construct.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Phar: PharFileInfo::__construct
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$pname = 'phar://' . $fname;
+
+try {
+file_put_contents($fname, 'blah');
+$a = new PharFileInfo($pname . '/oops');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+unlink($fname);
+}
+
+$a = new PharFileInfo(array());
+
+$a = new Phar($fname);
+$a['a'] = 'hi';
+$b = $a['a'];
+
+try {
+$a = new PharFileInfo($pname . '/oops/I/do/not/exist');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+
+try {
+$b->__construct('oops');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+
+try {
+$a = new PharFileInfo(__FILE__);
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?>
+--EXPECTF--
+Cannot open phar file 'phar://%spharfileinfo_construct.phar/oops': internal corruption of phar "%spharfileinfo_construct.phar" (truncated entry)
+
+Warning: PharFileInfo::__construct() expects parameter 1 to be %string, array given in %spharfileinfo_construct.php on line %d
+Cannot access phar file entry '/oops/I/do/not/exist' in archive '%spharfileinfo_construct.phar'
+Cannot call constructor twice
+'%spharfileinfo_construct.php' is not a valid phar archive URL (must have at least phar://filename.phar)
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/pharfileinfo_destruct.phpt b/ext/phar/tests/pharfileinfo_destruct.phpt
new file mode 100644
index 0000000..48a58c0
--- /dev/null
+++ b/ext/phar/tests/pharfileinfo_destruct.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Phar: PharFileInfo::__destruct
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$pname = 'phar://' . $fname;
+
+$a = new Phar($fname);
+$a['a/subdir/here'] = 'hi';
+
+$b = new PharFileInfo($pname . '/a/subdir');
+unset($b);
+
+$b = new PharFileInfo($pname . '/a/subdir/here');
+unset($b);
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?>
+--EXPECTF--
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/pharfileinfo_getcrc32.phpt b/ext/phar/tests/pharfileinfo_getcrc32.phpt
new file mode 100644
index 0000000..dfa12f4
--- /dev/null
+++ b/ext/phar/tests/pharfileinfo_getcrc32.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Phar: PharFileInfo::getCRC32
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$pname = 'phar://' . $fname;
+$file = "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+// compressed file length does not match incompressed lentgh for an uncompressed file
+
+$files = array();
+$files['a/subdir/here'] = array('cont'=>'a','ulen'=>1,'clen'=>1);;
+include 'files/phar_test.inc';
+
+$b = new PharFileInfo($pname . '/a/subdir');
+try {
+var_dump($b->getCRC32());
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+
+$b = new PharFileInfo($pname . '/a/subdir/here');
+try {
+var_dump($b->getCRC32());
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+$a = file_get_contents($pname . '/a/subdir/here');
+try {
+var_dump($b->getCRC32());
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?>
+--EXPECTF--
+Phar entry is a directory, does not have a CRC
+Phar entry was not CRC checked
+int(%s)
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/pharfileinfo_setmetadata.phpt b/ext/phar/tests/pharfileinfo_setmetadata.phpt
new file mode 100644
index 0000000..8fb6935
--- /dev/null
+++ b/ext/phar/tests/pharfileinfo_setmetadata.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Phar: PharFileInfo::setMetadata/delMetadata extra code coverage
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$pname = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+
+$phar['a/b'] = 'hi there';
+$tar = $phar->convertToData(Phar::TAR);
+
+$b = $phar['a/b'];
+try {
+$phar['a']->setMetadata('hi');
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+try {
+$phar['a']->delMetadata();
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+ini_set('phar.readonly', 1);
+try {
+$b->setMetadata('hi');
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+try {
+$b->delMetadata();
+} catch (Exception $e) {
+echo $e->getMessage(), "\n";
+}
+ini_set('phar.readonly', 0);
+$b->setMetadata(1,2,3);
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?>
+--EXPECTF--
+Phar entry is a temporary directory (not an actual entry in the archive), cannot set metadata
+Phar entry is a temporary directory (not an actual entry in the archive), cannot delete metadata
+Write operations disabled by the php.ini setting phar.readonly
+Write operations disabled by the php.ini setting phar.readonly
+
+Warning: PharFileInfo::setMetadata() expects exactly 1 parameter, 3 given in %spharfileinfo_setmetadata.php on line %d
+===DONE===
diff --git a/ext/phar/tests/phpinfo_001.phpt b/ext/phar/tests/phpinfo_001.phpt
new file mode 100644
index 0000000..5de74da
--- /dev/null
+++ b/ext/phar/tests/phpinfo_001.phpt
@@ -0,0 +1,68 @@
+--TEST--
+Phar: phpinfo display 1
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("zlib")) die("skip zlib not loaded");
+if (!extension_loaded("bz2")) die("skip bz2 not loaded");
+$arr = Phar::getSupportedSignatures();
+if (in_array("OpenSSL", $arr)) die("skip openssl support enabled");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+phar.cache_list=
+--FILE--
+<?php
+phpinfo(INFO_MODULES);
+ini_set('phar.readonly',1);
+ini_set('phar.require_hash',1);
+phpinfo(INFO_MODULES);
+?>
+===DONE===
+--EXPECTF--
+%aPhar
+
+Phar: PHP Archive support => enabled
+Phar EXT version => %s
+Phar API version => 1.1.1
+SVN revision => %sRevision: %s $
+Phar-based phar archives => enabled
+Tar-based phar archives => enabled
+ZIP-based phar archives => enabled
+gzip compression => enabled
+bzip2 compression => enabled
+OpenSSL support => disabled (install ext/openssl)
+
+
+Phar based on pear/PHP_Archive, original concept by Davey Shafik.
+Phar fully realized by Gregory Beaver and Marcus Boerger.
+Portions of tar implementation Copyright (c) %d-%d Tim Kientzle.
+Directive => Local Value => Master Value
+phar.cache_list => no value => no value
+phar.readonly => Off => Off
+phar.require_hash => Off => Off
+%a
+Phar
+
+Phar: PHP Archive support => enabled
+Phar EXT version => %s
+Phar API version => 1.1.1
+SVN revision => %sRevision: %s $
+Phar-based phar archives => enabled
+Tar-based phar archives => enabled
+ZIP-based phar archives => enabled
+gzip compression => enabled
+bzip2 compression => enabled
+OpenSSL support => disabled (install ext/openssl)
+
+
+Phar based on pear/PHP_Archive, original concept by Davey Shafik.
+Phar fully realized by Gregory Beaver and Marcus Boerger.
+Portions of tar implementation Copyright (c) %d-%d Tim Kientzle.
+Directive => Local Value => Master Value
+phar.cache_list => no value => no value
+phar.readonly => On => Off
+phar.require_hash => On => Off
+%a
+===DONE===
diff --git a/ext/phar/tests/phpinfo_002.phpt b/ext/phar/tests/phpinfo_002.phpt
new file mode 100644
index 0000000..da6db95
--- /dev/null
+++ b/ext/phar/tests/phpinfo_002.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Phar: phpinfo display 2
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("zlib")) die("skip zlib not loaded");
+if (!extension_loaded("bz2")) die("skip bz2 not loaded");
+$arr = Phar::getSupportedSignatures();
+if (in_array("OpenSSL", $arr)) die("skip openssl support enabled");
+?>
+--INI--
+phar.readonly=1
+phar.require_hash=1
+phar.cache_list=
+--FILE--
+<?php
+phpinfo(INFO_MODULES);
+?>
+===DONE===
+--EXPECTF--
+%a
+Phar
+
+Phar: PHP Archive support => enabled
+Phar EXT version => %s
+Phar API version => 1.1.1
+SVN revision => %sRevision: %s $
+Phar-based phar archives => enabled
+Tar-based phar archives => enabled
+ZIP-based phar archives => enabled
+gzip compression => enabled
+bzip2 compression => enabled
+OpenSSL support => disabled (install ext/openssl)
+
+
+Phar based on pear/PHP_Archive, original concept by Davey Shafik.
+Phar fully realized by Gregory Beaver and Marcus Boerger.
+Portions of tar implementation Copyright (c) %d-%d Tim Kientzle.
+Directive => Local Value => Master Value
+phar.cache_list => no value => no value
+phar.readonly => On => On
+phar.require_hash => On => On
+%a
+===DONE===
diff --git a/ext/phar/tests/phpinfo_003.phpt b/ext/phar/tests/phpinfo_003.phpt
new file mode 100644
index 0000000..045f1a0
--- /dev/null
+++ b/ext/phar/tests/phpinfo_003.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Phar: phpinfo display 3
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (extension_loaded("zlib")) die("skip zlib loaded");
+if (extension_loaded("bz2")) die("skip bz2 loaded");
+$arr = Phar::getSupportedSignatures();
+if (in_array("OpenSSL", $arr)) die("skip openssl support enabled");
+?>
+--INI--
+phar.readonly=1
+phar.require_hash=1
+phar.cache_list=
+--FILE--
+<?php
+phpinfo(INFO_MODULES);
+?>
+===DONE===
+--EXPECTF--
+%a
+Phar
+
+Phar: PHP Archive support => enabled
+Phar EXT version => %s
+Phar API version => 1.1.1
+SVN revision => %cId: %s $
+Phar-based phar archives => enabled
+Tar-based phar archives => enabled
+ZIP-based phar archives => enabled
+gzip compression => disabled (install ext/zlib)
+bzip2 compression => disabled (install pecl/bz2)
+OpenSSL support => disabled (install ext/openssl)
+
+
+Phar based on pear/PHP_Archive, original concept by Davey Shafik.
+Phar fully realized by Gregory Beaver and Marcus Boerger.
+Portions of tar implementation Copyright (c) %d-%d Tim Kientzle.
+Directive => Local Value => Master Value
+phar.cache_list => no value => no value
+phar.readonly => On => On
+phar.require_hash => On => On
+%a
+===DONE===
diff --git a/ext/phar/tests/phpinfo_004.phpt b/ext/phar/tests/phpinfo_004.phpt
new file mode 100644
index 0000000..c49205c
--- /dev/null
+++ b/ext/phar/tests/phpinfo_004.phpt
@@ -0,0 +1,75 @@
+--TEST--
+Phar: phpinfo display 4
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("zlib")) die("skip zlib not loaded");
+if (!extension_loaded("bz2")) die("skip bz2 not loaded");
+$arr = Phar::getSupportedSignatures();
+if (in_array("OpenSSL", $arr)) die("skip openssl support enabled");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+phar.cache_list=
+--POST--
+a=b
+--FILE--
+<?php
+phpinfo(INFO_MODULES);
+ini_set('phar.readonly',1);
+ini_set('phar.require_hash',1);
+phpinfo(INFO_MODULES);
+?>
+===DONE===
+--EXPECTF--
+%a<br />
+<h2><a name="module_Phar">Phar</a></h2>
+<table border="0" cellpadding="3" width="600">
+<tr class="h"><th>Phar: PHP Archive support</th><th>enabled</th></tr>
+<tr><td class="e">Phar EXT version </td><td class="v">%s </td></tr>
+<tr><td class="e">Phar API version </td><td class="v">1.1.1 </td></tr>
+<tr><td class="e">SVN revision </td><td class="v">%sRevision: %s $ </td></tr>
+<tr><td class="e">Phar-based phar archives </td><td class="v">enabled </td></tr>
+<tr><td class="e">Tar-based phar archives </td><td class="v">enabled </td></tr>
+<tr><td class="e">ZIP-based phar archives </td><td class="v">enabled </td></tr>
+<tr><td class="e">gzip compression </td><td class="v">enabled </td></tr>
+<tr><td class="e">bzip2 compression </td><td class="v">enabled </td></tr>
+<tr><td class="e">OpenSSL support </td><td class="v">disabled (install ext/openssl) </td></tr>
+</table><br />
+<table border="0" cellpadding="3" width="600">
+<tr class="v"><td>
+Phar based on pear/PHP_Archive, original concept by Davey Shafik.<br />Phar fully realized by Gregory Beaver and Marcus Boerger.<br />Portions of tar implementation Copyright (c) %d-%d Tim Kientzle.</td></tr>
+</table><br />
+<table border="0" cellpadding="3" width="600">
+<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
+<tr><td class="e">phar.cache_list</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
+<tr><td class="e">phar.readonly</td><td class="v">Off</td><td class="v">Off</td></tr>
+<tr><td class="e">phar.require_hash</td><td class="v">Off</td><td class="v">Off</td></tr>
+</table><br />
+%a<br />
+<h2><a name="module_Phar">Phar</a></h2>
+<table border="0" cellpadding="3" width="600">
+<tr class="h"><th>Phar: PHP Archive support</th><th>enabled</th></tr>
+<tr><td class="e">Phar EXT version </td><td class="v">%s </td></tr>
+<tr><td class="e">Phar API version </td><td class="v">1.1.1 </td></tr>
+<tr><td class="e">SVN revision </td><td class="v">%sRevision: %s $ </td></tr>
+<tr><td class="e">Phar-based phar archives </td><td class="v">enabled </td></tr>
+<tr><td class="e">Tar-based phar archives </td><td class="v">enabled </td></tr>
+<tr><td class="e">ZIP-based phar archives </td><td class="v">enabled </td></tr>
+<tr><td class="e">gzip compression </td><td class="v">enabled </td></tr>
+<tr><td class="e">bzip2 compression </td><td class="v">enabled </td></tr>
+<tr><td class="e">OpenSSL support </td><td class="v">disabled (install ext/openssl) </td></tr>
+</table><br />
+<table border="0" cellpadding="3" width="600">
+<tr class="v"><td>
+Phar based on pear/PHP_Archive, original concept by Davey Shafik.<br />Phar fully realized by Gregory Beaver and Marcus Boerger.<br />Portions of tar implementation Copyright (c) %d-%d Tim Kientzle.</td></tr>
+</table><br />
+<table border="0" cellpadding="3" width="600">
+<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
+<tr><td class="e">phar.cache_list</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
+<tr><td class="e">phar.readonly</td><td class="v">On</td><td class="v">Off</td></tr>
+<tr><td class="e">phar.require_hash</td><td class="v">On</td><td class="v">Off</td></tr>
+</table><br />
+%a<br />
+</div></body></html>===DONE===
diff --git a/ext/phar/tests/readfile.phpt b/ext/phar/tests/readfile.phpt
new file mode 100644
index 0000000..60fdad1
--- /dev/null
+++ b/ext/phar/tests/readfile.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Phar: test readfile() interception
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.require_hash=1
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$a = new Phar($fname);
+$a['index.php'] = '<?php
+readfile("dir/file1.txt");
+readfile("file1.txt", true);
+?>';
+$a['dir/file1.txt'] = 'hi';
+$a['dir/file2.txt'] = 'hi2';
+$a['dir/file3.txt'] = 'hi3';
+$a->setStub('<?php
+Phar::interceptFileFuncs();
+set_include_path("phar://" . __FILE__ . "/dir" . PATH_SEPARATOR . "phar://" . __FILE__);
+include "index.php";
+__HALT_COMPILER();');
+include $fname;
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+hihi===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/readfile_edgecases.phpt b/ext/phar/tests/readfile_edgecases.phpt
new file mode 100644
index 0000000..3cf69ed
--- /dev/null
+++ b/ext/phar/tests/readfile_edgecases.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Phar: test edge cases of readfile() function interception
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+<?php if (version_compare(PHP_VERSION, "6.0", ">=")) die("skip requires php older than 6.0"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+Phar::interceptFileFuncs();
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+
+readfile(array());
+chdir(dirname(__FILE__));
+file_put_contents($fname, "blah\n");
+file_put_contents("foob", "test\n");
+readfile($fname);
+unlink($fname);
+mkdir($pname . '/oops');
+file_put_contents($pname . '/foo/hi', '<?php
+readfile("foo/" . basename(__FILE__));
+$context = stream_context_create();
+readfile("foob");
+set_include_path("' . addslashes(dirname(__FILE__)) . '");
+readfile("foob", true);
+readfile("./hi", 0, $context);
+readfile("../oops");
+?>
+');
+include $pname . '/foo/hi';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php rmdir(dirname(__FILE__) . '/poo'); ?>
+<?php unlink(dirname(__FILE__) . '/foob'); ?>
+--EXPECTF--
+Warning: readfile() expects parameter 1 to be a valid path, array given in %sreadfile_edgecases.php on line %d
+blah
+<?php
+readfile("foo/" . basename(__FILE__));
+$context = stream_context_create();
+readfile("foob");
+set_include_path("%stests");
+readfile("foob", true);
+readfile("./hi", 0, $context);
+readfile("../oops");
+?>
+test
+test
+<?php
+readfile("foo/" . basename(__FILE__));
+$context = stream_context_create();
+readfile("foob");
+set_include_path("%stests");
+readfile("foob", true);
+readfile("./hi", 0, $context);
+readfile("../oops");
+?>
+
+Warning: readfile(phar://%sreadfile_edgecases.phar.php/oops): failed to open stream: phar error: path "oops" is a directory in phar://%sreadfile_edgecases.phar.php/foo/hi on line %d
+===DONE===
diff --git a/ext/phar/tests/readfile_edgecasesU.phpt b/ext/phar/tests/readfile_edgecasesU.phpt
new file mode 100644
index 0000000..c26b45f
--- /dev/null
+++ b/ext/phar/tests/readfile_edgecasesU.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Phar: test edge cases of readfile() function interception
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+<?php if (version_compare(PHP_VERSION, "6.0", "<")) die("skip requires php 6.0 or newer"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+Phar::interceptFileFuncs();
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+
+chdir(dirname(__FILE__));
+file_put_contents($fname, "blah\n");
+file_put_contents("foob", "test\n");
+readfile($fname);
+unlink($fname);
+mkdir($pname . '/oops');
+file_put_contents($pname . '/foo/hi', '<?php
+readfile("foo/" . basename(__FILE__));
+$context = stream_context_create();
+readfile("foob");
+set_include_path("' . addslashes(dirname(__FILE__)) . '");
+readfile("foob", true);
+readfile("./hi", 0, $context);
+readfile("../oops");
+?>
+');
+include $pname . '/foo/hi';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php rmdir(dirname(__FILE__) . '/poo'); ?>
+<?php unlink(dirname(__FILE__) . '/foob'); ?>
+--EXPECTF--
+blah
+<?php
+readfile("foo/" . basename(__FILE__));
+$context = stream_context_create();
+readfile("foob");
+set_include_path("%stests");
+readfile("foob", true);
+readfile("./hi", 0, $context);
+readfile("../oops");
+?>
+test
+test
+<?php
+readfile("foo/" . basename(__FILE__));
+$context = stream_context_create();
+readfile("foob");
+set_include_path("%stests");
+readfile("foob", true);
+readfile("./hi", 0, $context);
+readfile("../oops");
+?>
+
+Warning: readfile(phar://%sreadfile_edgecasesU.phar.php/oops): failed to open stream: phar error: path "oops" is a directory in phar://%sreadfile_edgecasesU.phar.php/foo/hi on line %d
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/refcount1.phpt b/ext/phar/tests/refcount1.phpt
new file mode 100644
index 0000000..ddbb7f7
--- /dev/null
+++ b/ext/phar/tests/refcount1.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Phar: test that refcounting avoids problems with deleting a file
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = b"<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+include 'files/phar_test.inc';
+
+$fp = fopen($pname . '/b/c.php', 'wb');
+fwrite($fp, b"extra");
+fclose($fp);
+echo "===CLOSE===\n";
+$p = new Phar($fname);
+$b = fopen($pname . '/b/c.php', 'rb');
+$a = $p['b/c.php'];
+var_dump($a);
+var_dump(fread($b, 20));
+rewind($b);
+echo "===UNLINK===\n";
+unlink($pname . '/b/c.php');
+var_dump($a);
+var_dump(fread($b, 20));
+include $pname . '/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+===CLOSE===
+object(PharFileInfo)#%d (2) {
+ [%spathName":%sSplFileInfo":private]=>
+ string(%d) "phar://%srefcount1.phar.php/b/c.php"
+ [%sfileName":%sSplFileInfo":private]=>
+ string(%d) "c.php"
+}
+string(5) "extra"
+===UNLINK===
+
+Warning: unlink(): phar error: "b/c.php" in phar "%srefcount1.phar.php", has open file pointers, cannot unlink in %srefcount1.php on line %d
+object(PharFileInfo)#%d (2) {
+ [%spathName":%sSplFileInfo":private]=>
+ string(%d) "phar://%srefcount1.phar.php/b/c.php"
+ [%sfileName":%sSplFileInfo":private]=>
+ string(%s) "c.php"
+}
+string(5) "extra"
+extra
+===DONE===
diff --git a/ext/phar/tests/refcount1_5_2.phpt b/ext/phar/tests/refcount1_5_2.phpt
new file mode 100644
index 0000000..bf2c2b7
--- /dev/null
+++ b/ext/phar/tests/refcount1_5_2.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Phar: test that refcounting avoids problems with deleting a file
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php __HALT_COMPILER(); ?>");
+$phar->setAlias('hio');
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, "extra");
+fclose($fp);
+
+echo "===CLOSE===\n";
+
+$b = fopen($alias . '/b/c.php', 'rb');
+$a = $phar['b/c.php'];
+var_dump($a);
+var_dump(fread($b, 20));
+rewind($b);
+echo "===UNLINK===\n";
+unlink($alias . '/b/c.php');
+var_dump($a);
+var_dump(fread($b, 20));
+include $alias . '/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?>
+--EXPECTF--
+===CLOSE===
+object(PharFileInfo)#%d (0) {
+}
+string(5) "extra"
+===UNLINK===
+
+Warning: unlink(): phar error: "b/c.php" in phar "%sefcount1_5_2.phar", has open file pointers, cannot unlink in %sefcount1_5_2.php on line %d
+object(PharFileInfo)#%d (0) {
+}
+string(5) "extra"
+extra
+===DONE===
diff --git a/ext/phar/tests/rename.phpt b/ext/phar/tests/rename.phpt
new file mode 100644
index 0000000..c73c98e
--- /dev/null
+++ b/ext/phar/tests/rename.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Phar: rename test
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = 'a';
+include 'files/phar_test.inc';
+include $fname;
+
+echo file_get_contents($pname . '/a') . "\n";
+rename($pname . '/a', $pname . '/b');
+echo file_get_contents($pname . '/b') . "\n";
+echo file_get_contents($pname . '/a') . "\n";
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+a
+a
+
+Warning: file_get_contents(phar://%srename.phar.php/a): failed to open stream: phar error: "a" is not a file in phar "%srename.phar.php" in %srename.php on line %d \ No newline at end of file
diff --git a/ext/phar/tests/rename_dir.phpt b/ext/phar/tests/rename_dir.phpt
new file mode 100644
index 0000000..d19a37f
--- /dev/null
+++ b/ext/phar/tests/rename_dir.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Phar: rename_dir test
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a/x'] = 'a';
+include 'files/phar_test.inc';
+include $fname;
+
+echo file_get_contents($pname . '/a/x') . "\n";
+rename($pname . '/a', $pname . '/b');
+echo file_get_contents($pname . '/b/x') . "\n";
+echo file_get_contents($pname . '/a/x') . "\n";
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+a
+a
+
+Warning: file_get_contents(phar://%srename_dir.phar.php/a/x): failed to open stream: phar error: "a/x" is not a file in phar "%srename_dir.phar.php" in %srename_dir.php on line %d
diff --git a/ext/phar/tests/rename_dir_and_mount.phpt b/ext/phar/tests/rename_dir_and_mount.phpt
new file mode 100644
index 0000000..b74f47b
--- /dev/null
+++ b/ext/phar/tests/rename_dir_and_mount.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Phar: rename_dir and mount test
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a/x'] = 'a';
+$files['a/b/x'] = 'a';
+include 'files/phar_test.inc';
+include $fname;
+
+Phar::mount("$pname/a/c", dirname(__FILE__));
+
+var_dump(file_exists($pname . '/a'));
+var_dump(file_exists($pname . '/a/x'));
+var_dump(file_exists($pname . '/a/b'));
+var_dump(file_exists($pname . '/a/b/x'));
+var_dump(file_exists($pname . '/a/c'));
+var_dump(file_exists($pname . '/a/c/'.basename(__FILE__)));
+rename($pname . '/a', $pname . '/b');
+clearstatcache();
+var_dump(file_exists($pname . '/a'));
+var_dump(file_exists($pname . '/a/x'));
+var_dump(file_exists($pname . '/a/b'));
+var_dump(file_exists($pname . '/a/b/x'));
+var_dump(file_exists($pname . '/a/c'));
+var_dump(file_exists($pname . '/a/c/'.basename(__FILE__)));
+var_dump(file_exists($pname . '/b'));
+var_dump(file_exists($pname . '/b/x'));
+var_dump(file_exists($pname . '/b/b'));
+var_dump(file_exists($pname . '/b/b/x'));
+var_dump(file_exists($pname . '/b/c'));
+var_dump(file_exists($pname . '/b/c/'.basename(__FILE__)));
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
diff --git a/ext/phar/tests/rmdir.phpt b/ext/phar/tests/rmdir.phpt
new file mode 100644
index 0000000..726e2cf
--- /dev/null
+++ b/ext/phar/tests/rmdir.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Phar: rmdir test
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$file = b"<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a/x'] = 'a';
+include 'files/phar_test.inc';
+include $fname;
+
+echo file_get_contents($pname . '/a/x') . "\n";
+var_dump(rmdir($pname . '/a'));
+echo file_get_contents($pname . '/a/x') . "\n";
+unlink($pname . '/a/x');
+var_dump(rmdir($pname . '/a'));
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+a
+
+Warning: rmdir(): phar error: Directory not empty in %srmdir.php on line 14
+bool(false)
+a
+bool(true)
diff --git a/ext/phar/tests/security.phpt b/ext/phar/tests/security.phpt
new file mode 100644
index 0000000..f2944da
--- /dev/null
+++ b/ext/phar/tests/security.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Phar: test to ensure phar.readonly cannot be circumvented
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.php';
+$a = new Phar($fname);
+$a->setStub('<?php
+Phar::mapPhar();
+$phar = new Phar(__FILE__);
+var_dump($phar->isWritable());
+try {
+$phar["b"] = "should not work!";
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+__HALT_COMPILER();
+?>');
+$a['hi'] = 'hi';
+unset($a);
+copy($fname, $fname2);
+Phar::unlinkArchive($fname);
+ini_set('phar.readonly', 1);
+include $fname2;
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.php'); ?>
+--EXPECT--
+bool(false)
+Write operations disabled by the php.ini setting phar.readonly
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/stat.phpt b/ext/phar/tests/stat.phpt
new file mode 100644
index 0000000..184aa6d
--- /dev/null
+++ b/ext/phar/tests/stat.phpt
@@ -0,0 +1,225 @@
+--TEST--
+Phar: test stat function interceptions
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.require_hash=1
+phar.readonly=0
+--FILE--
+<?php
+Phar::interceptFileFuncs();
+var_dump(stat(""));
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$a = new Phar($fname);
+$a['my/index.php'] = '<?php
+echo "stat\n";
+var_dump(stat("dir/file1.txt"));
+echo "lstat\n";
+var_dump(lstat("dir/file1.txt"));
+echo "fileperms\n";
+var_dump(fileperms("dir/file1.txt"));
+echo "fileinode\n";
+var_dump(fileinode("dir/file1.txt"));
+echo "filesize\n";
+var_dump(filesize("dir/file1.txt"));
+echo "fileowner\n";
+var_dump(fileowner("dir/file1.txt"));
+echo "filegroup\n";
+var_dump(filegroup("dir/file1.txt"));
+echo "filemtime\n";
+var_dump(filemtime("dir/file1.txt"));
+echo "fileatime\n";
+var_dump(fileatime("dir/file1.txt"));
+echo "filectime\n";
+var_dump(filectime("dir/file1.txt"));
+echo "filetype\n";
+var_dump(filetype("dir/file1.txt"));
+echo "is_writable\n";
+var_dump(is_writable("dir/file1.txt"));
+echo "is_writeable\n";
+var_dump(is_writeable("dir/file1.txt"));
+echo "is_readable\n";
+var_dump(is_readable("dir/file1.txt"));
+echo "is_executable\n";
+var_dump(is_executable("dir/file1.txt"));
+echo "file_exists\n";
+var_dump(file_exists("dir/file1.txt"));
+echo "is_dir\n";
+var_dump(is_dir("dir/file1.txt"));
+echo "is_file\n";
+var_dump(is_file("dir/file1.txt"));
+echo "is_link\n";
+var_dump(is_link("dir/file1.txt"));
+echo "not found\n";
+var_dump(file_exists("not/found"));
+echo "not found 2\n";
+var_dump(fileperms("not/found"));
+?>';
+$a['dir/file1.txt'] = 'hi';
+$a['dir/file2.txt'] = 'hi2';
+$a['dir/file3.txt'] = 'hi3';
+$a->setStub('<?php
+set_include_path("phar://" . __FILE__ . "/dir" . PATH_SEPARATOR . "phar://" . __FILE__);
+include "my/index.php";
+__HALT_COMPILER();');
+include $fname;
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+--EXPECTF--
+bool(false)
+stat
+array(26) {
+ [0]=>
+ int(12)
+ [1]=>
+ int(%d)
+ [2]=>
+ int(33206)
+ [3]=>
+ int(1)
+ [4]=>
+ int(0)
+ [5]=>
+ int(0)
+ [6]=>
+ int(%s)
+ [7]=>
+ int(2)
+ [8]=>
+ int(%d)
+ [9]=>
+ int(%d)
+ [10]=>
+ int(%d)
+ [11]=>
+ int(%s)
+ [12]=>
+ int(%s)
+ ["dev"]=>
+ int(12)
+ ["ino"]=>
+ int(%d)
+ ["mode"]=>
+ int(33206)
+ ["nlink"]=>
+ int(1)
+ ["uid"]=>
+ int(0)
+ ["gid"]=>
+ int(0)
+ ["rdev"]=>
+ int(%s)
+ ["size"]=>
+ int(2)
+ ["atime"]=>
+ int(%d)
+ ["mtime"]=>
+ int(%d)
+ ["ctime"]=>
+ int(%d)
+ ["blksize"]=>
+ int(%s)
+ ["blocks"]=>
+ int(%s)
+}
+lstat
+array(26) {
+ [0]=>
+ int(12)
+ [1]=>
+ int(%d)
+ [2]=>
+ int(33206)
+ [3]=>
+ int(1)
+ [4]=>
+ int(0)
+ [5]=>
+ int(0)
+ [6]=>
+ int(%s)
+ [7]=>
+ int(2)
+ [8]=>
+ int(%d)
+ [9]=>
+ int(%d)
+ [10]=>
+ int(%d)
+ [11]=>
+ int(%s)
+ [12]=>
+ int(%s)
+ ["dev"]=>
+ int(12)
+ ["ino"]=>
+ int(%d)
+ ["mode"]=>
+ int(33206)
+ ["nlink"]=>
+ int(1)
+ ["uid"]=>
+ int(0)
+ ["gid"]=>
+ int(0)
+ ["rdev"]=>
+ int(%s)
+ ["size"]=>
+ int(2)
+ ["atime"]=>
+ int(%d)
+ ["mtime"]=>
+ int(%d)
+ ["ctime"]=>
+ int(%d)
+ ["blksize"]=>
+ int(%s)
+ ["blocks"]=>
+ int(%s)
+}
+fileperms
+int(33206)
+fileinode
+int(%d)
+filesize
+int(2)
+fileowner
+int(0)
+filegroup
+int(0)
+filemtime
+int(%d)
+fileatime
+int(%d)
+filectime
+int(%d)
+filetype
+string(4) "file"
+is_writable
+bool(true)
+is_writeable
+bool(false)
+is_readable
+bool(true)
+is_executable
+bool(false)
+file_exists
+bool(true)
+is_dir
+bool(false)
+is_file
+bool(true)
+is_link
+bool(false)
+not found
+bool(false)
+not found 2
+
+Warning: fileperms(): stat failed for not/found in phar://%sstat.phar.php/my/index.php on line %d
+bool(false)
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/stat2.phpt b/ext/phar/tests/stat2.phpt
new file mode 100644
index 0000000..defda71
--- /dev/null
+++ b/ext/phar/tests/stat2.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Phar: test stat function interceptions and is_file/is_link edge cases (PHP 5.2)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+<?php if (substr(phpversion(), 0, 3) != '5.2') die("skip PHP 5.2 required for this test");?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+Phar::interceptFileFuncs();
+is_file();
+is_link();
+var_dump(is_file(__FILE__));
+
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+copy(dirname(__FILE__) . '/tar/files/links.tar', $fname2);
+$a = new PharData($fname2);
+$b = $a->convertToExecutable();
+unset($a);
+Phar::unlinkArchive($fname2);
+$b['foo/stat.php'] = '<?php
+echo "is_link\n";
+var_dump(is_link("./stat.php"),is_file("./stat.php"), is_link("./oops"), is_file("./oops"));
+var_dump(is_link("testit/link"), filetype("testit/link"), filetype("testit"), is_file("testit/link"));
+echo "not found\n";
+var_dump(is_link("notfound"));
+echo "dir\n";
+var_dump(is_dir("./bar"), is_file("foo/bar/blah"));
+?>';
+$b->addEmptyDir('foo/bar/blah');
+$b->setStub('<?php
+include "phar://" . __FILE__ . "/foo/stat.php";
+__HALT_COMPILER();');
+include $fname3;
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?>
+--EXPECTF--
+Warning: Wrong parameter count for is_file() in %sstat2.php on line %d
+
+Warning: Wrong parameter count for is_link() in %sstat2.php on line %d
+bool(true)
+is_link
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+bool(true)
+string(4) "link"
+string(3) "dir"
+bool(true)
+not found
+bool(false)
+dir
+bool(true)
+bool(false)
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/stat2_5.3.phpt b/ext/phar/tests/stat2_5.3.phpt
new file mode 100644
index 0000000..aba2a64
--- /dev/null
+++ b/ext/phar/tests/stat2_5.3.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Phar: test stat function interceptions and is_file/is_link edge cases (PHP 5.3+)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+<?php if (substr(phpversion(), 0, 3) == '5.2') die("skip PHP 5.3+ required for this test");?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+Phar::interceptFileFuncs();
+is_file();
+is_link();
+var_dump(is_file(__FILE__));
+
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+copy(dirname(__FILE__) . '/tar/files/links.tar', $fname2);
+$a = new PharData($fname2);
+$b = $a->convertToExecutable(Phar::TAR, Phar::NONE, '.3.phar.tar');
+unset($a);
+Phar::unlinkArchive($fname2);
+$b['foo/stat.php'] = '<?php
+echo "is_link\n";
+var_dump(is_link("./stat.php"),is_file("./stat.php"), is_link("./oops"), is_file("./oops"));
+var_dump(is_link("testit/link"), filetype("testit/link"), filetype("testit"), is_file("testit/link"));
+echo "not found\n";
+var_dump(is_link("notfound"));
+echo "dir\n";
+var_dump(is_dir("./bar"), is_file("foo/bar/blah"));
+?>';
+$b->addEmptyDir('foo/bar/blah');
+$b->setStub('<?php
+include "phar://" . __FILE__ . "/foo/stat.php";
+__HALT_COMPILER();');
+include $fname3;
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?>
+--EXPECTF--
+Warning: is_file() expects exactly 1 parameter, 0 given in %sstat2_5.3.php on line %d
+
+Warning: is_link() expects exactly 1 parameter, 0 given in %sstat2_5.3.php on line %d
+bool(true)
+is_link
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+bool(true)
+string(4) "link"
+string(3) "dir"
+bool(true)
+not found
+bool(false)
+dir
+bool(true)
+bool(false)
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/tar/033.phpt b/ext/phar/tests/tar/033.phpt
new file mode 100644
index 0000000..29223e4
--- /dev/null
+++ b/ext/phar/tests/tar/033.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Phar::chmod tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://hio';
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<?php echo "This is a\n"; include "'.$alias.'/b.php"; ?>';
+$phar->setAlias('hio');
+$phar->addEmptyDir('test');
+$phar->stopBuffering();
+
+try {
+ var_dump($phar['a.php']->isExecutable());
+ $phar['a.php']->chmod(0777);
+ var_dump($phar['a.php']->isExecutable());
+ $phar['a.php']->chmod(0666);
+ var_dump($phar['a.php']->isExecutable());
+ echo "test dir\n";
+ var_dump($phar['test']->isReadable());
+ $phar['test']->chmod(0000);
+ var_dump($phar['test']->isReadable());
+ $phar['test']->chmod(0666);
+ var_dump($phar['test']->isReadable());
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+?>
+--EXPECTF--
+bool(false)
+bool(true)
+bool(false)
+test dir
+bool(true)
+bool(false)
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/tar/033a.phpt b/ext/phar/tests/tar/033a.phpt
new file mode 100644
index 0000000..09b5446
--- /dev/null
+++ b/ext/phar/tests/tar/033a.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Phar::chmod tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://hio';
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<?php echo "This is a\n"; include "'.$alias.'/b.php"; ?>';
+$phar->setAlias('hio');
+$phar->addEmptyDir('test');
+$phar->stopBuffering();
+ini_set('phar.readonly', 1);
+
+try {
+ var_dump($phar['a.php']->isExecutable());
+ $phar['a.php']->chmod(0777);
+ var_dump($phar['a.php']->isExecutable());
+ $phar['a.php']->chmod(0666);
+ var_dump($phar['a.php']->isExecutable());
+ echo "test dir\n";
+ var_dump($phar['test']->isReadable());
+ $phar['test']->chmod(0000);
+ var_dump($phar['test']->isReadable());
+ $phar['test']->chmod(0666);
+ var_dump($phar['test']->isReadable());
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+?>
+--EXPECTF--
+bool(false)
+Cannot modify permissions for file "a.php" in phar "%s033a.phar.tar", write operations are prohibited
+===DONE===
diff --git a/ext/phar/tests/tar/alias_acrobatics.phpt b/ext/phar/tests/tar/alias_acrobatics.phpt
new file mode 100644
index 0000000..d08dc04
--- /dev/null
+++ b/ext/phar/tests/tar/alias_acrobatics.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Phar: alias edge cases
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.tar';
+
+$p = new Phar($fname);
+
+$p->setAlias('foo');
+$p['unused'] = 'hi';
+try {
+$a = new Phar($fname2, 0, 'foo');
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+copy($fname, $fname2);
+echo "2\n";
+try {
+$a = new Phar($fname2);
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+try {
+$b = new Phar($fname, 0, 'another');
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar');
+?>
+--EXPECTF--
+alias "foo" is already used for archive "%salias_acrobatics.phar.tar" cannot be overloaded with "%salias_acrobatics.2.phar.tar"
+2
+phar error: Unable to add tar-based phar "%salias_acrobatics.2.phar.tar", alias is already in use
+alias "another" is already used for archive "%salias_acrobatics.phar.tar" cannot be overloaded with "%salias_acrobatics.phar.tar"
+===DONE===
diff --git a/ext/phar/tests/tar/all.phpt b/ext/phar/tests/tar/all.phpt
new file mode 100644
index 0000000..4dfb654
--- /dev/null
+++ b/ext/phar/tests/tar/all.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Phar: test that creation of tar-based phar generates valid tar with all bells/whistles
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (!extension_loaded("zlib")) die("skip zlib not available");
+if (!extension_loaded("bz2")) die("skip bz2 not available");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.php';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.tar.php';
+$pname2 = 'phar://' . $fname2;
+
+$phar = new Phar($fname);
+
+$phar->setMetadata('hi there');
+$phar['a'] = 'hi';
+$phar['a']->setMetadata('a meta');
+$phar['b'] = 'hi2';
+$phar['c'] = 'hi3';
+$phar['b']->chmod(0444);
+$phar->setStub("<?php ok __HALT_COMPILER();");
+$phar->setAlias("hime");
+unset($phar);
+copy($fname, $fname2);
+Phar::unlinkArchive($fname);
+var_dump(file_exists($fname), file_exists($pname . '/a'));
+
+$phar = new Phar($fname2);
+var_dump($phar['a']->getContent(), $phar['b']->getContent(), $phar['c']->getContent());
+var_dump((string) decoct(fileperms($pname2 . '/b')));
+var_dump($phar->getStub());
+var_dump($phar->getAlias());
+var_dump($phar->getMetadata());
+var_dump($phar['a']->getMetadata());
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar.php'); ?>
+--EXPECT--
+bool(false)
+bool(false)
+string(2) "hi"
+string(3) "hi2"
+string(3) "hi3"
+string(6) "100444"
+string(32) "<?php ok __HALT_COMPILER(); ?>
+"
+string(4) "hime"
+string(8) "hi there"
+string(6) "a meta"
+===DONE===
diff --git a/ext/phar/tests/tar/allU.phpt b/ext/phar/tests/tar/allU.phpt
new file mode 100644
index 0000000..50c7fc7
--- /dev/null
+++ b/ext/phar/tests/tar/allU.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Phar: test that creation of tar-based phar generates valid tar with all bells/whistles
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (!extension_loaded("zlib")) die("skip zlib not available");
+if (!extension_loaded("bz2")) die("skip bz2 not available");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.php';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.tar.php';
+$pname2 = 'phar://' . $fname2;
+
+$phar = new Phar($fname);
+
+$phar->setMetadata('hi there');
+$phar['a'] = 'hi';
+$phar['a']->setMetadata('a meta');
+$phar['b'] = 'hi2';
+$phar['c'] = 'hi3';
+$phar['b']->chmod(0444);
+$phar->setStub("<?php ok __HALT_COMPILER();");
+$phar->setAlias("hime");
+unset($phar);
+copy($fname, $fname2);
+Phar::unlinkArchive($fname);
+var_dump(file_exists($fname), file_exists($pname . '/a'));
+
+$phar = new Phar($fname2);
+var_dump($phar['a']->getContent(), $phar['b']->getContent(), $phar['c']->getContent());
+var_dump((string) decoct(fileperms($pname2 . '/b')));
+var_dump($phar->getStub());
+var_dump($phar->getAlias());
+var_dump($phar->getMetadata());
+var_dump($phar['a']->getMetadata());
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar.php'); ?>
+--EXPECT--
+bool(false)
+bool(false)
+string(2) "hi"
+string(3) "hi2"
+string(3) "hi3"
+unicode(6) "100444"
+string(32) "<?php ok __HALT_COMPILER(); ?>
+"
+string(4) "hime"
+unicode(8) "hi there"
+unicode(6) "a meta"
+===DONE===
diff --git a/ext/phar/tests/tar/badalias.phpt b/ext/phar/tests/tar/badalias.phpt
new file mode 100644
index 0000000..441fc03
--- /dev/null
+++ b/ext/phar/tests/tar/badalias.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Phar: invalid aliases
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip no zlib"); ?>
+<?php if (!extension_loaded("bz2")) die("skip no bz2"); ?>
+--FILE--
+<?php
+$e = dirname(__FILE__) . '/files/';
+for ($i = 1; $i <= 5; $i++) {
+try {
+new Phar($e . "badalias$i.phar.tar");
+} catch (Exception $ee) {
+echo $ee->getMessage(), "\n";
+}
+}
+?>
+===DONE===
+--EXPECTF--
+phar error: invalid alias "hi/thereaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..." in tar-based phar "%sbadalias1.phar.tar"
+phar error: invalid alias "hi\there" in tar-based phar "%sbadalias2.phar.tar"
+phar error: invalid alias "hi;there" in tar-based phar "%sbadalias3.phar.tar"
+phar error: invalid alias "hi:there" in tar-based phar "%sbadalias4.phar.tar"
+phar error: tar-based phar "%sbadalias5.phar.tar" has alias that is larger than 511 bytes, cannot process
+===DONE===
diff --git a/ext/phar/tests/tar/badchecksum.phpt b/ext/phar/tests/tar/badchecksum.phpt
new file mode 100644
index 0000000..fae19b1
--- /dev/null
+++ b/ext/phar/tests/tar/badchecksum.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Phar: tar with bad checksum
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar';
+$pname = 'phar://' . $fname;
+
+include dirname(__FILE__) . '/files/corrupt_tarmaker.php.inc';
+$a = new corrupt_tarmaker($fname, 'none');
+$a->init();
+$a->addFile('hithere', 'contents', null, 'checksum');
+$a->close();
+
+try {
+ $p = new PharData($fname);
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar');
+?>
+--EXPECTF--
+phar error: "%sbadchecksum.tar" is a corrupted tar file (checksum mismatch of file "hithere")
+===DONE===
diff --git a/ext/phar/tests/tar/bignames.phpt b/ext/phar/tests/tar/bignames.phpt
new file mode 100644
index 0000000..c10b1ce
--- /dev/null
+++ b/ext/phar/tests/tar/bignames.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Phar: tar with huge filenames
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.tar';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.3.tar';
+$fname4 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.4.tar';
+$pname = 'phar://' . $fname;
+
+$p1 = new PharData($fname);
+$p1[str_repeat('a', 100) . '/b'] = 'hi';
+$p1[str_repeat('a', 155) . '/' . str_repeat('b', 100)] = 'hi2';
+copy($fname, $fname2);
+$p2 = new PharData($fname2);
+echo $p2[str_repeat('a', 100) . '/b']->getContent() . "\n";
+echo $p2[str_repeat('a', 155) . '/' . str_repeat('b', 100)]->getContent() . "\n";
+
+try {
+ $p2[str_repeat('a', 400)] = 'yuck';
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+
+try {
+ $p2 = new PharData($fname3);
+ $p2[str_repeat('a', 101)] = 'yuck';
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+
+try {
+ $p2 = new PharData($fname4);
+ $p2[str_repeat('b', 160) . '/' . str_repeat('a', 90)] = 'yuck';
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.tar');
+@unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.3.tar');
+@unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.4.tar');
+?>
+--EXPECTF--
+hi
+hi2
+tar-based phar "%sbignames.2.tar" cannot be created, filename "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" is too long for tar file format
+tar-based phar "%sbignames.3.tar" cannot be created, filename "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" is too long for tar file format
+tar-based phar "%sbignames.4.tar" cannot be created, filename "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" is too long for tar file format
+===DONE===
diff --git a/ext/phar/tests/tar/bignames_overflow.phpt b/ext/phar/tests/tar/bignames_overflow.phpt
new file mode 100644
index 0000000..359e9c6
--- /dev/null
+++ b/ext/phar/tests/tar/bignames_overflow.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Phar: tar with huge filenames, buffer overflow
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.tar';
+$pname = 'phar://' . $fname;
+
+include dirname(__FILE__) . '/files/make.dangerous.tar.php.inc';
+
+$tar = new danger_tarmaker($fname, 'none');
+$tar->init();
+$tar->addFile(str_repeat('a', 101), 'hi');
+$tar->addFile(str_repeat('a', 255), 'hi2');
+$tar->close();
+
+$p1 = new PharData($fname);
+foreach ($p1 as $file) {
+ echo $file->getFileName(), "\n";
+}
+echo $p1['a/' . str_repeat('a', 100)]->getContent() . "\n";
+echo $p1[str_repeat('a', 155) . '/' . str_repeat('a', 100)]->getContent() . "\n";
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.tar');
+?>
+--EXPECT--
+a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+hi
+hi2
+===DONE===
diff --git a/ext/phar/tests/tar/bug49910.phpt b/ext/phar/tests/tar/bug49910.phpt
new file mode 100644
index 0000000..6fb66a5
--- /dev/null
+++ b/ext/phar/tests/tar/bug49910.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Bug #49910: no support for ././@LongLink for long filenames in phar tar support
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip"); ?>
+--FILE--
+<?php
+$fname = str_replace('\\', '/', dirname(__FILE__) . '/files/Structures_Graph-1.0.3.tgz');
+$tar = new PharData($fname);
+$files = array();
+foreach (new RecursiveIteratorIterator($tar) as $file) {
+ $files[] = str_replace($fname, '*', $file->getPathName());
+}
+print_r($files);
+?>
+===DONE===
+--EXPECT--
+Array
+(
+ [0] => phar://*/Structures_Graph-1.0.3/LICENSE
+ [1] => phar://*/Structures_Graph-1.0.3/Structures/Graph/Manipulator/AcyclicTest.php
+ [2] => phar://*/Structures_Graph-1.0.3/Structures/Graph/Manipulator/TopologicalSorter.php
+ [3] => phar://*/Structures_Graph-1.0.3/Structures/Graph/Node.php
+ [4] => phar://*/Structures_Graph-1.0.3/Structures/Graph.php
+ [5] => phar://*/Structures_Graph-1.0.3/docs/generate.sh
+ [6] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph.html
+ [7] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html
+ [8] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html
+ [9] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph_Node.html
+ [10] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html
+ [11] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html
+ [12] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_Node_php.html
+ [13] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_php.html
+ [14] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.html
+ [15] => phar://*/Structures_Graph-1.0.3/docs/html/classtrees_Structures_Graph.html
+ [16] => phar://*/Structures_Graph-1.0.3/docs/html/elementindex.html
+ [17] => phar://*/Structures_Graph-1.0.3/docs/html/elementindex_Structures_Graph.html
+ [18] => phar://*/Structures_Graph-1.0.3/docs/html/errors.html
+ [19] => phar://*/Structures_Graph-1.0.3/docs/html/index.html
+ [20] => phar://*/Structures_Graph-1.0.3/docs/html/li_Structures_Graph.html
+ [21] => phar://*/Structures_Graph-1.0.3/docs/html/media/banner.css
+ [22] => phar://*/Structures_Graph-1.0.3/docs/html/media/stylesheet.css
+ [23] => phar://*/Structures_Graph-1.0.3/docs/html/packages.html
+ [24] => phar://*/Structures_Graph-1.0.3/docs/html/todolist.html
+ [25] => phar://*/Structures_Graph-1.0.3/docs/tutorials/Structures_Graph/Structures_Graph.pkg
+ [26] => phar://*/Structures_Graph-1.0.3/tests/AllTests.php
+ [27] => phar://*/Structures_Graph-1.0.3/tests/testCase/BasicGraph.php
+ [28] => phar://*/package.xml
+)
+===DONE===
diff --git a/ext/phar/tests/tar/create_new_and_modify.phpt b/ext/phar/tests/tar/create_new_and_modify.phpt
new file mode 100644
index 0000000..8062fda
--- /dev/null
+++ b/ext/phar/tests/tar/create_new_and_modify.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Phar: create and modify tar-based phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.php';
+$pname = 'phar://' . $fname;
+
+@unlink($fname);
+
+file_put_contents($pname . '/a.php', "brand new!\n");
+
+$phar = new Phar($fname);
+var_dump($phar->isFileFormat(Phar::TAR));
+$sig1 = md5_file($fname);
+
+include $pname . '/a.php';
+
+file_put_contents($pname .'/a.php', "modified!\n");
+file_put_contents($pname .'/b.php', "another!\n");
+
+$phar = new Phar($fname);
+$sig2 = md5_file($fname);
+
+var_dump($sig1 != $sig2);
+
+include $pname . '/a.php';
+include $pname . '/b.php';
+
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php'); ?>
+--EXPECTF--
+bool(true)
+brand new!
+bool(true)
+modified!
+another!
+===DONE===
diff --git a/ext/phar/tests/tar/create_new_phar_b.phpt b/ext/phar/tests/tar/create_new_phar_b.phpt
new file mode 100644
index 0000000..371e47d
--- /dev/null
+++ b/ext/phar/tests/tar/create_new_phar_b.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Phar: create a completely new tar-based phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=1
+--FILE--
+<?php
+
+file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar/a.php',
+ 'brand new!');
+include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar/a.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+
+Warning: file_put_contents(phar://%screate_new_phar_b.phar.tar/a.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %screate_new_phar_b.php on line %d
+
+Warning: include(phar://%screate_new_phar_b.phar.tar/a.php): failed to open stream: %s in %screate_new_phar_b.php on line %d
+
+Warning: include(): Failed opening 'phar://%screate_new_phar_b.phar.tar/a.php' for inclusion (include_path='%s') in %screate_new_phar_b.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/tar/delete.phpt b/ext/phar/tests/tar/delete.phpt
new file mode 100644
index 0000000..32b2b1e
--- /dev/null
+++ b/ext/phar/tests/tar/delete.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Phar: delete test, tar-based phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+$stub = "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$phar = new Phar($fname);
+$phar['a'] = 'a';
+$phar->setStub($stub);
+$phar->stopBuffering();
+
+echo file_get_contents($alias . '/a') . "\n";
+$phar->delete('a');
+echo file_get_contents($alias . '/a') . "\n";
+
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+a
+
+Warning: file_get_contents(phar://%sdelete.phar.tar/a): failed to open stream: phar error: "a" is not a file in phar "%sdelete.phar.tar" in %sdelete.php on line %d \ No newline at end of file
diff --git a/ext/phar/tests/tar/delete_in_phar.phpt b/ext/phar/tests/tar/delete_in_phar.phpt
new file mode 100644
index 0000000..91ef4a2
--- /dev/null
+++ b/ext/phar/tests/tar/delete_in_phar.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Phar: delete a file within a tar-based .phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<?php echo "This is a\n"; ?>';
+$phar['b.php'] = '<?php echo "This is b\n"; ?>';
+$phar['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+$phar->stopBuffering();
+
+include $alias . '/a.php';
+include $alias . '/b.php';
+include $alias . '/b/c.php';
+unlink($alias . '/b/c.php');
+
+?>
+===AFTER===
+<?php
+include $alias . '/a.php';
+include $alias . '/b.php';
+include $alias . '/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+This is a
+This is b
+This is b/c
+===AFTER===
+This is a
+This is b
+
+Warning: include(%sdelete_in_phar.phar.tar/b/c.php): failed to open stream: phar error: "b/c.php" is not a file in phar "%sdelete_in_phar.phar.tar" in %sdelete_in_phar.php on line %d
+
+Warning: include(): Failed opening 'phar://%sdelete_in_phar.phar.tar/b/c.php' for inclusion (include_path='%s') in %sdelete_in_phar.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/tar/delete_in_phar_b.phpt b/ext/phar/tests/tar/delete_in_phar_b.phpt
new file mode 100644
index 0000000..a67bf7a
--- /dev/null
+++ b/ext/phar/tests/tar/delete_in_phar_b.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Phar: delete a file within a tar-based .phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<?php echo "This is a\n"; ?>';
+$phar['b.php'] = '<?php echo "This is b\n"; ?>';
+$phar['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+$phar->stopBuffering();
+ini_set('phar.readonly', 1);
+
+include $alias . '/a.php';
+include $alias . '/b.php';
+include $alias . '/b/c.php';
+unlink($alias . '/b/c.php');
+
+?>
+===AFTER===
+<?php
+include $alias . '/a.php';
+include $alias . '/b.php';
+include $alias . '/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+This is a
+This is b
+This is b/c
+
+Warning: unlink(): phar error: write operations disabled by the php.ini setting phar.readonly in %sdelete_in_phar_b.php on line %d
+===AFTER===
+This is a
+This is b
+This is b/c
+
+===DONE===
diff --git a/ext/phar/tests/tar/delete_in_phar_confirm.phpt b/ext/phar/tests/tar/delete_in_phar_confirm.phpt
new file mode 100644
index 0000000..707bcbd
--- /dev/null
+++ b/ext/phar/tests/tar/delete_in_phar_confirm.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Phar: delete a file within a tar-based .phar (confirm disk file is changed)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<?php echo "This is a\n"; ?>';
+$phar['b.php'] = '<?php echo "This is b\n"; ?>';
+$phar['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+$phar->stopBuffering();
+
+include $alias . '/a.php';
+include $alias . '/b.php';
+include $alias . '/b/c.php';
+$md5 = md5_file($fname);
+unlink($alias . '/b/c.php');
+clearstatcache();
+$md52 = md5_file($fname);
+if ($md5 == $md52) echo 'file was not modified';
+?>
+===AFTER===
+<?php
+include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar/a.php';
+include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar/b.php';
+include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+This is a
+This is b
+This is b/c
+===AFTER===
+This is a
+This is b
+
+Warning: include(%sdelete_in_phar_confirm.phar.tar/b/c.php): failed to open stream: phar error: "b/c.php" is not a file in phar "%sdelete_in_phar_confirm.phar.tar" in %sdelete_in_phar_confirm.php on line %d
+
+Warning: include(): Failed opening 'phar://%sdelete_in_phar_confirm.phar.tar/b/c.php' for inclusion (include_path='%s') in %sdelete_in_phar_confirm.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/tar/dir.phpt b/ext/phar/tests/tar/dir.phpt
new file mode 100644
index 0000000..64d5d12
--- /dev/null
+++ b/ext/phar/tests/tar/dir.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Phar: mkdir/rmdir test tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.php';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php';
+$pname2 = 'phar://' . $fname2;
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php';
+$pname3 = 'phar://' . $fname3;
+$phar = new Phar($fname);
+var_dump($phar->isFileFormat(Phar::TAR));
+
+$phar->addEmptyDir('test');
+var_dump(isset($phar['.phar/stub.php']));
+var_dump($phar['test']->isDir());
+var_dump($phar['test/']->isDir());
+copy($fname, $fname2);
+mkdir($pname . '/another/dir/');
+var_dump($phar['another/dir']->isDir());
+rmdir($pname . '/another/dir/');
+copy($fname, $fname3);
+clearstatcache();
+var_dump(file_exists($pname . '/another/dir/'));
+var_dump(file_exists($pname2 . '/test/'));
+var_dump(file_exists($pname3 . '/another/dir/'));
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?>
+--EXPECT--
+bool(true)
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
diff --git a/ext/phar/tests/tar/exists_as_phar.phpt b/ext/phar/tests/tar/exists_as_phar.phpt
new file mode 100644
index 0000000..9a8cfc8
--- /dev/null
+++ b/ext/phar/tests/tar/exists_as_phar.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Phar: phar-based phar named with ".tar" fails
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$tname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://hio';
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<?php echo "This is a\n"; include "'.$alias.'/b.php"; ?>';
+$phar->setAlias('hio');
+$phar->addEmptyDir('test');
+$phar->stopBuffering();
+copy($fname, $tname);
+$phar->setAlias('hio2');
+
+try {
+ $p = new Phar($tname);
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+?>
+--EXPECTF--
+phar tar error: "%sexists_as_phar.phar.tar" already exists as a regular phar and must be deleted from disk prior to creating as a tar-based phar
+===DONE===
diff --git a/ext/phar/tests/tar/files/Net_URL-1.0.15.tgz b/ext/phar/tests/tar/files/Net_URL-1.0.15.tgz
new file mode 100644
index 0000000..976603d
--- /dev/null
+++ b/ext/phar/tests/tar/files/Net_URL-1.0.15.tgz
Binary files differ
diff --git a/ext/phar/tests/tar/files/P1-1.0.0.tgz b/ext/phar/tests/tar/files/P1-1.0.0.tgz
new file mode 100644
index 0000000..1d9cae4
--- /dev/null
+++ b/ext/phar/tests/tar/files/P1-1.0.0.tgz
Binary files differ
diff --git a/ext/phar/tests/tar/files/P1-1.0.0.tgz.pubkey b/ext/phar/tests/tar/files/P1-1.0.0.tgz.pubkey
new file mode 100644
index 0000000..eb59bdd
--- /dev/null
+++ b/ext/phar/tests/tar/files/P1-1.0.0.tgz.pubkey
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4drcwddPs6LmIbdT1ifT
+Ev8HXh1Fk1yNusCDoCX6mYkgqvCmx02F/9k5q7n6CPblTcF5mdDI8kcRrUHmyXtD
+9X0d7RN7BakZMPH5KPaNkXiXsI9YGSb39AnZgYw01n6u0W6Ohha+KwOsrxkKCF4u
+LjPLQAlM+3uD8y9Tz2fF+pAE901kHrd3ue7a5i5EtW0bzl5QfxnwFZXAO0StQ9dF
+slzibRH+1pFjMRxDnlgYmLQF6jMWm9Ty6x9UH9HZ3E3F9QZEQVXWT9y/pe30HcAX
+YxAGZjPIx19UNPF5C+Nps6MjxNRht0pGXTL9sptYoiNjRiXAS0y4FM+8K6xvBIOF
+ZQIDAQAB
+-----END PUBLIC KEY-----
diff --git a/ext/phar/tests/tar/files/Structures_Graph-1.0.3.tgz b/ext/phar/tests/tar/files/Structures_Graph-1.0.3.tgz
new file mode 100644
index 0000000..fa14f0c
--- /dev/null
+++ b/ext/phar/tests/tar/files/Structures_Graph-1.0.3.tgz
Binary files differ
diff --git a/ext/phar/tests/tar/files/badalias1.phar.tar b/ext/phar/tests/tar/files/badalias1.phar.tar
new file mode 100644
index 0000000..6cd4716
--- /dev/null
+++ b/ext/phar/tests/tar/files/badalias1.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/badalias2.phar.tar b/ext/phar/tests/tar/files/badalias2.phar.tar
new file mode 100644
index 0000000..5face85
--- /dev/null
+++ b/ext/phar/tests/tar/files/badalias2.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/badalias3.phar.tar b/ext/phar/tests/tar/files/badalias3.phar.tar
new file mode 100644
index 0000000..ab36e1f
--- /dev/null
+++ b/ext/phar/tests/tar/files/badalias3.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/badalias4.phar.tar b/ext/phar/tests/tar/files/badalias4.phar.tar
new file mode 100644
index 0000000..c54e31d
--- /dev/null
+++ b/ext/phar/tests/tar/files/badalias4.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/badalias5.phar.tar b/ext/phar/tests/tar/files/badalias5.phar.tar
new file mode 100644
index 0000000..dd52b6a
--- /dev/null
+++ b/ext/phar/tests/tar/files/badalias5.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/biglink.tar b/ext/phar/tests/tar/files/biglink.tar
new file mode 100644
index 0000000..43bbf58
--- /dev/null
+++ b/ext/phar/tests/tar/files/biglink.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/corrupt_tarmaker.php.inc b/ext/phar/tests/tar/files/corrupt_tarmaker.php.inc
new file mode 100644
index 0000000..b0eba6c
--- /dev/null
+++ b/ext/phar/tests/tar/files/corrupt_tarmaker.php.inc
@@ -0,0 +1,177 @@
+<?php
+// stolen from PEAR2_Pyrus_Developer_Creator_Tar by Greg Beaver, the original author, for use in unit tests
+class corrupt_tarmaker
+{
+ /**
+ * Path to archive file
+ *
+ * @var string
+ */
+ protected $archive;
+ /**
+ * Temporary stream used for creating the archive
+ *
+ * @var stream
+ */
+ protected $tmp;
+ protected $path;
+ protected $compress;
+ function __construct($path, $compress = 'zlib')
+ {
+ $this->compress = $compress;
+ if ($compress === 'bz2' && !function_exists('bzopen')) {
+ throw new PEAR2_Pyrus_Developer_Creator_Exception(
+ 'bzip2 extension not available');
+ }
+ if ($compress === 'zlib' && !function_exists('gzopen')) {
+ throw new PEAR2_Pyrus_Developer_Creator_Exception(
+ 'zlib extension not available');
+ }
+ $this->path = $path;
+ }
+
+ /**
+ * save a file inside this package
+ *
+ * This code is modified from Vincent Lascaux's File_Archive
+ * package, which is licensed under the LGPL license.
+ * @param string relative path within the package
+ * @param string|resource file contents or open file handle
+ */
+ function addFile($path, $fileOrStream, $stat = null, $corrupt = null)
+ {
+ clearstatcache();
+ if ($stat === null) {
+ if (is_resource($fileOrStream)) {
+ $stat = fstat($fileOrStream);
+ } else {
+ $stat = array(
+ 'mode' => 0x8000 + 0644,
+ 'uid' => 0,
+ 'gid' => 0,
+ 'size' => strlen($fileOrStream),
+ 'mtime' => time(),
+ );
+ }
+ }
+
+ $link = null;
+ if ($stat['mode'] & 0xA000 && $corrupt === 'symlink') {
+ $type = 2; // Symbolic Link
+ $link = $fileOrStream;
+ $stat['size'] = 0;
+ $fileOrStream = '';
+ } else if ($stat['mode'] & 0xA000) {
+ $type = 1; // Link
+ $link = $fileOrStream;
+ $stat['size'] = 0;
+ $fileOrStream = '';
+ } else if ($stat['mode'] & 0x4000) {
+ $type = 5; // Directory
+ } else if ($stat['mode'] & 0x8000) {
+ $type = 0; // Regular
+ } else {
+ $type = 9; // Unknown
+ }
+
+ $filePrefix = '';
+ if (strlen($path) > 255) {
+ throw new Exception(
+ "$path is too long, must be 255 characters or less"
+ );
+ } else if (strlen($path) > 100) {
+ $filePrefix = substr($path, 0, strlen($path)-100);
+ $path = substr($path, -100);
+ }
+
+ $block = pack('a100a8a8a8a12A12',
+ $path,
+ decoct($stat['mode']),
+ sprintf('%6s ',decoct($stat['uid'])),
+ sprintf('%6s ',decoct($stat['gid'])),
+ sprintf('%11s ',decoct($stat['size'])),
+ sprintf('%11s ',decoct($stat['mtime']))
+ );
+
+ $blockend = pack('a1a100a6a2a32a32a8a8a155a12',
+ $type,
+ $link,
+ 'ustar',
+ '00',
+ 'Pyrus',
+ 'Pyrus',
+ '',
+ '',
+ $filePrefix,
+ '');
+
+ $checkheader = array_merge(str_split($block), str_split($blockend));
+ if (!function_exists('_pear2tarchecksum')) {
+ function _pear2tarchecksum($a, $b) {return $a + ord($b);}
+ }
+ $checksum = 256; // 8 * ord(' ');
+ $checksum += array_reduce($checkheader, '_pear2tarchecksum');
+
+ if ($corrupt === 'checksum') $checksum++;
+ $checksum = pack('a8', sprintf('%6s ', decoct($checksum)));
+
+ fwrite($this->tmp, $block . $checksum . $blockend, 512);
+ if (is_resource($fileOrStream)) {
+ stream_copy_to_stream($fileOrStream, $this->tmp);
+ if ($stat['size'] % 512) {
+ fwrite($this->tmp, str_repeat("\0", 512 - $stat['size'] % 512));
+ }
+ } else {
+ fwrite($this->tmp, $fileOrStream);
+ if (strlen($fileOrStream) && !isset($link) && strlen($fileOrStream) % 512) {
+ fwrite($this->tmp, str_repeat("\0", 512 - strlen($fileOrStream) % 512));
+ }
+ }
+ }
+
+ /**
+ * Initialize the package creator
+ */
+ function init()
+ {
+ switch ($this->compress) {
+ case 'zlib' :
+ $this->tmp = gzopen($this->path, 'wb');
+ break;
+ case 'bz2' :
+ $this->tmp = bzopen($this->path, 'w');
+ break;
+ case 'none' :
+ $this->tmp = fopen($this->path, 'wb');
+ break;
+ default :
+ throw new Exception(
+ 'unknown compression type ' . $this->compress);
+ }
+ }
+
+ /**
+ * Create an internal directory, creating parent directories as needed
+ *
+ * @param string $dir
+ */
+ function mkdir($dir)
+ {
+ $this->addFile($dir, "", array(
+ 'mode' => 0x4000 + 0644,
+ 'uid' => 0,
+ 'gid' => 0,
+ 'size' => 0,
+ 'mtime' => time(),
+ ));
+ }
+
+ /**
+ * Finish saving the package
+ */
+ function close()
+ {
+ fwrite($this->tmp, pack('a1024', ''));
+ fclose($this->tmp);
+ }
+} \ No newline at end of file
diff --git a/ext/phar/tests/tar/files/frontcontroller.phar.inc b/ext/phar/tests/tar/files/frontcontroller.phar.inc
new file mode 100644
index 0000000..6f426e8
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller.phar.inc
@@ -0,0 +1,13 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller.phar.tar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller.phar.tar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a['index.php'] = 'here is my index';
+$a->setStub('<?php
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/tar/files/frontcontroller.phar.tar b/ext/phar/tests/tar/files/frontcontroller.phar.tar
new file mode 100644
index 0000000..02d8766
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/frontcontroller10.phar.inc b/ext/phar/tests/tar/files/frontcontroller10.phar.inc
new file mode 100644
index 0000000..5b132fa
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller10.phar.inc
@@ -0,0 +1,20 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller10.phar.tar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller10.phar.tar');
+$a['index.php'] = '<?php
+var_dump($_SERVER["PHP_SELF"]);
+var_dump($_SERVER["SCRIPT_NAME"]);
+var_dump($_SERVER["SCRIPT_FILENAME"]);
+var_dump($_SERVER["REQUEST_URI"]);
+var_dump($_SERVER["PHAR_PHP_SELF"]);
+var_dump($_SERVER["PHAR_SCRIPT_NAME"]);
+var_dump($_SERVER["PHAR_SCRIPT_FILENAME"]);
+var_dump($_SERVER["PHAR_REQUEST_URI"]);
+';
+$a->setStub('<?php
+Phar::mungServer(array("PHP_SELF", "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI", "OOPSIE"));
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/tar/files/frontcontroller10.phar.tar b/ext/phar/tests/tar/files/frontcontroller10.phar.tar
new file mode 100644
index 0000000..574d7cd
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller10.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/frontcontroller11.phar.inc b/ext/phar/tests/tar/files/frontcontroller11.phar.inc
new file mode 100644
index 0000000..2fa15f0
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller11.phar.inc
@@ -0,0 +1,20 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller11.phar.tar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller11.phar.tar');
+$a['index.php'] = '<?php
+var_dump($_SERVER["PHP_SELF"]);
+var_dump($_SERVER["SCRIPT_NAME"]);
+var_dump($_SERVER["SCRIPT_FILENAME"]);
+var_dump($_SERVER["REQUEST_URI"]);
+var_dump($_SERVER["PHAR_PHP_SELF"]);
+var_dump($_SERVER["PHAR_SCRIPT_NAME"]);
+var_dump($_SERVER["PHAR_SCRIPT_FILENAME"]);
+var_dump($_SERVER["PHAR_REQUEST_URI"]);
+';
+$a->setStub('<?php
+Phar::mungServer(array(array(), "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI"));
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/tar/files/frontcontroller11.phar.tar b/ext/phar/tests/tar/files/frontcontroller11.phar.tar
new file mode 100644
index 0000000..08cbdc1
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller11.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/frontcontroller12.phar.inc b/ext/phar/tests/tar/files/frontcontroller12.phar.inc
new file mode 100644
index 0000000..0a9422a
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller12.phar.inc
@@ -0,0 +1,20 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller12.phar.tar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller12.phar.tar');
+$a['index.php'] = '<?php
+var_dump($_SERVER["PHP_SELF"]);
+var_dump($_SERVER[b"SCRIPT_NAME"]);
+var_dump($_SERVER[b"SCRIPT_FILENAME"]);
+var_dump($_SERVER[b"REQUEST_URI"]);
+var_dump($_SERVER[b"PHAR_PHP_SELF"]);
+var_dump($_SERVER[b"PHAR_SCRIPT_NAME"]);
+var_dump($_SERVER[b"PHAR_SCRIPT_FILENAME"]);
+var_dump($_SERVER[b"PHAR_REQUEST_URI"]);
+';
+$a->setStub('<?php
+Phar::mungServer(array("PHP_SELF", "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI"));
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/tar/files/frontcontroller12.phar.tar b/ext/phar/tests/tar/files/frontcontroller12.phar.tar
new file mode 100644
index 0000000..e945e49
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller12.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/frontcontroller2.phar.inc b/ext/phar/tests/tar/files/frontcontroller2.phar.inc
new file mode 100644
index 0000000..8ae1171
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller2.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller2.phar.tar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller2.phar.tar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "a.php");
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/tar/files/frontcontroller2.phar.tar b/ext/phar/tests/tar/files/frontcontroller2.phar.tar
new file mode 100644
index 0000000..231e15a
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller2.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/frontcontroller3.phar.inc b/ext/phar/tests/tar/files/frontcontroller3.phar.inc
new file mode 100644
index 0000000..800f65e
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller3.phar.inc
@@ -0,0 +1,18 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller3.phar.tar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller3.phar.tar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+function s($a)
+{
+ static $b = array(b"/hi" => b"a.phps");
+ if (isset($b[$a])) return $b[$a];
+ return $a;
+}
+Phar::webPhar("whatever", "/index.php", null, array(), "s");
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/tar/files/frontcontroller3.phar.tar b/ext/phar/tests/tar/files/frontcontroller3.phar.tar
new file mode 100644
index 0000000..16853bd
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller3.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/frontcontroller4.phar.inc b/ext/phar/tests/tar/files/frontcontroller4.phar.inc
new file mode 100644
index 0000000..bfb9b41
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller4.phar.inc
@@ -0,0 +1,18 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller4.phar.tar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller4.phar.tar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+function s($a)
+{
+ static $b = array(b"/hi" => false);
+ if (isset($b[$a])) return $b[$a];
+ return $a;
+}
+Phar::webPhar("whatever", "index.php", null, array(), "s");
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/tar/files/frontcontroller4.phar.tar b/ext/phar/tests/tar/files/frontcontroller4.phar.tar
new file mode 100644
index 0000000..5a1d4ee
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller4.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/frontcontroller5.phar.inc b/ext/phar/tests/tar/files/frontcontroller5.phar.inc
new file mode 100644
index 0000000..d6204c7
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller5.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller5.phar.tar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller5.phar.tar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", null, array(0 => "oops"));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/tar/files/frontcontroller5.phar.tar b/ext/phar/tests/tar/files/frontcontroller5.phar.tar
new file mode 100644
index 0000000..6053eb2
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller5.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/frontcontroller6.phar.inc b/ext/phar/tests/tar/files/frontcontroller6.phar.inc
new file mode 100644
index 0000000..a5a6e30
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller6.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller6.phar.tar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller6.phar.tar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", null, array("php" => 100));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/tar/files/frontcontroller6.phar.tar b/ext/phar/tests/tar/files/frontcontroller6.phar.tar
new file mode 100644
index 0000000..eb3e44c
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller6.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/frontcontroller7.phar.inc b/ext/phar/tests/tar/files/frontcontroller7.phar.inc
new file mode 100644
index 0000000..88121f5
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller7.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller7.phar.tar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller7.phar.tar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", null, array("php" => null));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/tar/files/frontcontroller7.phar.tar b/ext/phar/tests/tar/files/frontcontroller7.phar.tar
new file mode 100644
index 0000000..b59d052
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller7.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/frontcontroller8.phar.inc b/ext/phar/tests/tar/files/frontcontroller8.phar.inc
new file mode 100644
index 0000000..f51a762
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller8.phar.inc
@@ -0,0 +1,13 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller8.phar.tar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller8.phar.tar');
+$a['a.phps'] = 'hio1';
+$a['a.jpg'] = 'hio2';
+$a['a.php'] = '<?php function hio(){}';
+$a['fronk.gronk'] = 'hio3';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", null, array("jpg" => "foo/bar", "phps" => Phar::PHP, "php" => Phar::PHPS));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/tar/files/frontcontroller8.phar.tar b/ext/phar/tests/tar/files/frontcontroller8.phar.tar
new file mode 100644
index 0000000..3440a7f
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller8.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/frontcontroller9.phar.inc b/ext/phar/tests/tar/files/frontcontroller9.phar.inc
new file mode 100644
index 0000000..758ce4f
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller9.phar.inc
@@ -0,0 +1,14 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller9.phar.tar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller9.phar.tar');
+$a['a.phps'] = 'hio1';
+$a['a.jpg'] = 'hio2';
+$a['a.php'] = '<?php function hio(){}';
+$a['fronk.gronk'] = 'hio3';
+$a->setStub('<?php
+Phar::mungServer(array());
+Phar::webPhar("whatever", "index.php", null, array("jpg" => "foo/bar", "phps" => Phar::PHP, "php" => Phar::PHPS));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/tar/files/frontcontroller9.phar.tar b/ext/phar/tests/tar/files/frontcontroller9.phar.tar
new file mode 100644
index 0000000..15e95b1
--- /dev/null
+++ b/ext/phar/tests/tar/files/frontcontroller9.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/links.phar.tar b/ext/phar/tests/tar/files/links.phar.tar
new file mode 100644
index 0000000..4646100
--- /dev/null
+++ b/ext/phar/tests/tar/files/links.phar.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/links.tar b/ext/phar/tests/tar/files/links.tar
new file mode 100644
index 0000000..6cd22df
--- /dev/null
+++ b/ext/phar/tests/tar/files/links.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/make.dangerous.tar.php.inc b/ext/phar/tests/tar/files/make.dangerous.tar.php.inc
new file mode 100644
index 0000000..deeaa41
--- /dev/null
+++ b/ext/phar/tests/tar/files/make.dangerous.tar.php.inc
@@ -0,0 +1,170 @@
+<?php
+// stolen from PEAR2_Pyrus_Developer_Creator_Tar by Greg Beaver, the original author, for use in unit tests
+// this tarmaker makes a malicious tar with a header designed to overflow the buffer
+class danger_tarmaker
+{
+ /**
+ * Path to archive file
+ *
+ * @var string
+ */
+ protected $archive;
+ /**
+ * Temporary stream used for creating the archive
+ *
+ * @var stream
+ */
+ protected $tmp;
+ protected $path;
+ protected $compress;
+ function __construct($path, $compress = 'zlib')
+ {
+ $this->compress = $compress;
+ if ($compress === 'bz2' && !function_exists('bzopen')) {
+ throw new PEAR2_Pyrus_Developer_Creator_Exception(
+ 'bzip2 extension not available');
+ }
+ if ($compress === 'zlib' && !function_exists('gzopen')) {
+ throw new PEAR2_Pyrus_Developer_Creator_Exception(
+ 'zlib extension not available');
+ }
+ $this->path = $path;
+ }
+
+ /**
+ * save a file inside this package
+ *
+ * This code is modified from Vincent Lascaux's File_Archive
+ * package, which is licensed under the LGPL license.
+ * @param string relative path within the package
+ * @param string|resource file contents or open file handle
+ */
+ function addFile($path, $fileOrStream, $stat = null)
+ {
+ clearstatcache();
+ if ($stat === null) {
+ if (is_resource($fileOrStream)) {
+ $stat = fstat($fileOrStream);
+ } else {
+ $stat = array(
+ 'mode' => 0x8000 + 0644,
+ 'uid' => 0,
+ 'gid' => 0,
+ 'size' => strlen($fileOrStream),
+ 'mtime' => time(),
+ );
+ }
+ }
+
+ $link = null;
+ if ($stat['mode'] & 0x4000) {
+ $type = 5; // Directory
+ } else if ($stat['mode'] & 0x8000) {
+ $type = 0; // Regular
+ } else if ($stat['mode'] & 0xA000) {
+ $type = 1; // Link
+ $link = @readlink($current);
+ } else {
+ $type = 9; // Unknown
+ }
+
+ $filePrefix = '';
+ if (strlen($path) > 255) {
+ throw new Exception(
+ "$path is too long, must be 255 characters or less"
+ );
+ } else if (strlen($path) > 100) {
+ $filePrefix = substr($path, 0, strlen($path)-100);
+ $path = substr($path, -100);
+ }
+
+ $block = pack('a100a8a8a8a12A12',
+ $path,
+ '12345678', // have a mode that allows the name to overflow
+ sprintf('%6s ',decoct($stat['uid'])),
+ sprintf('%6s ',decoct($stat['gid'])),
+ sprintf('%11s ',decoct($stat['size'])),
+ sprintf('%11s ',decoct($stat['mtime']))
+ );
+
+ $blockend = pack('a1a100a6a2a32a32a8a8a155a12',
+ $type,
+ $link,
+ 'ustar',
+ '00',
+ 'Pyrus',
+ 'Pyrus',
+ '',
+ '',
+ $filePrefix,
+ '123456789abc'); // malicious block
+
+ $checkheader = array_merge(str_split($block), str_split($blockend));
+ if (!function_exists('_pear2tarchecksum')) {
+ function _pear2tarchecksum($a, $b) {return $a + ord($b);}
+ }
+ $checksum = 256; // 8 * ord(' ');
+ $checksum += array_reduce($checkheader, '_pear2tarchecksum');
+
+ $checksum = pack('a8', sprintf('%6s ', decoct($checksum)));
+
+ fwrite($this->tmp, (binary)$block . $checksum . $blockend, 512);
+ if (is_resource($fileOrStream)) {
+ stream_copy_to_stream($fileOrStream, $this->tmp);
+ if ($stat['size'] % 512) {
+ fwrite($this->tmp, (binary)str_repeat("\0", 512 - $stat['size'] % 512));
+ }
+ } else {
+ fwrite($this->tmp, (binary)$fileOrStream);
+ if (strlen($fileOrStream) % 512) {
+ fwrite($this->tmp, (binary)str_repeat("\0", 512 - strlen($fileOrStream) % 512));
+ }
+ }
+ }
+
+ /**
+ * Initialize the package creator
+ */
+ function init()
+ {
+ switch ($this->compress) {
+ case 'zlib' :
+ $this->tmp = gzopen($this->path, 'wb');
+ break;
+ case 'bz2' :
+ $this->tmp = bzopen($this->path, 'w');
+ break;
+ case 'none' :
+ $this->tmp = fopen($this->path, 'wb');
+ break;
+ default :
+ throw new Exception(
+ 'unknown compression type ' . $this->compress);
+ }
+ }
+
+ /**
+ * Create an internal directory, creating parent directories as needed
+ *
+ * @param string $dir
+ */
+ function mkdir($dir)
+ {
+ $this->addFile($dir, "", array(
+ 'mode' => 0x4000 + 0644,
+ 'uid' => 0,
+ 'gid' => 0,
+ 'size' => 0,
+ 'mtime' => time(),
+ ));
+ }
+
+ /**
+ * Finish saving the package
+ */
+ function close()
+ {
+ fwrite($this->tmp, pack('a1024', ''));
+ fclose($this->tmp);
+ }
+} \ No newline at end of file
diff --git a/ext/phar/tests/tar/files/make_invalid_tar.php.inc b/ext/phar/tests/tar/files/make_invalid_tar.php.inc
new file mode 100644
index 0000000..413dd7b
--- /dev/null
+++ b/ext/phar/tests/tar/files/make_invalid_tar.php.inc
@@ -0,0 +1,9 @@
+<?php
+include dirname(__FILE__) . '/tarmaker.php.inc';
+class corrupter extends tarmaker {
+function close()
+{
+ fwrite($this->tmp, (binary)'oopsie');
+ fclose($this->tmp);
+}
+} \ No newline at end of file
diff --git a/ext/phar/tests/tar/files/subdirlink.tar b/ext/phar/tests/tar/files/subdirlink.tar
new file mode 100644
index 0000000..5463a49
--- /dev/null
+++ b/ext/phar/tests/tar/files/subdirlink.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/tarmaker.php.inc b/ext/phar/tests/tar/files/tarmaker.php.inc
new file mode 100644
index 0000000..9b8d348
--- /dev/null
+++ b/ext/phar/tests/tar/files/tarmaker.php.inc
@@ -0,0 +1,169 @@
+<?php
+// stolen from PEAR2_Pyrus_Developer_Creator_Tar by Greg Beaver, the original author, for use in unit tests
+class tarmaker
+{
+ /**
+ * Path to archive file
+ *
+ * @var string
+ */
+ protected $archive;
+ /**
+ * Temporary stream used for creating the archive
+ *
+ * @var stream
+ */
+ protected $tmp;
+ protected $path;
+ protected $compress;
+ function __construct($path, $compress = 'zlib')
+ {
+ $this->compress = $compress;
+ if ($compress === 'bz2' && !function_exists('bzopen')) {
+ throw new PEAR2_Pyrus_Developer_Creator_Exception(
+ 'bzip2 extension not available');
+ }
+ if ($compress === 'zlib' && !function_exists('gzopen')) {
+ throw new PEAR2_Pyrus_Developer_Creator_Exception(
+ 'zlib extension not available');
+ }
+ $this->path = $path;
+ }
+
+ /**
+ * save a file inside this package
+ *
+ * This code is modified from Vincent Lascaux's File_Archive
+ * package, which is licensed under the LGPL license.
+ * @param string relative path within the package
+ * @param string|resource file contents or open file handle
+ */
+ function addFile($path, $fileOrStream, $stat = null)
+ {
+ clearstatcache();
+ if ($stat === null) {
+ if (is_resource($fileOrStream)) {
+ $stat = fstat($fileOrStream);
+ } else {
+ $stat = array(
+ 'mode' => 0x8000 + 0644,
+ 'uid' => 0,
+ 'gid' => 0,
+ 'size' => strlen($fileOrStream),
+ 'mtime' => time(),
+ );
+ }
+ }
+
+ $link = null;
+ if ($stat['mode'] & 0x4000) {
+ $type = 5; // Directory
+ } else if ($stat['mode'] & 0x8000) {
+ $type = 0; // Regular
+ } else if ($stat['mode'] & 0xA000) {
+ $type = 1; // Link
+ $link = @readlink($current);
+ } else {
+ $type = 9; // Unknown
+ }
+
+ $filePrefix = '';
+ if (strlen($path) > 255) {
+ throw new Exception(
+ "$path is too long, must be 255 characters or less"
+ );
+ } else if (strlen($path) > 100) {
+ $filePrefix = substr($path, 0, strlen($path)-100);
+ $path = substr($path, -100);
+ }
+
+ $block = pack('a100a8a8a8a12A12',
+ $path,
+ decoct($stat['mode']),
+ sprintf('%6s ',decoct($stat['uid'])),
+ sprintf('%6s ',decoct($stat['gid'])),
+ sprintf('%11s ',decoct($stat['size'])),
+ sprintf('%11s ',decoct($stat['mtime']))
+ );
+
+ $blockend = pack('a1a100a6a2a32a32a8a8a155a12',
+ $type,
+ $link,
+ 'ustar',
+ '00',
+ 'Pyrus',
+ 'Pyrus',
+ '',
+ '',
+ $filePrefix,
+ '');
+
+ $checkheader = array_merge(str_split($block), str_split($blockend));
+ if (!function_exists('_pear2tarchecksum')) {
+ function _pear2tarchecksum($a, $b) {return $a + ord($b);}
+ }
+ $checksum = 256; // 8 * ord(' ');
+ $checksum += array_reduce($checkheader, '_pear2tarchecksum');
+
+ $checksum = pack('a8', sprintf('%6s ', decoct($checksum)));
+
+ fwrite($this->tmp, (binary)$block . $checksum . $blockend, 512);
+ if (is_resource($fileOrStream)) {
+ stream_copy_to_stream($fileOrStream, $this->tmp);
+ if ($stat['size'] % 512) {
+ fwrite($this->tmp, (binary)str_repeat("\0", 512 - $stat['size'] % 512));
+ }
+ } else {
+ fwrite($this->tmp, (binary)$fileOrStream);
+ if (strlen($fileOrStream) % 512) {
+ fwrite($this->tmp, (binary)str_repeat("\0", 512 - strlen($fileOrStream) % 512));
+ }
+ }
+ }
+
+ /**
+ * Initialize the package creator
+ */
+ function init()
+ {
+ switch ($this->compress) {
+ case 'zlib' :
+ $this->tmp = gzopen($this->path, 'wb');
+ break;
+ case 'bz2' :
+ $this->tmp = bzopen($this->path, 'w');
+ break;
+ case 'none' :
+ $this->tmp = fopen($this->path, 'wb');
+ break;
+ default :
+ throw new Exception(
+ 'unknown compression type ' . $this->compress);
+ }
+ }
+
+ /**
+ * Create an internal directory, creating parent directories as needed
+ *
+ * @param string $dir
+ */
+ function mkdir($dir)
+ {
+ $this->addFile($dir, "", array(
+ 'mode' => 0x4000 + 0644,
+ 'uid' => 0,
+ 'gid' => 0,
+ 'size' => 0,
+ 'mtime' => time(),
+ ));
+ }
+
+ /**
+ * Finish saving the package
+ */
+ function close()
+ {
+ fwrite($this->tmp, pack('a1024', ''));
+ fclose($this->tmp);
+ }
+} \ No newline at end of file
diff --git a/ext/phar/tests/tar/files/tinylink.tar b/ext/phar/tests/tar/files/tinylink.tar
new file mode 100644
index 0000000..741b56c
--- /dev/null
+++ b/ext/phar/tests/tar/files/tinylink.tar
Binary files differ
diff --git a/ext/phar/tests/tar/files/trunc.tar b/ext/phar/tests/tar/files/trunc.tar
new file mode 100644
index 0000000..2156b5c
--- /dev/null
+++ b/ext/phar/tests/tar/files/trunc.tar
Binary files differ
diff --git a/ext/phar/tests/tar/frontcontroller1.phar.phpt b/ext/phar/tests/tar/frontcontroller1.phar.phpt
new file mode 100644
index 0000000..7715816
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller1.phar.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar front controller other tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller1.phar.php
+REQUEST_URI=/frontcontroller1.phar.php/a.jpg
+PATH_INFO=/a.jpg
+--FILE_EXTERNAL--
+files/frontcontroller.phar.tar
+--EXPECTHEADERS--
+Content-type: image/jpeg
+Content-length: 3
+--EXPECT--
+hio
diff --git a/ext/phar/tests/tar/frontcontroller10.phar.phpt b/ext/phar/tests/tar/frontcontroller10.phar.phpt
new file mode 100644
index 0000000..f1fc6e3
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller10.phar.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Phar front controller rewrite array invalid tar-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller10.phar.php
+REQUEST_URI=/frontcontroller10.phar.php/hi
+PATH_INFO=/hi
+--FILE_EXTERNAL--
+files/frontcontroller4.phar.tar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+Status: 403 Access Denied
+--EXPECT--
+<html>
+ <head>
+ <title>Access Denied</title>
+ </head>
+ <body>
+ <h1>403 - File /hi Access Denied</h1>
+ </body>
+</html> \ No newline at end of file
diff --git a/ext/phar/tests/tar/frontcontroller11.phar.phpt b/ext/phar/tests/tar/frontcontroller11.phar.phpt
new file mode 100644
index 0000000..2b0d15b
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller11.phar.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller mime type extension is not a string tar-based
+--INI--
+default_charset=
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller11.phar.php
+REQUEST_URI=/frontcontroller11.phar.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller5.phar.tar
+--EXPECTHEADERS--
+Content-type: text/html
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Key of MIME type overrides array must be a file extension, was "0"' in %sfrontcontroller11.phar.php:2
+Stack trace:
+#0 %sfrontcontroller11.phar.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+ thrown in %sfrontcontroller11.phar.php on line 2 \ No newline at end of file
diff --git a/ext/phar/tests/tar/frontcontroller12.phar.phpt b/ext/phar/tests/tar/frontcontroller12.phar.phpt
new file mode 100644
index 0000000..2086856
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller12.phar.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Phar front controller mime type unknown int tar-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller12.phar.php
+REQUEST_URI=/frontcontroller12.phar.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller6.phar.tar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Unknown mime type specifier used, only Phar::PHP, Phar::PHPS and a mime type string are allowed' in %sfrontcontroller12.phar.php:2
+Stack trace:
+#0 %sfrontcontroller12.phar.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+ thrown in %sfrontcontroller12.phar.php on line 2 \ No newline at end of file
diff --git a/ext/phar/tests/tar/frontcontroller13.phar.phpt b/ext/phar/tests/tar/frontcontroller13.phar.phpt
new file mode 100644
index 0000000..ce7620a
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller13.phar.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Phar front controller mime type not string/int tar-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller13.phar.php
+REQUEST_URI=/frontcontroller13.phar.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller7.phar.tar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Unknown mime type specifier used (not a string or int), only Phar::PHP, Phar::PHPS and a mime type string are allowed' in %sfrontcontroller13.phar.php:2
+Stack trace:
+#0 %sfrontcontroller13.phar.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+ thrown in %sfrontcontroller13.phar.php on line 2 \ No newline at end of file
diff --git a/ext/phar/tests/tar/frontcontroller14.phar.phpt b/ext/phar/tests/tar/frontcontroller14.phar.phpt
new file mode 100644
index 0000000..c40f9b6
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller14.phar.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar front controller mime type override, other tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller14.phar.php
+REQUEST_URI=/frontcontroller14.phar.php/a.jpg
+PATH_INFO=/a.jpg
+--FILE_EXTERNAL--
+files/frontcontroller8.phar.tar
+--EXPECTHEADERS--
+Content-type: foo/bar
+Content-length: 4
+--EXPECT--
+hio2
diff --git a/ext/phar/tests/tar/frontcontroller15.phar.phpt b/ext/phar/tests/tar/frontcontroller15.phar.phpt
new file mode 100644
index 0000000..2147121
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller15.phar.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Phar front controller mime type override, Phar::PHPS tar-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller15.phar.php
+REQUEST_URI=/frontcontroller15.phar.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller8.phar.tar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+<code><span style="color: #000000">
+<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
+</span>
+</code>
+
diff --git a/ext/phar/tests/tar/frontcontroller16.phar.phpt b/ext/phar/tests/tar/frontcontroller16.phar.phpt
new file mode 100644
index 0000000..caa0c31
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller16.phar.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller mime type override, Phar::PHP tar-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller16.phar.php
+REQUEST_URI=/frontcontroller16.phar.php/a.phps
+PATH_INFO=/a.phps
+--FILE_EXTERNAL--
+files/frontcontroller8.phar.tar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+hio1
+
diff --git a/ext/phar/tests/tar/frontcontroller17.phar.phpt b/ext/phar/tests/tar/frontcontroller17.phar.phpt
new file mode 100644
index 0000000..17d04ba
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller17.phar.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller mime type unknown tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller17.phar.php
+REQUEST_URI=/frontcontroller17.phar.php/fronk.gronk
+PATH_INFO=/fronk.gronk
+--FILE_EXTERNAL--
+files/frontcontroller8.phar.tar
+--EXPECTHEADERS--
+Content-type: application/octet-stream
+Content-length: 4
+--EXPECT--
+hio3
+
diff --git a/ext/phar/tests/tar/frontcontroller18.phar.phpt b/ext/phar/tests/tar/frontcontroller18.phar.phpt
new file mode 100644
index 0000000..c52ce29
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller18.phar.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller $_SERVER munging failure tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller18.phar.php
+REQUEST_URI=/frontcontroller18.phar.php/fronk.gronk
+PATH_INFO=/fronk.gronk
+--FILE_EXTERNAL--
+files/frontcontroller9.phar.tar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'No values passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller18.phar.php:2
+Stack trace:
+#0 %sfrontcontroller18.phar.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller18.phar.php on line 2
diff --git a/ext/phar/tests/tar/frontcontroller19.phar.phpt b/ext/phar/tests/tar/frontcontroller19.phar.phpt
new file mode 100644
index 0000000..6b07438
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller19.phar.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller $_SERVER munging failure 2 tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller19.phar.php
+REQUEST_URI=/frontcontroller19.phar.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller10.phar.tar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Too many values passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller19.phar.php:2
+Stack trace:
+#0 %sfrontcontroller19.phar.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller19.phar.php on line 2
diff --git a/ext/phar/tests/tar/frontcontroller2.phar.phpt b/ext/phar/tests/tar/frontcontroller2.phar.phpt
new file mode 100644
index 0000000..82070e3
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller2.phar.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller PHP test tar-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller2.phar.php
+REQUEST_URI=/frontcontroller2.phar.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar.tar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+hio
diff --git a/ext/phar/tests/tar/frontcontroller20.phar.phpt b/ext/phar/tests/tar/frontcontroller20.phar.phpt
new file mode 100644
index 0000000..3cc470d
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller20.phar.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller $_SERVER munging failure 3 tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller20.phar.php
+REQUEST_URI=/frontcontroller20.phar.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller11.phar.tar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Non-string value passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller20.phar.php:2
+Stack trace:
+#0 %sfrontcontroller20.phar.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller20.phar.php on line 2
diff --git a/ext/phar/tests/tar/frontcontroller21.phar.phpt b/ext/phar/tests/tar/frontcontroller21.phar.phpt
new file mode 100644
index 0000000..bb93996
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller21.phar.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Phar front controller $_SERVER munging success tar-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller21.phar.php
+REQUEST_URI=/frontcontroller21.phar.php/index.php?test=hi
+PATH_INFO=/index.php
+QUERY_STRING=test=hi
+--FILE_EXTERNAL--
+files/frontcontroller12.phar.tar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+%unicode|string%(10) "/index.php"
+string(10) "/index.php"
+string(%d) "phar://%sfrontcontroller21.phar.php/index.php"
+string(18) "/index.php?test=hi"
+string(37) "/frontcontroller21.phar.php/index.php"
+string(27) "/frontcontroller21.phar.php"
+string(%d) "%sfrontcontroller21.phar.php"
+string(45) "/frontcontroller21.phar.php/index.php?test=hi" \ No newline at end of file
diff --git a/ext/phar/tests/tar/frontcontroller3.phar.phpt b/ext/phar/tests/tar/frontcontroller3.phar.phpt
new file mode 100644
index 0000000..06a4948
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller3.phar.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Phar front controller phps tar-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller3.phar.php
+REQUEST_URI=/frontcontroller3.phar.php/a.phps
+PATH_INFO=/a.phps
+--FILE_EXTERNAL--
+files/frontcontroller.phar.tar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+<code><span style="color: #000000">
+<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
+</span>
+</code>
diff --git a/ext/phar/tests/tar/frontcontroller4.phar.phpt b/ext/phar/tests/tar/frontcontroller4.phar.phpt
new file mode 100644
index 0000000..db4846c
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller4.phar.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Phar front controller index.php relocate (no /) tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller4.phar.php
+REQUEST_URI=/frontcontroller4.phar.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar.tar
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller4.phar.php/index.php
+--EXPECT--
diff --git a/ext/phar/tests/tar/frontcontroller5.phar.phpt b/ext/phar/tests/tar/frontcontroller5.phar.phpt
new file mode 100644
index 0000000..534e66a
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller5.phar.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar front controller index.php relocate tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller5.phar.php
+REQUEST_URI=/frontcontroller5.phar.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller.phar.tar
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller5.phar.php/index.php
+--EXPECT--
diff --git a/ext/phar/tests/tar/frontcontroller6.phar.phpt b/ext/phar/tests/tar/frontcontroller6.phar.phpt
new file mode 100644
index 0000000..5375bee
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller6.phar.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller 404 tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller6.phar.php
+REQUEST_URI=/frontcontroller6.phar.php/notfound.php
+PATH_INFO=/notfound.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar.tar
+--EXPECTHEADERS--
+Status: 404 Not Found
+--EXPECT--
+<html>
+ <head>
+ <title>File Not Found</title>
+ </head>
+ <body>
+ <h1>404 - File /notfound.php Not Found</h1>
+ </body>
+</html> \ No newline at end of file
diff --git a/ext/phar/tests/tar/frontcontroller7.phar.phpt b/ext/phar/tests/tar/frontcontroller7.phar.phpt
new file mode 100644
index 0000000..3b73f20
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller7.phar.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar front controller alternate index file tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller7.phar.php
+REQUEST_URI=/frontcontroller7.phar.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller2.phar.tar
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller7.phar.php/a.php
+--EXPECT--
diff --git a/ext/phar/tests/tar/frontcontroller8.phar.phpt b/ext/phar/tests/tar/frontcontroller8.phar.phpt
new file mode 100644
index 0000000..19844cb
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller8.phar.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller no index file 404 tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller8.phar.php
+REQUEST_URI=/frontcontroller8.phar.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller3.phar.tar
+--EXPECTHEADERS--
+Status: 404 Not Found
+--EXPECT--
+<html>
+ <head>
+ <title>File Not Found</title>
+ </head>
+ <body>
+ <h1>404 - File /index.php Not Found</h1>
+ </body>
+</html> \ No newline at end of file
diff --git a/ext/phar/tests/tar/frontcontroller9.phar.phpt b/ext/phar/tests/tar/frontcontroller9.phar.phpt
new file mode 100644
index 0000000..48e655c
--- /dev/null
+++ b/ext/phar/tests/tar/frontcontroller9.phar.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Phar front controller rewrite array tar-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller9.phar.php
+REQUEST_URI=/frontcontroller9.phar.php/hi
+PATH_INFO=/hi
+--FILE_EXTERNAL--
+files/frontcontroller3.phar.tar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+<code><span style="color: #000000">
+<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
+</span>
+</code>
diff --git a/ext/phar/tests/tar/links.phpt b/ext/phar/tests/tar/links.phpt
new file mode 100644
index 0000000..d702cac
--- /dev/null
+++ b/ext/phar/tests/tar/links.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Phar: tar with hard link and symbolic link
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar';
+copy(dirname(__FILE__) . '/files/links.tar', $fname);
+try {
+ $p = new PharData($fname);
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+var_dump($p['testit/link']->getContent());
+var_dump($p['testit/hard']->getContent());
+var_dump($p['testit/file']->getContent());
+$p['testit/link'] = 'overwriting';
+var_dump($p['testit/link']->getContent());
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar');
+?>
+--EXPECT--
+string(3) "hi
+"
+string(3) "hi
+"
+string(3) "hi
+"
+string(11) "overwriting"
+===DONE===
diff --git a/ext/phar/tests/tar/links2.phpt b/ext/phar/tests/tar/links2.phpt
new file mode 100644
index 0000000..1939e00
--- /dev/null
+++ b/ext/phar/tests/tar/links2.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Phar: tar with hard link to nowhere
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar';
+$pname = 'phar://' . $fname;
+
+include dirname(__FILE__) . '/files/corrupt_tarmaker.php.inc';
+$a = new corrupt_tarmaker($fname, 'none');
+$a->init();
+$a->addFile('hardlink', 'internal/file.txt', array(
+ 'mode' => 0xA000 + 0644,
+ 'uid' => 0,
+ 'gid' => 0,
+ 'size' => 0,
+ 'mtime' => time(),
+ ));
+$a->close();
+
+try {
+ $p = new PharData($fname);
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar');
+?>
+--EXPECTF--
+phar error: "%slinks2.tar" is a corrupted tar file - hard link to non-existent file "internal/file.txt"
+===DONE===
diff --git a/ext/phar/tests/tar/links3.phpt b/ext/phar/tests/tar/links3.phpt
new file mode 100644
index 0000000..def399e
--- /dev/null
+++ b/ext/phar/tests/tar/links3.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar: tar with link to absolute path
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+try {
+ $p = new PharData(dirname(__FILE__) . '/files/biglink.tar');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+echo $p['file.txt']->getContent();
+echo $p['my/file']->getContent();
+?>
+===DONE===
+--EXPECT--
+my file
+my file
+===DONE===
diff --git a/ext/phar/tests/tar/links4.phpt b/ext/phar/tests/tar/links4.phpt
new file mode 100644
index 0000000..1d658a7
--- /dev/null
+++ b/ext/phar/tests/tar/links4.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar: tar with link to root directory file from root directory file
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+try {
+ $p = new PharData(dirname(__FILE__) . '/files/tinylink.tar');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+echo $p['file.txt']->getContent();
+echo $p['link.txt']->getContent();
+?>
+===DONE===
+--EXPECT--
+hi
+hi
+===DONE===
diff --git a/ext/phar/tests/tar/links5.phpt b/ext/phar/tests/tar/links5.phpt
new file mode 100644
index 0000000..6d11d3e
--- /dev/null
+++ b/ext/phar/tests/tar/links5.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar: tar with relative link to subdirectory file from subdirectory file
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+try {
+ $p = new PharData(dirname(__FILE__) . '/files/subdirlink.tar');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+echo $p['hi/test.txt']->getContent();
+echo $p['hi/link.txt']->getContent();
+?>
+===DONE===
+--EXPECT--
+hi
+hi
+===DONE===
diff --git a/ext/phar/tests/tar/links6.phpt b/ext/phar/tests/tar/links6.phpt
new file mode 100644
index 0000000..95fd8fb
--- /dev/null
+++ b/ext/phar/tests/tar/links6.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Phar: test nested linked files
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+?>
+--INI--
+phar.require_hash=0
+--FILE--
+<?php
+echo file_get_contents('phar://' . dirname(__FILE__) . '/files/links.phar.tar/link2');
+echo file_get_contents('phar://' . dirname(__FILE__) . '/files/links.phar.tar/link1');
+echo file_get_contents('phar://' . dirname(__FILE__) . '/files/links.phar.tar/testit.txt');
+
+$a = fopen('phar://' . dirname(__FILE__) . '/files/links.phar.tar/link2', 'r');
+fseek($a, 3);
+echo fread($a, 10);
+?>
+===DONE===
+--EXPECT--
+hi there
+
+hi there
+
+hi there
+
+there
+
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/tar/open_for_write_existing.phpt b/ext/phar/tests/tar/open_for_write_existing.phpt
new file mode 100644
index 0000000..a034b8f
--- /dev/null
+++ b/ext/phar/tests/tar/open_for_write_existing.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file) tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php __HALT_COMPILER(); ?>");
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+
+$phar->stopBuffering();
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, b'extra');
+fclose($fp);
+
+include $alias . '/b/c.php';
+
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECT--
+extra
+===DONE===
diff --git a/ext/phar/tests/tar/open_for_write_existing_b.phpt b/ext/phar/tests/tar/open_for_write_existing_b.phpt
new file mode 100644
index 0000000..fa631e6
--- /dev/null
+++ b/ext/phar/tests/tar/open_for_write_existing_b.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file) tar-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php __HALT_COMPILER(); ?>");
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+
+$phar->stopBuffering();
+ini_set('phar.readonly', 1);
+
+function err_handler($errno, $errstr, $errfile, $errline) {
+ echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
+}
+
+set_error_handler("err_handler", E_RECOVERABLE_ERROR);
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, b'extra');
+fclose($fp);
+
+include $alias . '/b/c.php';
+
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_existing_b.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b.php on line %d
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_existing_b.php on line %d
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in %sopen_for_write_existing_b.php on line %d
+This is b/c
+
+===DONE===
diff --git a/ext/phar/tests/tar/open_for_write_existing_b_5_2.phpt b/ext/phar/tests/tar/open_for_write_existing_b_5_2.phpt
new file mode 100644
index 0000000..a6fea06
--- /dev/null
+++ b/ext/phar/tests/tar/open_for_write_existing_b_5_2.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file) tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php __HALT_COMPILER(); ?>");
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+
+$phar->stopBuffering();
+ini_set('phar.readonly', 1);
+
+function err_handler($errno, $errstr, $errfile, $errline) {
+ echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
+}
+
+set_error_handler("err_handler", E_RECOVERABLE_ERROR);
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+
+include $alias . '/b/c.php';
+
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_existing_b_5_2.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b_5_2.php on line %d
+
+Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_existing_b_5_2.php on line %d
+
+Warning: fclose(): supplied argument is not a valid stream resource in %spen_for_write_existing_b_5_2.php on line %d
+This is b/c
+
+===DONE===
diff --git a/ext/phar/tests/tar/open_for_write_existing_c.phpt b/ext/phar/tests/tar/open_for_write_existing_c.phpt
new file mode 100644
index 0000000..aeb28b0
--- /dev/null
+++ b/ext/phar/tests/tar/open_for_write_existing_c.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file) tar-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php __HALT_COMPILER(); ?>");
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+
+$phar->stopBuffering();
+ini_set('phar.readonly', 1);
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+
+include $alias . '/b/c.php';
+
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_existing_c.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c.php on line %d
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in %spen_for_write_existing_c.php on line %d
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in %spen_for_write_existing_c.php on line %d
+This is b/c
+
+===DONE===
diff --git a/ext/phar/tests/tar/open_for_write_existing_c_5_2.phpt b/ext/phar/tests/tar/open_for_write_existing_c_5_2.phpt
new file mode 100644
index 0000000..091b7df
--- /dev/null
+++ b/ext/phar/tests/tar/open_for_write_existing_c_5_2.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file) tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php __HALT_COMPILER(); ?>");
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+
+$phar->stopBuffering();
+ini_set('phar.readonly', 1);
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, b'extra');
+fclose($fp);
+
+include $alias . '/b/c.php';
+
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_existing_c_5_2.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c_5_2.php on line %d
+
+Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_existing_c_5_2.php on line %d
+
+Warning: fclose(): supplied argument is not a valid stream resource in %sopen_for_write_existing_c_5_2.php on line %d
+This is b/c
+
+===DONE===
diff --git a/ext/phar/tests/tar/open_for_write_newfile.phpt b/ext/phar/tests/tar/open_for_write_newfile.phpt
new file mode 100644
index 0000000..e2efb34
--- /dev/null
+++ b/ext/phar/tests/tar/open_for_write_newfile.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Phar: fopen a .phar for writing (new file) tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php __HALT_COMPILER(); ?>");
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+
+$phar->stopBuffering();
+
+$fp = fopen($alias . '/b/new.php', 'wb');
+fwrite($fp, b'extra');
+fclose($fp);
+
+include $alias . '/b/c.php';
+include $alias . '/b/new.php';
+
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECT--
+This is b/c
+extra
+===DONE===
diff --git a/ext/phar/tests/tar/open_for_write_newfile_b.phpt b/ext/phar/tests/tar/open_for_write_newfile_b.phpt
new file mode 100644
index 0000000..2ea557b
--- /dev/null
+++ b/ext/phar/tests/tar/open_for_write_newfile_b.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Phar: fopen a .phar for writing (new file) tar-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php __HALT_COMPILER(); ?>");
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+
+$phar->stopBuffering();
+ini_set('phar.readonly', 1);
+
+function err_handler($errno, $errstr, $errfile, $errline) {
+ echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
+}
+
+set_error_handler("err_handler", E_RECOVERABLE_ERROR);
+
+$fp = fopen($alias . '/b/new.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+
+include $alias . '/b/c.php';
+include $alias . '/b/new.php';
+
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_newfile_b.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b.php on line %d
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_b.php on line %d
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_b.php on line %d
+This is b/c
+
+Warning: include(phar://%sopen_for_write_newfile_b.phar.tar/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_b.phar.tar" in %sopen_for_write_newfile_b.php on line %d
+
+Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_b.phar.tar/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_b.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/tar/open_for_write_newfile_b_5_2.phpt b/ext/phar/tests/tar/open_for_write_newfile_b_5_2.phpt
new file mode 100644
index 0000000..1bb02a0
--- /dev/null
+++ b/ext/phar/tests/tar/open_for_write_newfile_b_5_2.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Phar: fopen a .phar for writing (new file) tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php __HALT_COMPILER(); ?>");
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+
+$phar->stopBuffering();
+ini_set('phar.readonly', 1);
+
+function err_handler($errno, $errstr, $errfile, $errline) {
+ echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
+}
+
+set_error_handler("err_handler", E_RECOVERABLE_ERROR);
+
+$fp = fopen($alias . '/b/new.php', 'wb');
+fwrite($fp, b'extra');
+fclose($fp);
+
+include $alias . '/b/c.php';
+include $alias . '/b/new.php';
+
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_newfile_b_5_2.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b_5_2.php on line %d
+
+Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_b_5_2.php on line %d
+
+Warning: fclose(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_b_5_2.php on line %d
+This is b/c
+
+Warning: include(phar://%sopen_for_write_newfile_b_5_2.phar.tar/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_b_5_2.phar.tar" in %sopen_for_write_newfile_b_5_2.php on line %d
+
+Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_b_5_2.phar.tar/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_b_5_2.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/tar/open_for_write_newfile_c.phpt b/ext/phar/tests/tar/open_for_write_newfile_c.phpt
new file mode 100644
index 0000000..f7cbb3a
--- /dev/null
+++ b/ext/phar/tests/tar/open_for_write_newfile_c.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Phar: fopen a .phar for writing (new file) tar-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php __HALT_COMPILER(); ?>");
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+
+$phar->stopBuffering();
+ini_set('phar.readonly', 1);
+
+$fp = fopen($alias . '/b/new.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+include $alias . '/b/c.php';
+include $alias . '/b/new.php';
+
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_newfile_c.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c.php on line %d
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_c.php on line %d
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_c.php on line %d
+This is b/c
+
+Warning: include(phar://%sopen_for_write_newfile_c.phar.tar/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_c.phar.tar" in %sopen_for_write_newfile_c.php on line %d
+
+Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_c.phar.tar/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_c.php on line %d
+
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/tar/open_for_write_newfile_c_5_2.phpt b/ext/phar/tests/tar/open_for_write_newfile_c_5_2.phpt
new file mode 100644
index 0000000..8a7d873
--- /dev/null
+++ b/ext/phar/tests/tar/open_for_write_newfile_c_5_2.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Phar: fopen a .phar for writing (new file) tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php __HALT_COMPILER(); ?>");
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+
+$phar->stopBuffering();
+ini_set('phar.readonly', 1);
+
+$fp = fopen($alias . '/b/new.php', 'wb');
+fwrite($fp, b'extra');
+fclose($fp);
+include $alias . '/b/c.php';
+include $alias . '/b/new.php';
+
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_newfile_c_5_2.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c_5_2.php on line %d
+
+Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_c_5_2.php on line %d
+
+Warning: fclose(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_c_5_2.php on line %d
+This is b/c
+
+Warning: include(phar://%sopen_for_write_newfile_c_5_2.phar.tar/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_c_5_2.phar.tar" in %sopen_for_write_newfile_c_5_2.php on line %d
+
+Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_c_5_2.phar.tar/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_c_5_2.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/tar/phar_begin_setstub_commit.phpt b/ext/phar/tests/tar/phar_begin_setstub_commit.phpt
new file mode 100644
index 0000000..d18f32e
--- /dev/null
+++ b/ext/phar/tests/tar/phar_begin_setstub_commit.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Phar::startBuffering()/setStub()/stopBuffering() tar-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$p = new Phar(dirname(__FILE__) . '/brandnewphar.phar.tar', 0, 'brandnewphar.phar');
+var_dump($p->isFileFormat(Phar::TAR));
+//var_dump($p->getStub());
+var_dump($p->isBuffering());
+$p->startBuffering();
+var_dump($p->isBuffering());
+$p['a.php'] = '<?php var_dump("Hello");';
+$p->setStub('<?php var_dump("First"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>');
+include 'phar://brandnewphar.phar/a.php';
+var_dump($p->getStub());
+$p['b.php'] = '<?php var_dump("World");';
+$p->setStub('<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER();');
+include 'phar://brandnewphar.phar/b.php';
+var_dump($p->getStub());
+$p->stopBuffering();
+echo "===COMMIT===\n";
+var_dump($p->isBuffering());
+include 'phar://brandnewphar.phar/a.php';
+include 'phar://brandnewphar.phar/b.php';
+var_dump($p->getStub());
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/brandnewphar.phar.tar');
+?>
+--EXPECT--
+bool(true)
+bool(false)
+bool(true)
+string(5) "Hello"
+string(84) "<?php var_dump("First"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+string(5) "World"
+string(85) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+===COMMIT===
+bool(false)
+string(5) "Hello"
+string(5) "World"
+string(85) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+===DONE===
diff --git a/ext/phar/tests/tar/phar_begin_setstub_commitU.phpt b/ext/phar/tests/tar/phar_begin_setstub_commitU.phpt
new file mode 100644
index 0000000..d058b36
--- /dev/null
+++ b/ext/phar/tests/tar/phar_begin_setstub_commitU.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Phar::startBuffering()/setStub()/stopBuffering() tar-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$p = new Phar(dirname(__FILE__) . '/brandnewphar.phar.tar', 0, 'brandnewphar.phar');
+var_dump($p->isFileFormat(Phar::TAR));
+//var_dump($p->getStub());
+var_dump($p->isBuffering());
+$p->startBuffering();
+var_dump($p->isBuffering());
+$p['a.php'] = '<?php var_dump("Hello");';
+$p->setStub('<?php var_dump("First"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>');
+include 'phar://brandnewphar.phar/a.php';
+var_dump($p->getStub());
+$p['b.php'] = '<?php var_dump("World");';
+$p->setStub('<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER();');
+include 'phar://brandnewphar.phar/b.php';
+var_dump($p->getStub());
+$p->stopBuffering();
+echo "===COMMIT===\n";
+var_dump($p->isBuffering());
+include 'phar://brandnewphar.phar/a.php';
+include 'phar://brandnewphar.phar/b.php';
+var_dump($p->getStub());
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/brandnewphar.phar.tar');
+?>
+--EXPECT--
+bool(true)
+bool(false)
+bool(true)
+unicode(5) "Hello"
+string(84) "<?php var_dump("First"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+unicode(5) "World"
+string(85) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+===COMMIT===
+bool(false)
+unicode(5) "Hello"
+unicode(5) "World"
+string(85) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+===DONE===
diff --git a/ext/phar/tests/tar/phar_buildfromiterator4.phpt b/ext/phar/tests/tar/phar_buildfromiterator4.phpt
new file mode 100644
index 0000000..b7d6d56
--- /dev/null
+++ b/ext/phar/tests/tar/phar_buildfromiterator4.phpt
@@ -0,0 +1,66 @@
+--TEST--
+Phar::buildFromIterator() iterator, 1 file passed in tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.tar');
+ var_dump($phar->buildFromIterator(new myIterator(array('a' => basename(__FILE__, 'php') . 'phpt'))));
+ var_dump($phar->isFileFormat(Phar::TAR));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar.tar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+key
+next
+valid
+array(1) {
+ ["a"]=>
+ string(%d) "%sphar_buildfromiterator4.phpt"
+}
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/tar/phar_buildfromiterator5.phpt b/ext/phar/tests/tar/phar_buildfromiterator5.phpt
new file mode 100644
index 0000000..54972cb
--- /dev/null
+++ b/ext/phar/tests/tar/phar_buildfromiterator5.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Phar::buildFromIterator() iterator, iterator returns non-string tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.tar');
+ var_dump($phar->buildFromIterator(new myIterator(array('a' => new stdClass))));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar.tar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+%s(24) "UnexpectedValueException"
+Iterator myIterator returned an invalid value (must return a string)
+===DONE===
diff --git a/ext/phar/tests/tar/phar_buildfromiterator6.phpt b/ext/phar/tests/tar/phar_buildfromiterator6.phpt
new file mode 100644
index 0000000..408775c
--- /dev/null
+++ b/ext/phar/tests/tar/phar_buildfromiterator6.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Phar::buildFromIterator() iterator, key is int tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.tar');
+ var_dump($phar->buildFromIterator(new myIterator(array(basename(__FILE__, 'php') . 'phpt'))));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar.tar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+key
+%s(24) "UnexpectedValueException"
+Iterator myIterator returned an invalid key (must return a string)
+===DONE===
diff --git a/ext/phar/tests/tar/phar_buildfromiterator7.phpt b/ext/phar/tests/tar/phar_buildfromiterator7.phpt
new file mode 100644
index 0000000..65084f3
--- /dev/null
+++ b/ext/phar/tests/tar/phar_buildfromiterator7.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Phar::buildFromIterator() iterator, file can't be opened tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.tar');
+ var_dump($phar->buildFromIterator(new myIterator(array('a' => basename(__FILE__, 'php') . '/oopsie/there.phpt'))));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar.tar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+key
+%s(24) "UnexpectedValueException"
+Iterator myIterator returned a file that could not be opened "phar_buildfromiterator7./oopsie/there.phpt"
+===DONE===
diff --git a/ext/phar/tests/tar/phar_buildfromiterator8.phpt b/ext/phar/tests/tar/phar_buildfromiterator8.phpt
new file mode 100644
index 0000000..f42640f
--- /dev/null
+++ b/ext/phar/tests/tar/phar_buildfromiterator8.phpt
@@ -0,0 +1,73 @@
+--TEST--
+Phar::buildFromIterator() iterator, SplFileInfo as current tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.tar');
+ $a = $phar->buildFromIterator(new RegexIterator(new DirectoryIterator('.'), '/^frontcontroller\d{0,2}\.phar\.phpt\\z|^\.\\z|^\.\.\\z/'), dirname(__FILE__) . DIRECTORY_SEPARATOR);
+ asort($a);
+ var_dump($a);
+ var_dump($phar->isFileFormat(Phar::TAR));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar.tar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+array(21) {
+ ["frontcontroller1.phar.phpt"]=>
+ string(%d) "%sfrontcontroller1.phar.phpt"
+ ["frontcontroller10.phar.phpt"]=>
+ string(%d) "%sfrontcontroller10.phar.phpt"
+ ["frontcontroller11.phar.phpt"]=>
+ string(%d) "%sfrontcontroller11.phar.phpt"
+ ["frontcontroller12.phar.phpt"]=>
+ string(%d) "%sfrontcontroller12.phar.phpt"
+ ["frontcontroller13.phar.phpt"]=>
+ string(%d) "%sfrontcontroller13.phar.phpt"
+ ["frontcontroller14.phar.phpt"]=>
+ string(%d) "%sfrontcontroller14.phar.phpt"
+ ["frontcontroller15.phar.phpt"]=>
+ string(%d) "%sfrontcontroller15.phar.phpt"
+ ["frontcontroller16.phar.phpt"]=>
+ string(%d) "%sfrontcontroller16.phar.phpt"
+ ["frontcontroller17.phar.phpt"]=>
+ string(%d) "%sfrontcontroller17.phar.phpt"
+ ["frontcontroller18.phar.phpt"]=>
+ string(%d) "%sfrontcontroller18.phar.phpt"
+ ["frontcontroller19.phar.phpt"]=>
+ string(%d) "%sfrontcontroller19.phar.phpt"
+ ["frontcontroller2.phar.phpt"]=>
+ string(%d) "%sfrontcontroller2.phar.phpt"
+ ["frontcontroller20.phar.phpt"]=>
+ string(%d) "%sfrontcontroller20.phar.phpt"
+ ["frontcontroller21.phar.phpt"]=>
+ string(%d) "%sfrontcontroller21.phar.phpt"
+ ["frontcontroller3.phar.phpt"]=>
+ string(%d) "%sfrontcontroller3.phar.phpt"
+ ["frontcontroller4.phar.phpt"]=>
+ string(%d) "%sfrontcontroller4.phar.phpt"
+ ["frontcontroller5.phar.phpt"]=>
+ string(%d) "%sfrontcontroller5.phar.phpt"
+ ["frontcontroller6.phar.phpt"]=>
+ string(%d) "%sfrontcontroller6.phar.phpt"
+ ["frontcontroller7.phar.phpt"]=>
+ string(%d) "%sfrontcontroller7.phar.phpt"
+ ["frontcontroller8.phar.phpt"]=>
+ string(%d) "%sfrontcontroller8.phar.phpt"
+ ["frontcontroller9.phar.phpt"]=>
+ string(%d) "%sfrontcontroller9.phar.phpt"
+}
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/tar/phar_buildfromiterator9.phpt b/ext/phar/tests/tar/phar_buildfromiterator9.phpt
new file mode 100644
index 0000000..f9deef4
--- /dev/null
+++ b/ext/phar/tests/tar/phar_buildfromiterator9.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Phar::buildFromIterator() iterator, 1 file resource passed in tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.tar');
+ var_dump($phar->buildFromIterator(new myIterator(array('a' => $a = fopen(basename(__FILE__, 'php') . 'phpt', 'r')))));
+ fclose($a);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar.tar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+key
+next
+valid
+array(1) {
+ ["a"]=>
+ string(%d) "[stream]"
+}
+===DONE===
diff --git a/ext/phar/tests/tar/phar_commitwrite.phpt b/ext/phar/tests/tar/phar_commitwrite.phpt
new file mode 100644
index 0000000..262ea1d
--- /dev/null
+++ b/ext/phar/tests/tar/phar_commitwrite.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Phar::setStub()/stopBuffering() tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--ENV--
+TEMP=.
+TMP=.
+--FILE--
+<?php
+$p = new Phar(dirname(__FILE__) . '/brandnewphar.phar.tar', 0, 'brandnewphar.phar');
+$p['file1.txt'] = 'hi';
+$p->stopBuffering();
+var_dump($p->getStub());
+$p->setStub("<?php
+function __autoload(\$class)
+{
+ include 'phar://' . str_replace('_', '/', \$class);
+}
+Phar::mapPhar('brandnewphar.phar');
+include 'phar://brandnewphar.phar/startup.php';
+__HALT_COMPILER();
+?>");
+var_dump($p->getStub());
+var_dump($p->isFileFormat(Phar::TAR));
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/brandnewphar.phar.tar');
+?>
+--EXPECT--
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+string(200) "<?php
+function __autoload($class)
+{
+ include 'phar://' . str_replace('_', '/', $class);
+}
+Phar::mapPhar('brandnewphar.phar');
+include 'phar://brandnewphar.phar/startup.php';
+__HALT_COMPILER(); ?>
+"
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/tar/phar_convert_phar.phpt b/ext/phar/tests/tar/phar_convert_phar.phpt
new file mode 100644
index 0000000..d754ac1
--- /dev/null
+++ b/ext/phar/tests/tar/phar_convert_phar.phpt
@@ -0,0 +1,58 @@
+--TEST--
+Phar::convertToPhar() from tar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.3.phar';
+
+$phar = new Phar($fname);
+$phar['a.txt'] = 'some text';
+$phar->stopBuffering();
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump(strlen($phar->getStub()));
+
+$phar = $phar->convertToExecutable(Phar::TAR);
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->getStub());
+
+$phar['a'] = 'hi there';
+
+$phar = $phar->convertToExecutable(Phar::PHAR, Phar::NONE, '.3.phar');
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump(strlen($phar->getStub()));
+
+copy($fname3, $fname2);
+
+$phar = new Phar($fname2);
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump(strlen($phar->getStub()));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.3.phar');
+__HALT_COMPILER();
+?>
+--EXPECT--
+bool(false)
+int(6683)
+bool(true)
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+bool(true)
+int(6683)
+bool(true)
+int(6683)
+===DONE===
diff --git a/ext/phar/tests/tar/phar_convert_phar2.phpt b/ext/phar/tests/tar/phar_convert_phar2.phpt
new file mode 100644
index 0000000..58901ca
--- /dev/null
+++ b/ext/phar/tests/tar/phar_convert_phar2.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Phar::convertToPhar() gzipped
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar';
+
+$phar = new Phar($fname);
+$phar['a.txt'] = 'some text';
+$phar->stopBuffering();
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump(strlen($phar->getStub()));
+
+$phar = $phar->convertToExecutable(Phar::TAR);
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->getStub());
+
+$phar['a'] = 'hi there';
+
+$phar = $phar->convertToExecutable(Phar::PHAR, Phar::GZ);
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isCompressed());
+var_dump(strlen($phar->getStub()));
+
+copy($fname . '.gz', $fname2);
+
+$phar = new Phar($fname2);
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isCompressed() == Phar::GZ);
+var_dump(strlen($phar->getStub()));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.gz');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.gz');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar');
+__HALT_COMPILER();
+?>
+--EXPECT--
+bool(false)
+int(6683)
+bool(true)
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+bool(true)
+int(4096)
+int(6683)
+bool(true)
+bool(true)
+int(6683)
+===DONE===
diff --git a/ext/phar/tests/tar/phar_convert_phar3.phpt b/ext/phar/tests/tar/phar_convert_phar3.phpt
new file mode 100644
index 0000000..543c89b
--- /dev/null
+++ b/ext/phar/tests/tar/phar_convert_phar3.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Phar::convertToPhar() bzipped
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("bz2")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar';
+
+$phar = new Phar($fname);
+$phar['a.txt'] = 'some text';
+$phar->stopBuffering();
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump(strlen($phar->getStub()));
+
+$phar = $phar->convertToExecutable(Phar::TAR);
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->getStub());
+
+$phar['a'] = 'hi there';
+
+$phar = $phar->convertToExecutable(Phar::PHAR, Phar::BZ2);
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isCompressed());
+var_dump(strlen($phar->getStub()));
+
+copy($fname . '.bz2', $fname2);
+
+$phar = new Phar($fname2);
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isCompressed() == Phar::BZ2);
+var_dump(strlen($phar->getStub()));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.bz2');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.bz2');
+__HALT_COMPILER();
+?>
+--EXPECT--
+bool(false)
+int(6683)
+bool(true)
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+bool(true)
+int(8192)
+int(6683)
+bool(true)
+bool(true)
+int(6683)
+===DONE===
diff --git a/ext/phar/tests/tar/phar_convert_phar4.phpt b/ext/phar/tests/tar/phar_convert_phar4.phpt
new file mode 100644
index 0000000..9b095f1
--- /dev/null
+++ b/ext/phar/tests/tar/phar_convert_phar4.phpt
@@ -0,0 +1,71 @@
+--TEST--
+Phar::convertToPhar() with global metadata
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar';
+
+$phar = new Phar($fname);
+$phar['a.txt'] = 'some text';
+$phar->setMetadata(b'hi');
+$phar->stopBuffering();
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump(strlen($phar->getStub()));
+var_dump($phar->getMetadata());
+
+$phar = $phar->convertToExecutable(Phar::TAR);
+var_dump($phar->isFileFormat(Phar::TAR));
+var_dump($phar->getStub());
+var_dump($phar->getMetadata());
+
+$phar['a'] = 'hi there';
+
+$phar = $phar->convertToExecutable(Phar::PHAR, Phar::GZ);
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isCompressed());
+var_dump(strlen($phar->getStub()));
+var_dump($phar->getMetadata());
+
+copy($fname . '.gz', $fname2);
+
+$phar = new Phar($fname2);
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump($phar->isCompressed() == Phar::GZ);
+var_dump(strlen($phar->getStub()));
+var_dump($phar->getMetadata());
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.gz');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.gz');
+__HALT_COMPILER();
+?>
+--EXPECT--
+bool(false)
+int(6683)
+string(2) "hi"
+bool(true)
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+string(2) "hi"
+bool(true)
+int(4096)
+int(6683)
+string(2) "hi"
+bool(true)
+bool(true)
+int(6683)
+string(2) "hi"
+===DONE===
diff --git a/ext/phar/tests/tar/phar_copy.phpt b/ext/phar/tests/tar/phar_copy.phpt
new file mode 100644
index 0000000..ed5cdac
--- /dev/null
+++ b/ext/phar/tests/tar/phar_copy.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Phar: copy() tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=1
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar.php';
+
+$pname = 'phar://'.$fname;
+$iname = '/file.txt';
+$ename = '/error/..';
+
+$p = new Phar($fname);
+
+try
+{
+ $p['a'] = 'hi';
+ $p->startBuffering();
+ $p->copy('a', 'b');
+ echo file_get_contents($p['b']->getPathName());
+ $p->copy('b', 'c');
+ $p->stopBuffering();
+ echo file_get_contents($p['c']->getPathName());
+ copy($fname, $fname2);
+ var_dump($p->isFileFormat(Phar::TAR));
+ $p->copy('a', $ename);
+}
+catch(Exception $e)
+{
+ echo $e->getMessage() . "\n";
+}
+ini_set('phar.readonly',1);
+$p2 = new Phar($fname2);
+var_dump($p2->isFileFormat(Phar::TAR));
+echo "\n";
+echo 'a: ' , file_get_contents($p2['a']->getPathName());
+echo 'b: ' ,file_get_contents($p2['b']->getPathName());
+echo 'c: ' ,file_get_contents($p2['c']->getPathName());
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.php'); ?>
+--EXPECTF--
+hihibool(true)
+file "/error/.." contains invalid characters upper directory reference, cannot be copied from "a" in phar %s
+bool(true)
+
+a: hib: hic: hi===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/tar/phar_magic.phpt b/ext/phar/tests/tar/phar_magic.phpt
new file mode 100644
index 0000000..ed0a462
--- /dev/null
+++ b/ext/phar/tests/tar/phar_magic.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Phar: include/fopen magic tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.php';
+$p = new Phar($fname);
+var_dump($p->isFileFormat(Phar::TAR));
+$p['a'] = '<?php include "b/c.php";' . "\n";
+$p['b/c.php'] = '<?php echo "in b\n";$a = fopen("a", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";';
+$p['d'] = "in d\n";
+$p->setStub('<?php
+set_include_path("phar://" . __FILE__);
+if (version_compare(PHP_VERSION, "5.3", "<")) {
+Phar::interceptFileFuncs();
+}
+include "phar://" . __FILE__ . "/a";
+__HALT_COMPILER();');
+include $fname;
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+bool(true)
+in b
+<?php include "b/c.php";
+in d
+===DONE===
diff --git a/ext/phar/tests/tar/phar_setalias.phpt b/ext/phar/tests/tar/phar_setalias.phpt
new file mode 100644
index 0000000..a1bc511
--- /dev/null
+++ b/ext/phar/tests/tar/phar_setalias.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Phar::setAlias() tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar.tar';
+
+$phar = new Phar($fname);
+$phar->setStub('<?php echo "first stub\n"; __HALT_COMPILER(); ?>');
+$phar->setAlias('hio');
+
+$files = array();
+
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+
+$phar->stopBuffering();
+
+echo $phar->getAlias() . "\n";
+$phar->setAlias('test');
+echo $phar->getAlias() . "\n";
+
+copy($fname, $fname2);
+$phar->setAlias('unused');
+$a = new Phar($fname2);
+echo $a->getAlias() . "\n";
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.tar');
+__HALT_COMPILER();
+?>
+--EXPECT--
+hio
+test
+test
+===DONE===
diff --git a/ext/phar/tests/tar/phar_setalias2.phpt b/ext/phar/tests/tar/phar_setalias2.phpt
new file mode 100644
index 0000000..a44cc39
--- /dev/null
+++ b/ext/phar/tests/tar/phar_setalias2.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Phar::setAlias() error tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+
+$phar = new Phar($fname);
+$phar->setStub('<?php echo "first stub\n"; __HALT_COMPILER(); ?>');
+$phar->setAlias('hio');
+
+$files = array();
+
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+
+$phar->stopBuffering();
+
+echo $phar->getAlias() . "\n";
+$phar->setAlias('test');
+echo $phar->getAlias() . "\n";
+$b = $phar;
+$phar = new Phar(dirname(__FILE__) . '/notphar.phar');
+
+try {
+ $phar->setAlias('test');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.tar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+hio
+test
+alias "test" is already used for archive "%sphar_setalias2.phar.tar" and cannot be used for other archives
+===DONE===
diff --git a/ext/phar/tests/tar/phar_setdefaultstub.phpt b/ext/phar/tests/tar/phar_setdefaultstub.phpt
new file mode 100644
index 0000000..c1e6642
--- /dev/null
+++ b/ext/phar/tests/tar/phar_setdefaultstub.phpt
@@ -0,0 +1,80 @@
+--TEST--
+Phar: Phar::setDefaultStub() with and without arg, tar-based phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<php echo "this is a\n"; ?>';
+$phar['b.php'] = '<php echo "this is b\n"; ?>';
+$phar->setStub('<?php echo "Hello World\n"; __HALT_COMPILER(); ?>');
+
+var_dump($phar->getStub());
+
+echo "============================================================================\n";
+echo "============================================================================\n";
+
+try {
+ $phar->setDefaultStub();
+ $phar->stopBuffering();
+} catch(Exception $e) {
+ echo $e->getMessage(). "\n";
+}
+
+var_dump($phar->getStub());
+
+echo "============================================================================\n";
+echo "============================================================================\n";
+
+try {
+ $phar->setDefaultStub('my/custom/thingy.php');
+ $phar->stopBuffering();
+} catch(Exception $e) {
+ echo $e->getMessage(). "\n";
+}
+
+var_dump($phar->getStub());
+
+echo "============================================================================\n";
+echo "============================================================================\n";
+
+try {
+ $phar->setDefaultStub('my/custom/thingy.php', 'the/web.php');
+ $phar->stopBuffering();
+} catch(Exception $e) {
+ echo $e->getMessage(). "\n";
+}
+
+var_dump($phar->getStub());
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+?>
+--EXPECTF--
+string(51) "<?php echo "Hello World\n"; __HALT_COMPILER(); ?>
+"
+============================================================================
+============================================================================
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+============================================================================
+============================================================================
+
+Warning: Phar::setDefaultStub(): method accepts no arguments for a tar- or zip-based phar stub, 1 given in %sphar_setdefaultstub.php on line %d
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+============================================================================
+============================================================================
+
+Warning: Phar::setDefaultStub(): method accepts no arguments for a tar- or zip-based phar stub, 2 given in %sphar_setdefaultstub.php on line %d
+string(60) "<?php // tar-based phar archive stub file
+__HALT_COMPILER();"
+===DONE===
diff --git a/ext/phar/tests/tar/phar_setsignaturealgo2.phpt b/ext/phar/tests/tar/phar_setsignaturealgo2.phpt
new file mode 100644
index 0000000..b68bbf6
--- /dev/null
+++ b/ext/phar/tests/tar/phar_setsignaturealgo2.phpt
@@ -0,0 +1,91 @@
+--TEST--
+Phar::setSupportedSignatures() with hash, tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("hash")) die("skip extension hash required");
+$arr = Phar::getSupportedSignatures();
+if (!in_array("OpenSSL", $arr)) die("skip openssl support required");
+if (!in_array('SHA-256', $arr)) die("skip hash extension loaded shared"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--ENV--
+TEMP=.
+TMP=.
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$p = new Phar($fname);
+$p['file1.txt'] = 'hi';
+var_dump($p->getSignature());
+$p->setSignatureAlgorithm(Phar::MD5);
+var_dump($p->getSignature());
+$p->setSignatureAlgorithm(Phar::SHA1);
+var_dump($p->getSignature());
+try {
+$p->setSignatureAlgorithm(Phar::SHA256);
+var_dump($p->getSignature());
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+try {
+$p->setSignatureAlgorithm(Phar::SHA512);
+var_dump($p->getSignature());
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+try {
+$config = dirname(__FILE__) . '/../files/openssl.cnf';
+$config_arg = array('config' => $config);
+$private = openssl_get_privatekey(file_get_contents(dirname(dirname(__FILE__)) . '/files/private.pem'));
+$pkey = '';
+openssl_pkey_export($private, $pkey, NULL, $config_arg);
+$p->setSignatureAlgorithm(Phar::OPENSSL, $pkey);
+var_dump($p->getSignature());
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+?>
+--EXPECTF--
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(5) "SHA-1"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(3) "MD5"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(5) "SHA-1"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(7) "SHA-256"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(7) "SHA-512"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(7) "OpenSSL"
+}
+===DONE===
diff --git a/ext/phar/tests/tar/phar_stub.phpt b/ext/phar/tests/tar/phar_stub.phpt
new file mode 100644
index 0000000..5a61eae
--- /dev/null
+++ b/ext/phar/tests/tar/phar_stub.phpt
@@ -0,0 +1,75 @@
+--TEST--
+Phar::setStub() (tar-based)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.tar.php';
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.php';
+$pname = 'phar://' . $fname;
+$pname2 = 'phar://' . $fname2;
+
+$p = new Phar($pname2);
+$p->setStub('<?php echo "first stub\n"; __HALT_COMPILER(); ?>');
+$p['a'] = 'a';
+$p['b'] = 'b';
+$p['c'] = 'c';
+copy($fname2, $fname);
+
+$phar = new Phar($fname);
+echo $phar->getStub();
+
+$file = b'<?php echo "second stub\n"; __HALT_COMPILER(); ?>';
+
+//// 2
+$phar->setStub($file);
+echo $phar->getStub();
+
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phartmp.php';
+$file = b'<?php echo "third stub\n"; __HALT_COMPILER(); ?>';
+$fp = fopen($fname3, 'wb');
+fwrite($fp, $file);
+fclose($fp);
+$fp = fopen($fname3, 'rb');
+
+//// 3
+$phar->setStub($fp);
+fclose($fp);
+
+echo $phar->getStub();
+
+$fp = fopen($fname3, 'ab');
+fwrite($fp, b'booya');
+fclose($fp);
+echo file_get_contents($fname3) . "\n";
+
+$fp = fopen($fname3, 'rb');
+
+//// 4
+$phar->setStub($fp, strlen($file));
+fclose($fp);
+echo $phar->getStub();
+
+$phar['testing'] = 'hi';
+
+echo $phar->getStub();
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php');
+__HALT_COMPILER();
+?>
+--EXPECT--
+<?php echo "first stub\n"; __HALT_COMPILER(); ?>
+<?php echo "second stub\n"; __HALT_COMPILER(); ?>
+<?php echo "third stub\n"; __HALT_COMPILER(); ?>
+<?php echo "third stub\n"; __HALT_COMPILER(); ?>booya
+<?php echo "third stub\n"; __HALT_COMPILER(); ?>
+<?php echo "third stub\n"; __HALT_COMPILER(); ?>
+===DONE===
diff --git a/ext/phar/tests/tar/phar_stub_error.phpt b/ext/phar/tests/tar/phar_stub_error.phpt
new file mode 100644
index 0000000..61532b9
--- /dev/null
+++ b/ext/phar/tests/tar/phar_stub_error.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Phar::setStub()/getStub() tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+
+$phar = new Phar($fname);
+$stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>' ."\r\n";
+$phar->setStub($stub);
+$phar->setAlias('hio');
+$phar['a'] = 'a';
+$phar->stopBuffering();
+
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+
+$newstub = '<?php echo "second stub\n"; _x_HALT_COMPILER(); ?>';
+
+try {
+ $phar->setStub($newstub);
+} catch(exception $e) {
+ echo 'Exception: ' . $e->getMessage() . "\n";
+}
+
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+$phar->stopBuffering();
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+string(50) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>
+"
+bool(true)
+Exception: illegal stub for tar-based phar "%sphar_stub_error.phar.tar"
+string(50) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>
+"
+bool(true)
+string(50) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>
+"
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/tar/refcount1.phpt b/ext/phar/tests/tar/refcount1.phpt
new file mode 100644
index 0000000..b26c47d
--- /dev/null
+++ b/ext/phar/tests/tar/refcount1.phpt
@@ -0,0 +1,74 @@
+--TEST--
+Phar: test that refcounting avoids problems with deleting a file tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/tarmaker.php.inc';
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$tar = new tarmaker($fname, 'none');
+$tar->init();
+$tar->addFile('.phar/stub.php', "<?php __HALT_COMPILER(); ?>");
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+$files['.phar/alias.txt'] = 'hio';
+
+foreach ($files as $n => $file) {
+ $tar->addFile($n, $file);
+}
+
+$tar->close();
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, b"extra");
+fclose($fp);
+echo "===CLOSE===\n";
+$phar = new Phar($fname);
+$b = fopen($alias . '/b/c.php', 'rb');
+$a = $phar['b/c.php'];
+var_dump($a);
+var_dump(fread($b, 20));
+rewind($b);
+echo "===UNLINK===\n";
+unlink($alias . '/b/c.php');
+var_dump($a);
+var_dump(fread($b, 20));
+include $alias . '/b/c.php';
+
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+===CLOSE===
+object(PharFileInfo)#%d (2) {
+ [%spathName":%sSplFileInfo":private]=>
+ string(%d) "phar://%srefcount1.phar.tar/b/c.php"
+ [%sfileName":%sSplFileInfo":private]=>
+ string(%d) "c.php"
+}
+string(5) "extra"
+===UNLINK===
+
+Warning: unlink(): phar error: "b/c.php" in phar "%srefcount1.phar.tar", has open file pointers, cannot unlink in %srefcount1.php on line %d
+object(PharFileInfo)#%d (2) {
+ [%spathName":%sSplFileInfo":private]=>
+ string(%d) "phar://%srefcount1.phar.tar/b/c.php"
+ [%sfileName":%sSplFileInfo":private]=>
+ string(%s) "c.php"
+}
+string(5) "extra"
+extra
+===DONE===
diff --git a/ext/phar/tests/tar/refcount1_5_2.phpt b/ext/phar/tests/tar/refcount1_5_2.phpt
new file mode 100644
index 0000000..18587d9
--- /dev/null
+++ b/ext/phar/tests/tar/refcount1_5_2.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Phar: test that refcounting avoids problems with deleting a file tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php __HALT_COMPILER(); ?>");
+$phar->setAlias('hio');
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, "extra");
+fclose($fp);
+
+echo "===CLOSE===\n";
+
+$b = fopen($alias . '/b/c.php', 'rb');
+$a = $phar['b/c.php'];
+var_dump($a);
+var_dump(fread($b, 20));
+rewind($b);
+echo "===UNLINK===\n";
+unlink($alias . '/b/c.php');
+var_dump($a);
+var_dump(fread($b, 20));
+include $alias . '/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+===CLOSE===
+object(PharFileInfo)#%d (0) {
+}
+string(5) "extra"
+===UNLINK===
+
+Warning: unlink(): phar error: "b/c.php" in phar "%sefcount1_5_2.phar.tar", has open file pointers, cannot unlink in %sefcount1_5_2.php on line %d
+object(PharFileInfo)#%d (0) {
+}
+string(5) "extra"
+extra
+===DONE===
diff --git a/ext/phar/tests/tar/rename.phpt b/ext/phar/tests/tar/rename.phpt
new file mode 100644
index 0000000..96588a6
--- /dev/null
+++ b/ext/phar/tests/tar/rename.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Phar: rename test tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/tarmaker.php.inc';
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$tar = new tarmaker($fname, 'none');
+$tar->init();
+$tar->addFile('.phar/stub.php', "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>");
+
+$files = array();
+$files['a'] = 'a';
+
+foreach ($files as $n => $file) {
+ $tar->addFile($n, $file);
+}
+
+$tar->close();
+
+include $fname;
+
+echo file_get_contents($alias . '/a') . "\n";
+rename($alias . '/a', $alias . '/b');
+echo file_get_contents($alias . '/b') . "\n";
+echo file_get_contents($alias . '/a') . "\n";
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+a
+a
+
+Warning: file_get_contents(phar://%srename.phar.tar/a): failed to open stream: phar error: "a" is not a file in phar "%srename.phar.tar" in %srename.php on line %d
diff --git a/ext/phar/tests/tar/rename_dir.phpt b/ext/phar/tests/tar/rename_dir.phpt
new file mode 100644
index 0000000..0b95789
--- /dev/null
+++ b/ext/phar/tests/tar/rename_dir.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Phar: rename_dir test tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/tarmaker.php.inc';
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$tar = new tarmaker($fname, 'none');
+$tar->init();
+$tar->addFile('.phar/stub.php', "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>");
+
+$files = array();
+$files['a/x'] = 'a';
+
+foreach ($files as $n => $file) {
+ $tar->addFile($n, $file);
+}
+
+$tar->close();
+
+include $fname;
+
+echo file_get_contents($alias . '/a/x') . "\n";
+rename($alias . '/a', $alias . '/b');
+echo file_get_contents($alias . '/b/x') . "\n";
+echo file_get_contents($alias . '/a/x') . "\n";
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+a
+a
+
+Warning: file_get_contents(phar://%srename_dir.phar.tar/a/x): failed to open stream: phar error: "a/x" is not a file in phar "%srename_dir.phar.tar" in %srename_dir.php on line %d
diff --git a/ext/phar/tests/tar/require_hash.phpt b/ext/phar/tests/tar/require_hash.phpt
new file mode 100644
index 0000000..638534b
--- /dev/null
+++ b/ext/phar/tests/tar/require_hash.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Phar: tar-based phar, require_hash=1, no signature
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+ini_set('phar.require_hash', 1);
+include dirname(__FILE__) . '/files/tarmaker.php.inc';
+$fname = dirname(__FILE__) . '/tar_004.phar.tar';
+$alias = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/tar_004.tar';
+
+$tar = new tarmaker($fname, 'none');
+$tar->init();
+$tar->addFile('tar_004.php', '<?php var_dump(__FILE__);');
+$tar->addFile('internal/file/here', "hi there!\n");
+$tar->addFile('.phar/stub.php', "__HALT_COMPILER();");
+$tar->close();
+
+try {
+ $phar = new Phar($fname);
+ var_dump($phar->getStub());
+} catch (Exception $e) {
+ echo $e->getMessage()."\n";
+}
+ini_set('phar.require_hash', 0);
+try {
+ $phar = new PharData($fname2);
+ $phar['file'] = 'hi';
+ var_dump($phar->getSignature());
+ $phar->setSignatureAlgorithm(Phar::MD5);
+ var_dump($phar->getSignature());
+} catch (Exception $e) {
+ echo $e->getMessage()."\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tar_004.phar.tar');
+@unlink(dirname(__FILE__) . '/tar_004.tar');
+?>
+--EXPECTF--
+tar-based phar "%star_004.phar.tar" does not have a signature
+bool(false)
+array(2) {
+ ["hash"]=>
+ string(32) "%s"
+ ["hash_type"]=>
+ string(3) "MD5"
+}
+===DONE===
diff --git a/ext/phar/tests/tar/rmdir.phpt b/ext/phar/tests/tar/rmdir.phpt
new file mode 100644
index 0000000..be03782
--- /dev/null
+++ b/ext/phar/tests/tar/rmdir.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Phar: rmdir test tar-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/tarmaker.php.inc';
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+$alias = 'phar://' . $fname;
+
+$tar = new tarmaker($fname, 'none');
+$tar->init();
+$tar->addFile('.phar/stub.php', "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>");
+
+$files = array();
+$files['a/x'] = 'a';
+
+foreach ($files as $n => $file) {
+ $tar->addFile($n, $file);
+}
+$tar->mkdir('a');
+
+$tar->close();
+
+include $fname;
+
+echo file_get_contents($alias . '/a/x') . "\n";
+var_dump(rmdir($alias . '/a'));
+echo file_get_contents($alias . '/a/x') . "\n";
+unlink($alias . '/a/x');
+var_dump(rmdir($alias . '/a'));
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?>
+--EXPECTF--
+a
+
+Warning: rmdir(): phar error: Directory not empty in %srmdir.php on line %d
+bool(false)
+a
+bool(true)
diff --git a/ext/phar/tests/tar/tar_001.phpt b/ext/phar/tests/tar/tar_001.phpt
new file mode 100644
index 0000000..500058b
--- /dev/null
+++ b/ext/phar/tests/tar/tar_001.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Phar: tar-based phar corrupted
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/make_invalid_tar.php.inc';
+
+$tar = new corrupter(dirname(__FILE__) . '/tar_001.phar.tar', 'none');
+$tar->init();
+$tar->addFile('tar_001.phpt', __FILE__);
+$tar->close();
+
+$tar = fopen('phar://' . dirname(__FILE__) . '/tar_001.phar.tar/tar_001.phpt', 'rb');
+try {
+ $phar = new Phar(dirname(__FILE__) . '/tar_001.phar.tar');
+ echo "should not execute\n";
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tar_001.phar.tar');
+?>
+--EXPECTF--
+Warning: fopen(phar://%star_001.phar.tar/tar_001.phpt): failed to open stream: phar error: "%star_001.phar.tar" is a corrupted tar file (truncated) in %star_001.php on line 9
+phar error: "%star_001.phar.tar" is a corrupted tar file (truncated)
+===DONE===
diff --git a/ext/phar/tests/tar/tar_002.phpt b/ext/phar/tests/tar/tar_002.phpt
new file mode 100644
index 0000000..75fc220
--- /dev/null
+++ b/ext/phar/tests/tar/tar_002.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Phar: tar-based phar corrupted 2
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/make_invalid_tar.php.inc';
+
+$tar = new corrupter(dirname(__FILE__) . '/tar_002.phar.tar', 'none');
+$tar->init();
+$tar->addFile('tar_002.phpt', __FILE__);
+$tar->close();
+
+$tar = fopen('phar://' . dirname(__FILE__) . '/tar_002.phar.tar/tar_002.phpt', 'rb');
+
+try {
+ $phar = new Phar(dirname(__FILE__) . '/tar_002.phar.tar');
+ echo "should not execute\n";
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tar_002.phar.tar');
+?>
+--EXPECTF--
+Warning: fopen(phar://%star_002.phar.tar/tar_002.phpt): failed to open stream: phar error: "%star_002.phar.tar" is a corrupted tar file (truncated) in %star_002.php on line 9
+phar error: "%star_002.phar.tar" is a corrupted tar file (truncated)
+===DONE===
diff --git a/ext/phar/tests/tar/tar_003.phpt b/ext/phar/tests/tar/tar_003.phpt
new file mode 100644
index 0000000..3dec341
--- /dev/null
+++ b/ext/phar/tests/tar/tar_003.phpt
@@ -0,0 +1,71 @@
+--TEST--
+Phar: tar-based phar, valid 1
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/tarmaker.php.inc';
+
+$fname = dirname(__FILE__) . '/tar_003.phar.tar';
+$alias = 'phar://' . $fname;
+
+$tar = new tarmaker($fname, 'none');
+$tar->init();
+$tar->addFile('.phar/stub.php', "<?php // tar-based phar archive stub file\n__HALT_COMPILER();");
+$tar->addFile('tar_003.phpt', $g = fopen(__FILE__, 'r'));
+$tar->addFile('internal/file/here', "hi there!\n");
+$tar->mkDir('internal/dir');
+$tar->mkDir('dir');
+$tar->close();
+
+fclose($g);
+
+echo file_get_contents($alias . '/internal/file/here');
+
+try {
+$tar = opendir($alias . '/');
+} catch (Exception $e) {
+echo $e->getMessage()."\n";
+}
+
+while (false !== ($v = readdir($tar))) {
+ echo (is_file($alias . '/' . $v) ? "file\n" : "dir\n");
+ echo $v . "\n";
+}
+closedir($tar);
+
+/* ensure none of the dir tar files were freed */
+echo "second round\n";
+$tar = opendir($alias . '/');
+while (false !== ($v = readdir($tar))) {
+ echo (is_file($alias . '/' . $v) ? "file\n" : "dir\n");
+ echo $v . "\n";
+}
+closedir($tar);
+
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tar_003.phar.tar');
+?>
+--EXPECT--
+hi there!
+dir
+dir
+dir
+internal
+file
+tar_003.phpt
+second round
+dir
+dir
+dir
+internal
+file
+tar_003.phpt
+===DONE===
diff --git a/ext/phar/tests/tar/tar_004.phpt b/ext/phar/tests/tar/tar_004.phpt
new file mode 100644
index 0000000..bb1d3bf
--- /dev/null
+++ b/ext/phar/tests/tar/tar_004.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Phar: tar-based phar, tar phar with stub, mapPhar()
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/tarmaker.php.inc';
+
+$fname = dirname(__FILE__) . '/tar_004.phar.tar';
+$alias = 'phar://' . $fname;
+
+$tar = new tarmaker($fname, 'none');
+$tar->init();
+$tar->addFile('tar_004.php', '<?php var_dump(__FILE__);');
+$tar->addFile('internal/file/here', "hi there!\n");
+$tar->mkDir('internal/dir');
+$tar->mkDir('dir');
+$tar->addFile('.phar/stub.php', '<?php
+Phar::mapPhar();
+var_dump("it worked");
+include "phar://" . __FILE__ . "/tar_004.php";
+');
+$tar->close();
+
+include $fname;
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tar_004.phar.tar');
+?>
+--EXPECTF--
+string(9) "it worked"
+string(%d) "phar://%star_004.phar.tar/tar_004.php"
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/tar/tar_004U.phpt b/ext/phar/tests/tar/tar_004U.phpt
new file mode 100644
index 0000000..45c77a9
--- /dev/null
+++ b/ext/phar/tests/tar/tar_004U.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Phar: tar-based phar, tar phar with stub, mapPhar()
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/tarmaker.php.inc';
+
+$fname = dirname(__FILE__) . '/tar_004U.phar.tar';
+$alias = 'phar://' . $fname;
+
+$tar = new tarmaker($fname, 'none');
+$tar->init();
+$tar->addFile('tar_004U.php', '<?php var_dump(__FILE__);');
+$tar->addFile('internal/file/here', "hi there!\n");
+$tar->mkDir('internal/dir');
+$tar->mkDir('dir');
+$tar->addFile('.phar/stub.php', '<?php
+Phar::mapPhar();
+var_dump("it worked");
+include "phar://" . __FILE__ . "/tar_004U.php";
+');
+$tar->close();
+
+include $fname;
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tar_004U.phar.tar');
+?>
+--EXPECTF--
+unicode(9) "it worked"
+unicode(%d) "phar://%star_004U.phar.tar/tar_004U.php"
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/tar/tar_bz2.phpt b/ext/phar/tests/tar/tar_bz2.phpt
new file mode 100644
index 0000000..6093bb9
--- /dev/null
+++ b/ext/phar/tests/tar/tar_bz2.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Phar: tar-based phar, bzipped tar
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (!extension_loaded("bz2")) die("skip bz2 not available");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/tarmaker.php.inc';
+
+$fname = dirname(__FILE__) . '/tar_bz2.phar';
+$alias = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/tar_bz2.phar.tar';
+$alias2 = 'phar://' . $fname2;
+
+$tar = new tarmaker($fname, 'bz2');
+$tar->init();
+$tar->addFile('tar_004.php', '<?php var_dump(__FILE__);');
+$tar->addFile('internal/file/here', "hi there!\n");
+$tar->mkDir('internal/dir');
+$tar->mkDir('dir');
+$tar->addFile('.phar/stub.php', '<?php
+var_dump(__FILE__);
+var_dump(substr(__FILE__, 0, 4) != "phar");
+Phar::mapPhar();
+var_dump("it worked");
+include "phar://" . __FILE__ . "/tar_004.php";
+__HALT_COMPILER();
+');
+$tar->close();
+
+include $alias;
+
+$phar = new Phar($fname);
+$phar['test'] = 'hi';
+
+copy($fname, $fname2);
+
+$phar2 = new Phar($fname2);
+var_dump($phar2->isFileFormat(Phar::TAR));
+var_dump($phar2->isCompressed() == Phar::BZ2);
+
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tar_bz2.phar');
+@unlink(dirname(__FILE__) . '/tar_bz2.phar.tar');
+?>
+--EXPECTF--
+string(%d) "%star_bz2.phar"
+bool(true)
+string(9) "it worked"
+string(%d) "phar://%star_bz2.phar/tar_004.php"
+bool(true)
+bool(true)
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/tar/tar_bz2U.phpt b/ext/phar/tests/tar/tar_bz2U.phpt
new file mode 100644
index 0000000..2f92976
--- /dev/null
+++ b/ext/phar/tests/tar/tar_bz2U.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Phar: tar-based phar, bzipped tar
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (!extension_loaded("bz2")) die("skip bz2 not available");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/tarmaker.php.inc';
+
+$fname = dirname(__FILE__) . '/tar_bz2U.phar';
+$alias = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/tar_bz2U.phar.tar';
+$alias2 = 'phar://' . $fname2;
+
+$tar = new tarmaker($fname, 'bz2');
+$tar->init();
+$tar->addFile('tar_004.php', '<?php var_dump(__FILE__);');
+$tar->addFile('internal/file/here', "hi there!\n");
+$tar->mkDir('internal/dir');
+$tar->mkDir('dir');
+$tar->addFile('.phar/stub.php', '<?php
+var_dump(__FILE__);
+var_dump(substr(__FILE__, 0, 4) != "phar");
+Phar::mapPhar();
+var_dump("it worked");
+include "phar://" . __FILE__ . "/tar_004.php";
+__HALT_COMPILER();
+');
+$tar->close();
+
+include $alias;
+
+$phar = new Phar($fname);
+$phar['test'] = 'hi';
+
+copy($fname, $fname2);
+
+$phar2 = new Phar($fname2);
+var_dump($phar2->isFileFormat(Phar::TAR));
+var_dump($phar2->isCompressed() == Phar::BZ2);
+
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tar_bz2U.phar');
+@unlink(dirname(__FILE__) . '/tar_bz2U.phar.tar');
+?>
+--EXPECTF--
+unicode(%d) "%star_bz2U.phar"
+bool(true)
+unicode(9) "it worked"
+unicode(%d) "phar://%star_bz2U.phar/tar_004.php"
+bool(true)
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/tar/tar_gzip.phpt b/ext/phar/tests/tar/tar_gzip.phpt
new file mode 100644
index 0000000..d44e1b1
--- /dev/null
+++ b/ext/phar/tests/tar/tar_gzip.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Phar: tar-based phar, gzipped tar
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (!extension_loaded("zlib")) die("skip zlib not available");
+if (version_compare(phpversion(), '5.2.6', '<')) die("skip zlib is buggy in PHP < 5.2.6");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/tarmaker.php.inc';
+$fname = dirname(__FILE__) . '/tar_gzip.phar';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/tar_gzip.phar.tar';
+$pname2 = 'phar://' . $fname2;
+
+$a = new tarmaker($fname, 'zlib');
+$a->init();
+$a->addFile('tar_004.php', '<?php var_dump(__FILE__);');
+$a->addFile('internal/file/here', "hi there!\n");
+$a->mkDir('internal/dir');
+$a->mkDir('dir');
+$a->addFile('.phar/stub.php', '<?php
+Phar::mapPhar();
+var_dump("it worked");
+include "phar://" . __FILE__ . "/tar_004.php";
+');
+$a->close();
+
+include $fname;
+
+$a = new Phar($fname);
+$a['test'] = 'hi';
+copy($fname, $fname2);
+$b = new Phar($fname2);
+var_dump($b->isFileFormat(Phar::TAR));
+var_dump($b->isCompressed() == Phar::GZ);
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tar_gzip.phar');
+@unlink(dirname(__FILE__) . '/tar_gzip.phar.tar');
+?>
+--EXPECTF--
+string(9) "it worked"
+string(%d) "phar://%star_gzip.phar/tar_004.php"
+bool(true)
+bool(true)
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/tar/tar_gzipU.phpt b/ext/phar/tests/tar/tar_gzipU.phpt
new file mode 100644
index 0000000..4aa348e
--- /dev/null
+++ b/ext/phar/tests/tar/tar_gzipU.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Phar: tar-based phar, gzipped tar
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (!extension_loaded("zlib")) die("skip zlib not available");
+if (version_compare(phpversion(), '5.2.6', '<')) die("skip zlib is buggy in PHP < 5.2.6");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/tarmaker.php.inc';
+$fname = dirname(__FILE__) . '/tar_gzip.phar';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/tar_gzip.phar.tar';
+$pname2 = 'phar://' . $fname2;
+
+$a = new tarmaker($fname, 'zlib');
+$a->init();
+$a->addFile('tar_004.php', '<?php var_dump(__FILE__);');
+$a->addFile('internal/file/here', "hi there!\n");
+$a->mkDir('internal/dir');
+$a->mkDir('dir');
+$a->addFile('.phar/stub.php', '<?php
+Phar::mapPhar();
+var_dump("it worked");
+include "phar://" . __FILE__ . "/tar_004.php";
+');
+$a->close();
+
+include $fname;
+
+$a = new Phar($fname);
+$a['test'] = 'hi';
+copy($fname, $fname2);
+$b = new Phar($fname2);
+var_dump($b->isFileFormat(Phar::TAR));
+var_dump($b->isCompressed() == Phar::GZ);
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tar_gzip.phar');
+@unlink(dirname(__FILE__) . '/tar_gzip.phar.tar');
+?>
+--EXPECTF--
+unicode(9) "it worked"
+unicode(%d) "phar://%star_gzip.phar/tar_004.php"
+bool(true)
+bool(true)
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/tar/tar_makebz2.phpt b/ext/phar/tests/tar/tar_makebz2.phpt
new file mode 100644
index 0000000..f703b46
--- /dev/null
+++ b/ext/phar/tests/tar/tar_makebz2.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Phar: tar-based phar, make new bzipped tar
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("bz2")) die("skip bz2 not available"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/tar_makebz2.phar.tar';
+$fname2 = dirname(__FILE__) . '/tar_makebz2.phar.tar.bz2';
+$fname3 = dirname(__FILE__) . '/tar_makebz2_b.phar.tar.bz2';
+
+$phar = new Phar($fname);
+$phar['test'] = 'hi';
+var_dump($phar->isFileFormat(Phar::TAR));
+$phar = $phar->compress(Phar::BZ2);
+
+copy($fname2, $fname3);
+
+$phar2 = new Phar($fname3);
+var_dump($phar2->isFileFormat(Phar::TAR));
+var_dump($phar2->isCompressed() == Phar::BZ2);
+
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tar_makebz2.phar.bz2');
+@unlink(dirname(__FILE__) . '/tar_makebz2.phar.tar');
+@unlink(dirname(__FILE__) . '/tar_makebz2.phar.tar.bz2');
+@unlink(dirname(__FILE__) . '/tar_makebz2_b.phar.tar.bz2');
+?>
+--EXPECTF--
+bool(true)
+bool(true)
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/tar/tar_makegz.phpt b/ext/phar/tests/tar/tar_makegz.phpt
new file mode 100644
index 0000000..46fe177
--- /dev/null
+++ b/ext/phar/tests/tar/tar_makegz.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Phar: tar-based phar, make new gzipped tar
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/tar_makegz.phar.tar';
+$fname2 = dirname(__FILE__) . '/tar_makegz.phar.tar.gz';
+$fname3 = dirname(__FILE__) . '/tar_makegz_b.phar.tar.gz';
+
+$phar = new Phar($fname);
+$phar['test'] = 'hi';
+var_dump($phar->isFileFormat(Phar::TAR));
+$phar = $phar->compress(Phar::GZ);
+
+
+copy($fname2, $fname3);
+
+$phar2 = new Phar($fname3);
+var_dump($phar2->isFileFormat(Phar::TAR));
+var_dump($phar2->isCompressed() == Phar::GZ);
+
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tar_makegz.phar.gz');
+@unlink(dirname(__FILE__) . '/tar_makegz.phar.tar');
+@unlink(dirname(__FILE__) . '/tar_makegz.phar.tar.gz');
+@unlink(dirname(__FILE__) . '/tar_makegz_b.phar.tar.gz');
+?>
+--EXPECTF--
+bool(true)
+bool(true)
+bool(true)
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/tar/tar_nohash.phpt b/ext/phar/tests/tar/tar_nohash.phpt
new file mode 100644
index 0000000..dae2bb9
--- /dev/null
+++ b/ext/phar/tests/tar/tar_nohash.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Phar: tar archive, require_hash=1, should not error out
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=1
+--FILE--
+<?php
+try {
+ $phar = new PharData(dirname(__FILE__) . '/files/Net_URL-1.0.15.tgz');
+ var_dump($phar->getStub());
+} catch (Exception $e) {
+ echo $e->getMessage()."\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+string(0) ""
+===DONE===
diff --git a/ext/phar/tests/tar/tar_nostub.phpt b/ext/phar/tests/tar/tar_nostub.phpt
new file mode 100644
index 0000000..0036662
--- /dev/null
+++ b/ext/phar/tests/tar/tar_nostub.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Phar: tar-based phar, third-party tar with no stub, Phar->getStub()
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=0
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/tarmaker.php.inc';
+$fname = dirname(__FILE__) . '/tar_004.phar.tar';
+$alias = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/tar_004.tar';
+
+$tar = new tarmaker($fname, 'none');
+$tar->init();
+$tar->addFile('tar_004.php', '<?php var_dump(__FILE__);');
+$tar->addFile('internal/file/here', "hi there!\n");
+$tar->close();
+
+try {
+ $phar = new Phar($fname);
+ var_dump($phar->getStub());
+} catch (Exception $e) {
+ echo $e->getMessage()."\n";
+}
+
+copy($fname, $fname2);
+
+try {
+ $phar = new PharData($fname2);
+ var_dump($phar->getStub());
+} catch (Exception $e) {
+ echo $e->getMessage()."\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . '/tar_004.phar.tar');
+@unlink(dirname(__FILE__) . '/tar_004.tar');
+?>
+--EXPECTF--
+RecursiveDirectoryIterator::__construct(phar://%star_004.phar.tar/): failed to open dir: '%star_004.phar.tar' is not a phar archive. Use PharData::__construct() for a standard zip or tar archive
+phar url "phar://%star_004.phar.tar/" is unknown
+string(0) ""
+===DONE===
diff --git a/ext/phar/tests/tar/tar_openssl_hash.phpt b/ext/phar/tests/tar/tar_openssl_hash.phpt
new file mode 100644
index 0000000..49ef77a
--- /dev/null
+++ b/ext/phar/tests/tar/tar_openssl_hash.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Phar: tar archive, require_hash=1, OpenSSL hash
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+<?php if (!extension_loaded("openssl")) die("skip openssl not available"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=1
+--FILE--
+<?php
+try {
+ $phar = new PharData(dirname(__FILE__) . '/files/P1-1.0.0.tgz');
+} catch (Exception $e) {
+ echo $e->getMessage()."\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+===DONE===
diff --git a/ext/phar/tests/tar/truncated.phpt b/ext/phar/tests/tar/truncated.phpt
new file mode 100644
index 0000000..fbcabb7
--- /dev/null
+++ b/ext/phar/tests/tar/truncated.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Phar: truncated tar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+try {
+ $p = new PharData(dirname(__FILE__) . '/files/trunc.tar');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+?>
+--EXPECTF--
+phar error: "%strunc.tar" is a corrupted tar file (truncated)
+===DONE===
diff --git a/ext/phar/tests/test_alias_unset.phpt b/ext/phar/tests/test_alias_unset.phpt
new file mode 100644
index 0000000..0127d8b
--- /dev/null
+++ b/ext/phar/tests/test_alias_unset.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Phar: test for the odd case where we intend to remove an archive from memory
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php';
+$pname2 = 'phar://' . $fname2;
+
+$phar = new Phar($fname);
+$phar->setAlias('first');
+$phar['file1.txt'] = 'hi';
+unset($phar);
+
+$phar2 = new Phar($fname2);
+$phar2->setAlias('first'); // this works because there are no references to $fname open
+$phar2['file1.txt'] = 'hi';
+unset($phar2);
+
+$a = fopen($pname . '/file1.txt', 'r'); // this works because there are no references to $fname2 open
+try {
+$phar2 = new Phar($fname2); // fails because references open to $fname
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+fclose($a);
+$phar2 = new Phar($fname2); // succeeds because all refs are closed
+var_dump($phar2->getAlias());
+
+$a = file_get_contents($pname . '/file1.txt'); // this fails because $fname2 ref exists
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?>
+--EXPECTF--
+Cannot open archive "%stest_alias_unset.2.phar.php", alias is already in use by existing archive
+string(5) "first"
+
+Warning: file_get_contents(phar://%sfile1.txt): failed to open stream: Cannot open archive "%stest_alias_unset.phar.php", alias is already in use by existing archive in %stest_alias_unset.php on line %d
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/test_signaturealgos.phpt b/ext/phar/tests/test_signaturealgos.phpt
new file mode 100644
index 0000000..7cbf6c0
--- /dev/null
+++ b/ext/phar/tests/test_signaturealgos.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Phar: verify signature parsing works
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("hash")) die("skip extension hash conflicts");
+$arr = Phar::getSupportedSignatures();
+if (!in_array("OpenSSL", $arr)) die("skip openssl support required");
+if (!in_array('SHA-256', $arr)) die("skip hash extension loaded shared");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$a = new Phar(dirname(__FILE__) . '/files/sha1.phar');
+$r = $a->getSignature();
+var_dump($r['hash_type']);
+$a = new Phar(dirname(__FILE__) . '/files/sha512.phar');
+$r = $a->getSignature();
+var_dump($r['hash_type']);
+$a = new Phar(dirname(__FILE__) . '/files/sha256.phar');
+$r = $a->getSignature();
+var_dump($r['hash_type']);
+$a = new Phar(dirname(__FILE__) . '/files/md5.phar');
+$r = $a->getSignature();
+var_dump($r['hash_type']);
+$a = new Phar(dirname(__FILE__) . '/files/openssl.phar');
+$r = $a->getSignature();
+var_dump($r['hash_type']);
+?>
+===DONE===
+--EXPECT--
+string(5) "SHA-1"
+string(7) "SHA-512"
+string(7) "SHA-256"
+string(3) "MD5"
+string(7) "OpenSSL"
+===DONE===
diff --git a/ext/phar/tests/test_unset.phpt b/ext/phar/tests/test_unset.phpt
new file mode 100644
index 0000000..3da537c
--- /dev/null
+++ b/ext/phar/tests/test_unset.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Phar: ensure unset() works properly on a non-flushed phar archive
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php';
+
+if (file_exists($fname)) unlink($fname);
+if (file_exists($fname2)) unlink($fname2);
+
+$phar = new Phar($fname); // no entries, never flushed
+$phar->setAlias('first');
+$phar->setMetadata('hi');
+unset($phar);
+
+$phar = new Phar($fname2);
+$phar['b'] = 'whatever'; // flushed
+try {
+ $phar->setAlias('first');
+} catch(Exception $e) {
+ echo $e->getMessage()."\n";
+}
+
+$phar = new Phar($fname);
+var_dump($phar->getMetadata());
+var_dump($phar->getAlias());
+var_dump(file_exists($fname));
+
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?>
+--EXPECTF--
+NULL
+string(%d) "%stest_unset.phar.php"
+bool(false)
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/webphar_compilefail.phpt b/ext/phar/tests/webphar_compilefail.phpt
new file mode 100644
index 0000000..ab5532d
--- /dev/null
+++ b/ext/phar/tests/webphar_compilefail.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar: Phar::webPhar, open compiled file fails
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.readonly=1
+--FILE--
+<?php
+try {
+Phar::webPhar('oopsiedaisy.phar', '/index.php');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+__HALT_COMPILER();
+?>
+--EXPECTF--
+internal corruption of phar "%swebphar_compilefail.php" (truncated manifest at manifest length) \ No newline at end of file
diff --git a/ext/phar/tests/withphar.phpt b/ext/phar/tests/withphar.phpt
new file mode 100644
index 0000000..c422fa9
--- /dev/null
+++ b/ext/phar/tests/withphar.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar: phar run with pecl/phar with default stub
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/nophar.phar';
+?>
+===DONE===
+--EXPECT--
+in b
+<?php include "b/c.php";
+in d
+===DONE===
diff --git a/ext/phar/tests/withphar_web.phpt b/ext/phar/tests/withphar_web.phpt
new file mode 100644
index 0000000..487873a
--- /dev/null
+++ b/ext/phar/tests/withphar_web.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar: default web stub, with phar extension
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--ENV--
+SCRIPT_NAME=/withphar_web.php
+REQUEST_URI=/withphar_web.php/web.php
+PATH_INFO=/web.php
+--FILE_EXTERNAL--
+files/nophar.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+web
diff --git a/ext/phar/tests/zf_test.phpt b/ext/phar/tests/zf_test.phpt
new file mode 100644
index 0000000..c5d587d
--- /dev/null
+++ b/ext/phar/tests/zf_test.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Phar: test broken app
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$file = "zfapp";
+$orig_file = dirname(__FILE__) . "/files/$file.tgz";
+$tgz_file = dirname(__FILE__) . "/$file.tgz";
+$phar_file = dirname(__FILE__) . "/$file.phar.tar.gz";
+copy($orig_file, $tgz_file);
+
+$phar = new PharData($tgz_file);
+$phar = $phar->convertToExecutable();
+
+$phar = new Phar($phar_file);
+$phar->startBuffering();
+$phar->setStub("<?php
+Phar::interceptFileFuncs();
+Phar::webPhar('$file.phar', 'html/index.php');
+echo 'BlogApp is intended to be executed from a web browser\n';
+exit -1;
+__HALT_COMPILER();
+");
+$phar->stopBuffering();
+
+foreach(new RecursiveIteratorIterator($phar) as $path) {
+ echo str_replace('\\', '/', $path->getPathName()) . "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/zfapp.tgz');
+unlink(dirname(__FILE__) . '/zfapp.phar.tar.gz');
+?>
+--EXPECTF--
+phar://%szfapp.phar.tar.gz/application/default/controllers/ErrorController.php
+phar://%szfapp.phar.tar.gz/application/default/controllers/IndexController.php
+phar://%szfapp.phar.tar.gz/application/default/views/scripts/error/error.phtml
+phar://%szfapp.phar.tar.gz/application/default/views/scripts/index/index.phtml
+phar://%szfapp.phar.tar.gz/html/.htaccess
+phar://%szfapp.phar.tar.gz/html/index.php
+===DONE===
diff --git a/ext/phar/tests/zip/033.phpt b/ext/phar/tests/zip/033.phpt
new file mode 100644
index 0000000..c980758
--- /dev/null
+++ b/ext/phar/tests/zip/033.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Phar::chmod zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip';
+$alias = 'phar://hio';
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<?php echo "This is a\n"; include "'.$alias.'/b.php"; ?>';
+$phar->setAlias('hio');
+$phar->addEmptyDir('test');
+$phar->stopBuffering();
+
+try {
+ var_dump($phar['a.php']->isExecutable());
+ $phar['a.php']->chmod(0777);
+ copy($fname, $fname2);
+ $phar->setAlias('unused');
+ $phar2 = new Phar($fname2);
+ var_dump($phar2['a.php']->isExecutable());
+ $phar['a.php']->chmod(0666);
+ var_dump($phar['a.php']->isExecutable());
+ echo "test dir\n";
+ var_dump($phar['test']->isDir());
+ var_dump($phar['test']->isReadable());
+ $phar['test']->chmod(0000);
+ var_dump($phar['test']->isReadable());
+ $phar['test']->chmod(0666);
+ var_dump($phar['test']->isReadable());
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip');
+?>
+--EXPECT--
+bool(false)
+bool(true)
+bool(false)
+test dir
+bool(true)
+bool(true)
+bool(false)
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/zip/033a.phpt b/ext/phar/tests/zip/033a.phpt
new file mode 100644
index 0000000..429d3bd
--- /dev/null
+++ b/ext/phar/tests/zip/033a.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Phar::chmod zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://hio';
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<?php echo "This is a\n"; include "'.$alias.'/b.php"; ?>';
+$phar->setAlias('hio');
+$phar->addEmptyDir('test');
+$phar->stopBuffering();
+ini_set('phar.readonly', 1);
+
+try {
+ var_dump($phar['a.php']->isExecutable());
+ $phar['a.php']->chmod(0777);
+ var_dump($phar['a.php']->isExecutable());
+ $phar['a.php']->chmod(0666);
+ var_dump($phar['a.php']->isExecutable());
+ echo "test dir\n";
+ var_dump($phar['test']->isExecutable());
+ $phar['test']->chmod(0777);
+ var_dump($phar['test']->isExecutable());
+ $phar['test']->chmod(0666);
+ var_dump($phar['test']->isExecutable());
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+?>
+--EXPECTF--
+bool(false)
+Cannot modify permissions for file "a.php" in phar "%sa.phar.zip", write operations are prohibited
+===DONE===
diff --git a/ext/phar/tests/zip/alias_acrobatics.phpt b/ext/phar/tests/zip/alias_acrobatics.phpt
new file mode 100644
index 0000000..2a58e39
--- /dev/null
+++ b/ext/phar/tests/zip/alias_acrobatics.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Phar: alias edge cases
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip';
+
+$p = new Phar($fname);
+
+$p->setAlias('foo');
+$p['unused'] = 'hi';
+try {
+$a = new Phar($fname2, 0, 'foo');
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+copy($fname, $fname2);
+echo "2\n";
+try {
+$a = new Phar($fname2);
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+try {
+$b = new Phar($fname, 0, 'another');
+} catch (Exception $e) {
+echo $e->getMessage(),"\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip');
+?>
+--EXPECTF--
+alias "foo" is already used for archive "%salias_acrobatics.phar.zip" cannot be overloaded with "%salias_acrobatics.2.phar.zip"
+2
+phar error: Unable to add zip-based phar "%salias_acrobatics.2.phar.zip" with implicit alias, alias is already in use
+alias "another" is already used for archive "%salias_acrobatics.phar.zip" cannot be overloaded with "%salias_acrobatics.phar.zip"
+===DONE===
diff --git a/ext/phar/tests/zip/all.phpt b/ext/phar/tests/zip/all.phpt
new file mode 100644
index 0000000..49d79a4
--- /dev/null
+++ b/ext/phar/tests/zip/all.phpt
@@ -0,0 +1,66 @@
+--TEST--
+Phar: test that creation of zip-based phar generates valid zip with all bells/whistles
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (!extension_loaded("zlib")) die("skip zlib not available");
+if (!extension_loaded("bz2")) die("skip bz2 not available");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php';
+$pname2 = 'phar://' . $fname2;
+
+$phar = new Phar($fname);
+
+$phar->setMetadata('hi there');
+$phar['a'] = 'hi';
+$phar['a']->setMetadata('a meta');
+$phar['b'] = 'hi2';
+$phar['b']->compress(Phar::GZ);
+$phar['c'] = 'hi3';
+$phar['c']->compress(Phar::BZ2);
+$phar['b']->chmod(0444);
+$phar->setStub("<?php ok __HALT_COMPILER();");
+$phar->setAlias("hime");
+unset($phar);
+copy($fname, $fname2);
+Phar::unlinkArchive($fname);
+var_dump(file_exists($fname), file_exists($pname . '/a'));
+
+$phar = new Phar($fname2);
+var_dump($phar['a']->getContent(), $phar['b']->getContent(), $phar['c']->getContent());
+var_dump($phar['a']->isCompressed(), $phar['b']->isCompressed() == Phar::GZ, $phar['c']->isCompressed() == Phar::BZ2);
+var_dump((string) decoct(fileperms($pname2 . '/b')));
+var_dump($phar->getStub());
+var_dump($phar->getAlias());
+var_dump($phar->getMetadata());
+var_dump($phar['a']->getMetadata());
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); ?>
+--EXPECT--
+bool(false)
+bool(false)
+string(2) "hi"
+string(3) "hi2"
+string(3) "hi3"
+bool(false)
+bool(true)
+bool(true)
+string(6) "100444"
+string(32) "<?php ok __HALT_COMPILER(); ?>
+"
+string(4) "hime"
+string(8) "hi there"
+string(6) "a meta"
+===DONE===
diff --git a/ext/phar/tests/zip/allU.phpt b/ext/phar/tests/zip/allU.phpt
new file mode 100644
index 0000000..93fe5da
--- /dev/null
+++ b/ext/phar/tests/zip/allU.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Phar: test that creation of zip-based phar generates valid zip with all bells/whistles
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+if (!extension_loaded("spl")) die("skip SPL not available");
+if (!extension_loaded("zlib")) die("skip zlib not available");
+if (!extension_loaded("bz2")) die("skip bz2 not available");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php';
+$pname2 = 'phar://' . $fname2;
+
+$phar = new Phar($fname);
+
+$phar->setMetadata('hi there');
+$phar['a'] = 'hi';
+$phar['a']->setMetadata('a meta');
+$phar['b'] = 'hi2';
+$phar['b']->compress(Phar::GZ);
+$phar['c'] = 'hi3';
+$phar['c']->compress(Phar::BZ2);
+$phar['b']->chmod(0444);
+$phar->setStub("<?php ok __HALT_COMPILER();");
+$phar->setAlias("hime");
+unset($phar);
+copy($fname, $fname2);
+Phar::unlinkArchive($fname);
+var_dump(file_exists($fname), file_exists($pname . '/a'));
+
+$phar = new Phar($fname2);
+var_dump($phar['a']->getContent(), $phar['b']->getContent(), $phar['c']->getContent());
+var_dump($phar['a']->isCompressed(), $phar['b']->isCompressed() == Phar::GZ, $phar['c']->isCompressed() == Phar::BZ2);
+var_dump((string) decoct(fileperms($pname2 . '/b')));
+var_dump($phar->getStub());
+var_dump($phar->getAlias());
+var_dump($phar->getMetadata());
+var_dump($phar['a']->getMetadata());
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); ?>
+--EXPECT--
+bool(false)
+bool(false)
+string(2) "hi"
+string(3) "hi2"
+string(3) "hi3"
+bool(false)
+bool(true)
+bool(true)
+unicode(6) "100444"
+string(32) "<?php ok __HALT_COMPILER(); ?>
+"
+string(4) "hime"
+unicode(8) "hi there"
+unicode(6) "a meta"
+===DONE===
diff --git a/ext/phar/tests/zip/badalias.phpt b/ext/phar/tests/zip/badalias.phpt
new file mode 100644
index 0000000..0291c4b
--- /dev/null
+++ b/ext/phar/tests/zip/badalias.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Phar: invalid aliases
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip no zlib"); ?>
+<?php if (!extension_loaded("bz2")) die("skip no bz2"); ?>
+--FILE--
+<?php
+$e = dirname(__FILE__) . '/files/';
+for ($i = 1; $i <= 5; $i++) {
+try {
+new Phar($e . "badalias$i.phar.zip");
+} catch (Exception $ee) {
+echo $ee->getMessage(), "\n";
+}
+}
+?>
+===DONE===
+--EXPECTF--
+phar error: invalid alias "hi/there" in zip-based phar "%sbadalias1.phar.zip"
+phar error: invalid alias "hi\there" in zip-based phar "%sbadalias2.phar.zip"
+phar error: invalid alias "hi\there" in zip-based phar "%sbadalias3.phar.zip"
+phar error: invalid alias "hi;there" in zip-based phar "%sbadalias4.phar.zip"
+phar error: invalid alias "hi:there" in zip-based phar "%sbadalias5.phar.zip"
+===DONE===
diff --git a/ext/phar/tests/zip/bug48791.phpt b/ext/phar/tests/zip/bug48791.phpt
new file mode 100644
index 0000000..45c5271
--- /dev/null
+++ b/ext/phar/tests/zip/bug48791.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar: Bug #48791: open office documents always reported as corrupted by phar extension
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--FILE--
+<?php
+echo file_get_contents('phar://' . dirname(__FILE__) . '/files/test.odt/content.xml'), "\n";
+?>
+===DONE===
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:rdfa="http://docs.oasis-open.org/opendocument/meta/rdfa#" office:version="1.2"><office:scripts/><office:font-face-decls><style:font-face style:name="OpenSymbol" svg:font-family="OpenSymbol"/><style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/><style:font-face style:name="Times New Roman" svg:font-family="&apos;Times New Roman&apos;" style:font-family-generic="roman" style:font-pitch="variable"/><style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="Arial Unicode MS" svg:font-family="&apos;Arial Unicode MS&apos;" style:font-family-generic="system" style:font-pitch="variable"/><style:font-face style:name="MS Mincho" svg:font-family="&apos;MS Mincho&apos;" style:font-family-generic="system" style:font-pitch="variable"/><style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-family-generic="system" style:font-pitch="variable"/></office:font-face-decls><office:automatic-styles><style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard" style:list-style-name="L1"/><style:style style:name="T1" style:family="text"><style:text-properties style:font-name="Arial"/></style:style><text:list-style style:name="L1"><text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.27cm" fo:text-indent="-0.635cm" fo:margin-left="1.27cm"/></style:list-level-properties></text:list-level-style-bullet><text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.905cm" fo:text-indent="-0.635cm" fo:margin-left="1.905cm"/></style:list-level-properties></text:list-level-style-bullet><text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.54cm" fo:text-indent="-0.635cm" fo:margin-left="2.54cm"/></style:list-level-properties></text:list-level-style-bullet><text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.175cm" fo:text-indent="-0.635cm" fo:margin-left="3.175cm"/></style:list-level-properties></text:list-level-style-bullet><text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.81cm" fo:text-indent="-0.635cm" fo:margin-left="3.81cm"/></style:list-level-properties></text:list-level-style-bullet><text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="4.445cm" fo:text-indent="-0.635cm" fo:margin-left="4.445cm"/></style:list-level-properties></text:list-level-style-bullet><text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.08cm" fo:text-indent="-0.635cm" fo:margin-left="5.08cm"/></style:list-level-properties></text:list-level-style-bullet><text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.715cm" fo:text-indent="-0.635cm" fo:margin-left="5.715cm"/></style:list-level-properties></text:list-level-style-bullet><text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.35cm" fo:text-indent="-0.635cm" fo:margin-left="6.35cm"/></style:list-level-properties></text:list-level-style-bullet><text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.985cm" fo:text-indent="-0.635cm" fo:margin-left="6.985cm"/></style:list-level-properties></text:list-level-style-bullet></text:list-style></office:automatic-styles><office:body><office:text><text:sequence-decls><text:sequence-decl text:display-outline-level="0" text:name="Illustration"/><text:sequence-decl text:display-outline-level="0" text:name="Table"/><text:sequence-decl text:display-outline-level="0" text:name="Text"/><text:sequence-decl text:display-outline-level="0" text:name="Drawing"/></text:sequence-decls><text:h text:style-name="Heading_20_1" text:outline-level="1">Überschrift</text:h><text:list xml:id="list38593008" text:style-name="L1"><text:list-item><text:p text:style-name="P1"><text:span text:style-name="T1">Name:<text:tab/><text:tab/>$$n_fn$$</text:span></text:p></text:list-item><text:list-item><text:p text:style-name="P1"><text:span text:style-name="T1">Firma:<text:tab/><text:tab/>$$org_name$$</text:span></text:p></text:list-item><text:list-item><text:p text:style-name="P1"><text:span text:style-name="T1">Menge:<text:tab/>$$#menge$$</text:span></text:p></text:list-item></text:list></office:text></office:body></office:document-content>
+===DONE===
diff --git a/ext/phar/tests/zip/bzip2.phpt b/ext/phar/tests/zip/bzip2.phpt
new file mode 100644
index 0000000..a703ce6
--- /dev/null
+++ b/ext/phar/tests/zip/bzip2.phpt
@@ -0,0 +1,83 @@
+--TEST--
+Phar: process bzip2-compressed zip entry
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("bz2")) die("skip bz2 not available"); ?>
+--FILE--
+<?php
+try {
+ $a = new PharData(dirname(__FILE__) . '/files/bzip2.zip');
+ foreach ($a as $entry => $file) {
+ echo $file->getContent();
+ }
+ $a = new Phar(dirname(__FILE__) . '/files/bz2_alias.phar.zip');
+ var_dump($a->getAlias());
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECT--
+<?php
+include dirname(__FILE__) . '/corrupt_zipmaker.php.inc';
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii');
+$a->addFile('hi2', null, 'hii2', null, null, 'encrypt', 'encrypt');
+$a->writeZip(dirname(__FILE__) . '/encrypted.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii');
+$a->addFile('', null, 'stdin');
+$a->writeZip(dirname(__FILE__) . '/stdin.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hii', null, 'hii', null, null, 'filename_len', 'filename_len');
+$a->addFile('hi', null, 'hii');
+$a->writeZip(dirname(__FILE__) . '/truncfilename.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress');
+$a->writeZip(dirname(__FILE__) . '/compress_unsup1.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 2);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup2.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 3);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup3.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 4);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup4.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 5);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup5.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 6);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup6.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 7);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup7.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 9);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup9.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 10);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup10.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 14);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup14.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 18);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup18.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 19);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup19.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 97);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup97.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 98);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup98.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 11);
+$a->writeZip(dirname(__FILE__) . '/compress_unsupunknown.zip');
+?>
+string(175) "hitheresuperlongzipistoostupidtodowhatIsaysoIhavetousethisridiculouslylongaliasbecauseitisstupiddidImentionthatalreadythemadnessdoesnotstopIhateinfozipIhateinfozipIhateinfozip"
+===DONE===
diff --git a/ext/phar/tests/zip/corrupt_001.phpt b/ext/phar/tests/zip/corrupt_001.phpt
new file mode 100644
index 0000000..0b019c6
--- /dev/null
+++ b/ext/phar/tests/zip/corrupt_001.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Phar: corrupted zip (count mismatch)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--FILE--
+<?php
+try {
+ new PharData(dirname(__FILE__) . '/files/count1.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/count2.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECTF--
+phar error: corrupt zip archive, conflicting file count in end of central directory record in zip-based phar "%scount1.zip"
+phar error: corrupt zip archive, conflicting file count in end of central directory record in zip-based phar "%scount2.zip"
+===DONE===
diff --git a/ext/phar/tests/zip/corrupt_002.phpt b/ext/phar/tests/zip/corrupt_002.phpt
new file mode 100644
index 0000000..86a2712
--- /dev/null
+++ b/ext/phar/tests/zip/corrupt_002.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar: corrupted zip (no end of zip record)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--FILE--
+<?php
+try {
+ new PharData(dirname(__FILE__) . '/files/nozipend.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECTF--
+phar error: end of central directory not found in zip-based phar "%snozipend.zip"
+===DONE===
diff --git a/ext/phar/tests/zip/corrupt_003.phpt b/ext/phar/tests/zip/corrupt_003.phpt
new file mode 100644
index 0000000..c41e015
--- /dev/null
+++ b/ext/phar/tests/zip/corrupt_003.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar: corrupted zip (truncated file comment)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--FILE--
+<?php
+try {
+ new PharData(dirname(__FILE__) . '/files/filecomment.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECTF--
+phar error: corrupt zip archive, zip file comment truncated in zip-based phar "%sfilecomment.zip"
+===DONE===
diff --git a/ext/phar/tests/zip/corrupt_004.phpt b/ext/phar/tests/zip/corrupt_004.phpt
new file mode 100644
index 0000000..3760e8f
--- /dev/null
+++ b/ext/phar/tests/zip/corrupt_004.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar: corrupted zip (central directory offset incorrect)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--FILE--
+<?php
+try {
+ new PharData(dirname(__FILE__) . '/files/cdir_offset.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECTF--
+phar error: corrupted central directory entry, no magic signature in zip-based phar "%scdir_offset.zip"
+===DONE===
diff --git a/ext/phar/tests/zip/corrupt_005.phpt b/ext/phar/tests/zip/corrupt_005.phpt
new file mode 100644
index 0000000..6b5d31d
--- /dev/null
+++ b/ext/phar/tests/zip/corrupt_005.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar: encrypted zip
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--FILE--
+<?php
+try {
+ new PharData(dirname(__FILE__) . '/files/encrypted.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECTF--
+phar error: Cannot process encrypted zip files in zip-based phar "%sencrypted.zip"
+===DONE===
diff --git a/ext/phar/tests/zip/corrupt_006.phpt b/ext/phar/tests/zip/corrupt_006.phpt
new file mode 100644
index 0000000..9c83617
--- /dev/null
+++ b/ext/phar/tests/zip/corrupt_006.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar: zip with file created from stdin
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--FILE--
+<?php
+try {
+ new PharData(dirname(__FILE__) . '/files/stdin.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECTF--
+phar error: Cannot process zips created from stdin (zero-length filename) in zip-based phar "%sstdin.zip"
+===DONE===
diff --git a/ext/phar/tests/zip/corrupt_007.phpt b/ext/phar/tests/zip/corrupt_007.phpt
new file mode 100644
index 0000000..80c9139
--- /dev/null
+++ b/ext/phar/tests/zip/corrupt_007.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar: corrupted zip (truncated filename record)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--FILE--
+<?php
+try {
+ new PharData(dirname(__FILE__) . '/files/truncfilename.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECTF--
+phar error: corrupted central directory entry, no magic signature in zip-based phar "%struncfilename.zip"
+===DONE===
diff --git a/ext/phar/tests/zip/corrupt_008.phpt b/ext/phar/tests/zip/corrupt_008.phpt
new file mode 100644
index 0000000..5a20f4d
--- /dev/null
+++ b/ext/phar/tests/zip/corrupt_008.phpt
@@ -0,0 +1,101 @@
+--TEST--
+Phar: unsupported compression methods
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--FILE--
+<?php
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsup1.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsup2.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsup3.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsup4.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsup5.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsup6.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsup7.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsup9.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsup10.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsup14.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsup18.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsup19.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsup97.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsup98.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+try {
+ new PharData(dirname(__FILE__) . '/files/compress_unsupunknown.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECTF--
+phar error: unsupported compression method (Shrunk) used in this zip in zip-based phar "%scompress_unsup1.zip"
+phar error: unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup2.zip"
+phar error: unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup3.zip"
+phar error: unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup4.zip"
+phar error: unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup5.zip"
+phar error: unsupported compression method (Implode) used in this zip in zip-based phar "%scompress_unsup6.zip"
+phar error: unsupported compression method (Tokenize) used in this zip in zip-based phar "%scompress_unsup7.zip"
+phar error: unsupported compression method (Deflate64) used in this zip in zip-based phar "%scompress_unsup9.zip"
+phar error: unsupported compression method (PKWare Implode/old IBM TERSE) used in this zip in zip-based phar "%scompress_unsup10.zip"
+phar error: unsupported compression method (LZMA) used in this zip in zip-based phar "%scompress_unsup14.zip"
+phar error: unsupported compression method (IBM TERSE) used in this zip in zip-based phar "%scompress_unsup18.zip"
+phar error: unsupported compression method (IBM LZ77) used in this zip in zip-based phar "%scompress_unsup19.zip"
+phar error: unsupported compression method (WavPack) used in this zip in zip-based phar "%scompress_unsup97.zip"
+phar error: unsupported compression method (PPMd) used in this zip in zip-based phar "%scompress_unsup98.zip"
+phar error: unsupported compression method (unknown) used in this zip in zip-based phar "%scompress_unsupunknown.zip"
+===DONE===
diff --git a/ext/phar/tests/zip/corrupt_009.phpt b/ext/phar/tests/zip/corrupt_009.phpt
new file mode 100644
index 0000000..91f142d
--- /dev/null
+++ b/ext/phar/tests/zip/corrupt_009.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar: corrupted zip (extra field way too long)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--FILE--
+<?php
+try {
+ new PharData(dirname(__FILE__) . '/files/extralen_toolong.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECTF--
+phar error: Unable to process extra field header for file in central directory in zip-based phar "%sextralen_toolong.zip"
+===DONE===
diff --git a/ext/phar/tests/zip/corrupt_010.phpt b/ext/phar/tests/zip/corrupt_010.phpt
new file mode 100644
index 0000000..ead723c
--- /dev/null
+++ b/ext/phar/tests/zip/corrupt_010.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar: unable to process zip (zip spanning multiple archives)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--FILE--
+<?php
+try {
+ new PharData(dirname(__FILE__) . '/files/disknumber.zip');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECTF--
+phar error: split archives spanning multiple zips cannot be processed in zip-based phar "%sdisknumber.zip"
+===DONE===
diff --git a/ext/phar/tests/zip/create_new_and_modify.phpt b/ext/phar/tests/zip/create_new_and_modify.phpt
new file mode 100644
index 0000000..5a3ec33
--- /dev/null
+++ b/ext/phar/tests/zip/create_new_and_modify.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Phar: create and modify zip-based phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$pname = 'phar://' . $fname;
+
+@unlink($fname);
+
+file_put_contents($pname . '/a.php', "brand new!\n");
+
+$phar = new Phar($fname);
+var_dump($phar->isFileFormat(Phar::ZIP));
+$sig1 = md5_file($fname);
+
+include $pname . '/a.php';
+
+file_put_contents($pname .'/a.php', "modified!\n");
+file_put_contents($pname .'/b.php', "another!\n");
+
+$phar = new Phar($fname);
+$sig2 = md5_file($fname);
+
+var_dump($sig1 != $sig2);
+
+include $pname . '/a.php';
+include $pname . '/b.php';
+
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?>
+--EXPECTF--
+bool(true)
+brand new!
+bool(true)
+modified!
+another!
+===DONE===
diff --git a/ext/phar/tests/zip/create_new_phar_b.phpt b/ext/phar/tests/zip/create_new_phar_b.phpt
new file mode 100644
index 0000000..5fda5b4
--- /dev/null
+++ b/ext/phar/tests/zip/create_new_phar_b.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Phar: create a completely new zip-based phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=1
+phar.require_hash=1
+--FILE--
+<?php
+
+file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip/a.php',
+ 'brand new!');
+include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip/a.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+
+Warning: file_put_contents(phar://%screate_new_phar_b.phar.zip/a.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %screate_new_phar_b.php on line %d
+
+Warning: include(phar://%screate_new_phar_b.phar.zip/a.php): failed to open stream: %s in %screate_new_phar_b.php on line %d
+
+Warning: include(): Failed opening 'phar://%screate_new_phar_b.phar.zip/a.php' for inclusion (include_path='%s') in %screate_new_phar_b.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/zip/delete.phpt b/ext/phar/tests/zip/delete.phpt
new file mode 100644
index 0000000..06078b3
--- /dev/null
+++ b/ext/phar/tests/zip/delete.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Phar: delete test, zip-based phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+$file = "<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>";
+
+$phar = new Phar($fname);
+$phar['a'] = 'a';
+$phar->setStub($file);
+$phar->stopBuffering();
+
+echo file_get_contents($alias . '/a') . "\n";
+$phar->delete('a');
+echo file_get_contents($alias . '/a') . "\n";
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+a
+
+Warning: file_get_contents(phar://%sdelete.phar.zip/a): failed to open stream: phar error: "a" is not a file in phar "%sdelete.phar.zip" in %sdelete.php on line %d \ No newline at end of file
diff --git a/ext/phar/tests/zip/delete_in_phar.phpt b/ext/phar/tests/zip/delete_in_phar.phpt
new file mode 100644
index 0000000..b7bda7c
--- /dev/null
+++ b/ext/phar/tests/zip/delete_in_phar.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Phar: delete a file within a zip-based .phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<?php echo "This is a\n"; ?>';
+$phar['b.php'] = '<?php echo "This is b\n"; ?>';
+$phar['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+$phar->stopBuffering();
+
+include $alias . '/a.php';
+include $alias . '/b.php';
+include $alias . '/b/c.php';
+unlink($alias . '/b/c.php');
+?>
+===AFTER===
+<?php
+include $alias . '/a.php';
+include $alias . '/b.php';
+include $alias . '/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+This is a
+This is b
+This is b/c
+===AFTER===
+This is a
+This is b
+
+Warning: include(%sdelete_in_phar.phar.zip/b/c.php): failed to open stream: phar error: "b/c.php" is not a file in phar "%sdelete_in_phar.phar.zip" in %sdelete_in_phar.php on line %d
+
+Warning: include(): Failed opening 'phar://%sdelete_in_phar.phar.zip/b/c.php' for inclusion (include_path='%s') in %sdelete_in_phar.php on line %d
+
+===DONE===
+ \ No newline at end of file
diff --git a/ext/phar/tests/zip/delete_in_phar_b.phpt b/ext/phar/tests/zip/delete_in_phar_b.phpt
new file mode 100644
index 0000000..eb1a6cc
--- /dev/null
+++ b/ext/phar/tests/zip/delete_in_phar_b.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Phar: delete a file within a zip-based .phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<?php echo "This is a\n"; ?>';
+$phar['b.php'] = '<?php echo "This is b\n"; ?>';
+$phar['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+$phar->stopBuffering();
+ini_set('phar.readonly', 1);
+
+include $alias . '/a.php';
+include $alias . '/b.php';
+include $alias . '/b/c.php';
+unlink($alias . '/b/c.php');
+?>
+===AFTER===
+<?php
+include $alias . '/a.php';
+include $alias . '/b.php';
+include $alias . '/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+This is a
+This is b
+This is b/c
+
+Warning: unlink(): phar error: write operations disabled by the php.ini setting phar.readonly in %sdelete_in_phar_b.php on line %d
+===AFTER===
+This is a
+This is b
+This is b/c
+
+===DONE===
diff --git a/ext/phar/tests/zip/delete_in_phar_confirm.phpt b/ext/phar/tests/zip/delete_in_phar_confirm.phpt
new file mode 100644
index 0000000..fdd0b42
--- /dev/null
+++ b/ext/phar/tests/zip/delete_in_phar_confirm.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Phar: delete a file within a zip-based .phar (confirm disk file is changed)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<?php echo "This is a\n"; ?>';
+$phar['b.php'] = '<?php echo "This is b\n"; ?>';
+$phar['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+$phar->stopBuffering();
+
+include $alias . '/a.php';
+include $alias . '/b.php';
+include $alias . '/b/c.php';
+
+$md5 = md5_file($fname);
+unlink($alias . '/b/c.php');
+clearstatcache();
+$md52 = md5_file($fname);
+if ($md5 == $md52) echo 'file was not modified';
+?>
+===AFTER===
+<?php
+include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip/a.php';
+include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip/b.php';
+include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+This is a
+This is b
+This is b/c
+===AFTER===
+This is a
+This is b
+
+Warning: include(%sdelete_in_phar_confirm.phar.zip/b/c.php): failed to open stream: phar error: "b/c.php" is not a file in phar "%sdelete_in_phar_confirm.phar.zip" in %sdelete_in_phar_confirm.php on line %d
+
+Warning: include(): Failed opening 'phar://%sdelete_in_phar_confirm.phar.zip/b/c.php' for inclusion (include_path='%s') in %sdelete_in_phar_confirm.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/zip/dir.phpt b/ext/phar/tests/zip/dir.phpt
new file mode 100644
index 0000000..3cbeacd
--- /dev/null
+++ b/ext/phar/tests/zip/dir.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Phar: mkdir/rmdir test zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$pname = 'phar://' . $fname;
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php';
+$pname2 = 'phar://' . $fname2;
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php';
+$pname3 = 'phar://' . $fname3;
+$phar = new Phar($fname);
+var_dump($phar->isFileFormat(Phar::ZIP));
+
+$phar->addEmptyDir('test');
+var_dump($phar['test']->isDir());
+var_dump($phar['test/']->isDir());
+copy($fname, $fname2);
+mkdir($pname . '/another/dir/');
+var_dump($phar['another/dir']->isDir());
+rmdir($pname . '/another/dir/');
+copy($fname, $fname3);
+clearstatcache();
+var_dump(file_exists($pname . '/another/dir/'));
+var_dump(file_exists($pname2 . '/test/'));
+var_dump(file_exists($pname3 . '/another/dir/'));
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
diff --git a/ext/phar/tests/zip/exists_as_phar.phpt b/ext/phar/tests/zip/exists_as_phar.phpt
new file mode 100644
index 0000000..ccb37e8
--- /dev/null
+++ b/ext/phar/tests/zip/exists_as_phar.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Phar: phar-based phar named with ".zip" fails
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$tname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://hio';
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<?php echo "This is a\n"; include "'.$alias.'/b.php"; ?>';
+$phar->setAlias('hio');
+$phar->addEmptyDir('test');
+$phar->stopBuffering();
+copy($fname, $tname);
+$phar->setAlias('hio2');
+
+try {
+ $p = new Phar($tname);
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+?>
+--EXPECTF--
+phar zip error: phar "%sexists_as_phar.phar.zip" already exists as a regular phar and must be deleted from disk prior to creating as a zip-based phar
+===DONE===
diff --git a/ext/phar/tests/zip/files/badalias1.phar.zip b/ext/phar/tests/zip/files/badalias1.phar.zip
new file mode 100644
index 0000000..0e3adfc
--- /dev/null
+++ b/ext/phar/tests/zip/files/badalias1.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/badalias2.phar.zip b/ext/phar/tests/zip/files/badalias2.phar.zip
new file mode 100644
index 0000000..7b5baaa
--- /dev/null
+++ b/ext/phar/tests/zip/files/badalias2.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/badalias3.phar.zip b/ext/phar/tests/zip/files/badalias3.phar.zip
new file mode 100644
index 0000000..7b5baaa
--- /dev/null
+++ b/ext/phar/tests/zip/files/badalias3.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/badalias4.phar.zip b/ext/phar/tests/zip/files/badalias4.phar.zip
new file mode 100644
index 0000000..49b7be0
--- /dev/null
+++ b/ext/phar/tests/zip/files/badalias4.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/badalias5.phar.zip b/ext/phar/tests/zip/files/badalias5.phar.zip
new file mode 100644
index 0000000..9f2b0e8
--- /dev/null
+++ b/ext/phar/tests/zip/files/badalias5.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/bz2_alias.phar.zip b/ext/phar/tests/zip/files/bz2_alias.phar.zip
new file mode 100644
index 0000000..8d3082a
--- /dev/null
+++ b/ext/phar/tests/zip/files/bz2_alias.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/bzip2.zip b/ext/phar/tests/zip/files/bzip2.zip
new file mode 100644
index 0000000..2f27f02
--- /dev/null
+++ b/ext/phar/tests/zip/files/bzip2.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/cdir_offset.zip b/ext/phar/tests/zip/files/cdir_offset.zip
new file mode 100644
index 0000000..9172554
--- /dev/null
+++ b/ext/phar/tests/zip/files/cdir_offset.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsup1.zip b/ext/phar/tests/zip/files/compress_unsup1.zip
new file mode 100644
index 0000000..bd1f72b
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsup1.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsup10.zip b/ext/phar/tests/zip/files/compress_unsup10.zip
new file mode 100644
index 0000000..2a7f221
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsup10.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsup14.zip b/ext/phar/tests/zip/files/compress_unsup14.zip
new file mode 100644
index 0000000..d494143
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsup14.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsup18.zip b/ext/phar/tests/zip/files/compress_unsup18.zip
new file mode 100644
index 0000000..7ef2217
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsup18.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsup19.zip b/ext/phar/tests/zip/files/compress_unsup19.zip
new file mode 100644
index 0000000..8086d45
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsup19.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsup2.zip b/ext/phar/tests/zip/files/compress_unsup2.zip
new file mode 100644
index 0000000..d827d2d
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsup2.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsup3.zip b/ext/phar/tests/zip/files/compress_unsup3.zip
new file mode 100644
index 0000000..d4acc60
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsup3.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsup4.zip b/ext/phar/tests/zip/files/compress_unsup4.zip
new file mode 100644
index 0000000..76a4dc1
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsup4.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsup5.zip b/ext/phar/tests/zip/files/compress_unsup5.zip
new file mode 100644
index 0000000..d42155d
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsup5.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsup6.zip b/ext/phar/tests/zip/files/compress_unsup6.zip
new file mode 100644
index 0000000..5084640
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsup6.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsup7.zip b/ext/phar/tests/zip/files/compress_unsup7.zip
new file mode 100644
index 0000000..65c2e23
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsup7.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsup9.zip b/ext/phar/tests/zip/files/compress_unsup9.zip
new file mode 100644
index 0000000..df0c767
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsup9.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsup97.zip b/ext/phar/tests/zip/files/compress_unsup97.zip
new file mode 100644
index 0000000..907f365
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsup97.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsup98.zip b/ext/phar/tests/zip/files/compress_unsup98.zip
new file mode 100644
index 0000000..54f19fb
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsup98.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/compress_unsupunknown.zip b/ext/phar/tests/zip/files/compress_unsupunknown.zip
new file mode 100644
index 0000000..1706954
--- /dev/null
+++ b/ext/phar/tests/zip/files/compress_unsupunknown.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/corrupt2.php.inc b/ext/phar/tests/zip/files/corrupt2.php.inc
new file mode 100644
index 0000000..3edf620
--- /dev/null
+++ b/ext/phar/tests/zip/files/corrupt2.php.inc
@@ -0,0 +1,60 @@
+<?php
+include dirname(__FILE__) . '/corrupt_zipmaker.php.inc';
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii');
+$a->addFile('hi2', null, 'hii2', null, null, 'encrypt', 'encrypt');
+$a->writeZip(dirname(__FILE__) . '/encrypted.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii');
+$a->addFile('', null, 'stdin');
+$a->writeZip(dirname(__FILE__) . '/stdin.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hii', null, 'hii', null, null, 'filename_len', 'filename_len');
+$a->addFile('hi', null, 'hii');
+$a->writeZip(dirname(__FILE__) . '/truncfilename.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress');
+$a->writeZip(dirname(__FILE__) . '/compress_unsup1.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 2);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup2.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 3);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup3.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 4);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup4.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 5);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup5.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 6);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup6.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 7);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup7.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 9);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup9.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 10);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup10.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 14);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup14.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 18);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup18.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 19);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup19.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 97);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup97.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 98);
+$a->writeZip(dirname(__FILE__) . '/compress_unsup98.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, 'compress', 'compress', 11);
+$a->writeZip(dirname(__FILE__) . '/compress_unsupunknown.zip');
+?>
diff --git a/ext/phar/tests/zip/files/corrupt3.php.inc b/ext/phar/tests/zip/files/corrupt3.php.inc
new file mode 100644
index 0000000..05ba70b
--- /dev/null
+++ b/ext/phar/tests/zip/files/corrupt3.php.inc
@@ -0,0 +1,9 @@
+<?php
+include dirname(__FILE__) . '/corrupt_zipmaker.php.inc';
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii', null, null, null, 'extralen1');
+$a->writeZip(dirname(__FILE__) . '/extralen_toolong.zip');
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii');
+$a->writeZip(dirname(__FILE__) . '/disknumber.zip', 'disknumber');
+?>
diff --git a/ext/phar/tests/zip/files/corrupt_count1.php.inc b/ext/phar/tests/zip/files/corrupt_count1.php.inc
new file mode 100644
index 0000000..314fdef
--- /dev/null
+++ b/ext/phar/tests/zip/files/corrupt_count1.php.inc
@@ -0,0 +1,11 @@
+<?php
+include dirname(__FILE__) . '/corrupt_zipmaker.php.inc';
+$a = new corrupt_zipmaker;
+$a->addFile('hi', null, 'hii');
+$a->addFile('hi2', null, 'hii2');
+$a->writeZip(dirname(__FILE__) . '/count1.zip', 'count1');
+$a->writeZip(dirname(__FILE__) . '/count2.zip', 'count2');
+$a->writeZip(dirname(__FILE__) . '/nozipend.zip', 'none');
+$a->writeZip(dirname(__FILE__) . '/filecomment.zip', 'comment');
+$a->writeZip(dirname(__FILE__) . '/cdir_offset.zip', 'cdir_offset');
+?>
diff --git a/ext/phar/tests/zip/files/corrupt_zipmaker.php.inc b/ext/phar/tests/zip/files/corrupt_zipmaker.php.inc
new file mode 100644
index 0000000..9fbfe34
--- /dev/null
+++ b/ext/phar/tests/zip/files/corrupt_zipmaker.php.inc
@@ -0,0 +1,332 @@
+<?php
+// this corrupt zip maker uses portions of Vincent Lascaux's File_Archive to create
+// specifically corrupted zip archives for unit-testing zip support in the phar extension
+// and was modified by Greg Beaver
+/**
+ * ZIP archive writer
+ *
+ * PHP versions 4 and 5
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330,Boston,MA 02111-1307 USA
+ *
+ * @category File Formats
+ * @package File_Archive
+ * @author Vincent Lascaux <vincentlascaux@php.net>
+ * @copyright 1997-2005 The PHP Group
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL
+ * @version CVS: $Id$
+ * @link http://pear.php.net/package/File_Archive
+ */
+
+/**
+ * ZIP archive writer
+ */
+class corrupt_zipmaker
+{
+ /**
+ * @var int Current position in the writer
+ * @access private
+ */
+ var $offset = 0;
+
+ /**
+ * @var string Optionnal comment to add to the zip
+ * @access private
+ */
+ var $comment = "";
+
+ /**
+ * @var string Data written at the end of the ZIP file
+ * @access private
+ */
+ var $central = "";
+
+ /**
+ * @var string Data written at the start of the ZIP file
+ * @access private
+ */
+ var $start = "";
+
+ /**
+ * Set a comment on the ZIP file
+ */
+ function setComment($comment) { $this->comment = $comment; }
+
+ /**
+ * @param int $time Unix timestamp of the date to convert
+ * @return the date formated as a ZIP date
+ */
+ function getMTime($time)
+ {
+ $mtime = ($time !== null ? getdate($time) : getdate());
+ $mtime = preg_replace(
+ "/(..){1}(..){1}(..){1}(..){1}/",
+ "\\x\\4\\x\\3\\x\\2\\x\\1",
+ dechex(($mtime['year']-1980<<25)|
+ ($mtime['mon' ]<<21)|
+ ($mtime['mday' ]<<16)|
+ ($mtime['hours' ]<<11)|
+ ($mtime['minutes']<<5)|
+ ($mtime['seconds']>>1)));
+ eval('$mtime = "'.$mtime.'";');
+ return $mtime;
+ }
+
+ private function getFileEntry($compmethod, $mtime, $crc32, $complength, $uncomplength, $filename, $data, $corrupt, $fakecomp)
+ {
+ switch ($corrupt) {
+ case null :
+ $file = "PK\x03\x04\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvv", $crc32, $complength, $uncomplength, strlen($filename), 0x00) .
+ $filename .
+ $data;
+ break;
+ case 'compress' :
+ $file = "PK\x03\x04\x14\x00\x00\x00" . pack('v', $fakecomp) .
+ $mtime .
+ pack("VVVvv", $crc32, $complength, $uncomplength, strlen($filename), 0x00) .
+ $filename .
+ $data;
+ break;
+ case 'encrypt' :
+ $file = "PK\x03\x04\x14\x00\x01\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvv", $crc32, $complength, $uncomplength, strlen($filename), 0x00) .
+ $filename .
+ $data;
+ break;
+ case 'crc32' :
+ $file = "PK\x03\x04\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvv", $crc32 + 1, $complength, $uncomplength, strlen($filename), 0x00) .
+ $filename .
+ $data;
+ break;
+ case 'complength' :
+ $file = "PK\x03\x04\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvv", $crc32, $complength + 1, $uncomplength, strlen($filename), 0x00) .
+ $filename .
+ $data;
+ break;
+ case 'uncomplength' :
+ $file = "PK\x03\x04\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvv", $crc32, $complength, $uncomplength - 1, strlen($filename), 0x00) .
+ $filename .
+ $data;
+ break;
+ case 'filename_len' :
+ $file = "PK\x03\x04\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvv", $crc32, $complength, $uncomplength, strlen($filename) - 1, 0x00) .
+ $filename .
+ $data;
+ break;
+ case 'extra_len' :
+ $file = "PK\x03\x04\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvv", $crc32, $complength, $uncomplength, strlen($filename), 1) .
+ $filename .
+ $data;
+ break;
+ case 'filename' :
+ $file = "PK\x03\x04\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvv", $crc32, $complength, $uncomplength, strlen($filename), 0x00) .
+ substr($filename, 1) .
+ $data;
+ break;
+ case 'data' :
+ $file = "PK\x03\x04\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvv", $crc32, $complength, $uncomplength, strlen($filename), 0x00) .
+ $filename .
+ substr($data, 1);
+ break;
+ }
+ return $file;
+ }
+
+ private function getCentralEntry($compmethod, $mtime, $crc32, $complength, $uncomplength, $filename, $comment, $corrupt, &$offset, $fakecomp)
+ {
+ settype($comment, 'string');
+ switch ($corrupt) {
+ case null :
+ $central = "PK\x01\x02\x00\x00\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvvvvvVV", $crc32, $complength, $uncomplength, strlen($filename), 0x00,strlen($comment),0x00,0x00,
+ 0x0000, $this->offset).
+ $filename . $comment;
+ $offset = strlen($central);
+ break;
+ case 'encrypt' :
+ $central = "PK\x01\x02\x00\x00\x14\x00\x01\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvvvvvVV", $crc32, $complength, $uncomplength, strlen($filename), 0x00,strlen($comment),0x00,0x00,
+ 0x0000, $this->offset).
+ $filename . $comment;
+ $offset = strlen($central);
+ break;
+ case 'compress' :
+ $central = "PK\x01\x02\x00\x00\x14\x00\x00\x00" . pack('v', $fakecomp) .
+ $mtime .
+ pack("VVVvvvvvVV", $crc32, $complength, $uncomplength, strlen($filename), 0x00,strlen($comment),0x00,0x00,
+ 0x0000, $this->offset).
+ $filename . $comment;
+ $offset = strlen($central);
+ break;
+ case 'crc32' :
+ $central = "PK\x01\x02\x00\x00\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvvvvvVV", $crc32 + 1, $complength, $uncomplength, strlen($filename), 0x00,strlen($comment),0x00,0x00,
+ 0x0000, $this->offset).
+ $filename . $comment;
+ $offset = strlen($central);
+ break;
+ case 'complength' :
+ $central = "PK\x01\x02\x00\x00\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvvvvvVV", $crc32, $complength - 1, $uncomplength, strlen($filename), 0x00,strlen($comment),0x00,0x00,
+ 0x0000, $this->offset).
+ $filename . $comment;
+ $offset = strlen($central);
+ break;
+ case 'uncomplength' :
+ $central = "PK\x01\x02\x00\x00\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvvvvvVV", $crc32, $complength, $uncomplength - 1, strlen($filename), 0x00,strlen($comment),0x00,0x00,
+ 0x0000, $this->offset).
+ $filename . $comment;
+ $offset = strlen($central);
+ break;
+ case 'filename_len' :
+ $central = "PK\x01\x02\x00\x00\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvvvvvVV", $crc32, $complength, $uncomplength, strlen($filename) - 1, 0x00,strlen($comment),0x00,0x00,
+ 0x0000, $this->offset).
+ $filename . $comment;
+ $offset = strlen($central);
+ break;
+ case 'offset' :
+ $central = "PK\x01\x02\x00\x00\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvvvvvVV", $crc32, $complength, $uncomplength, strlen($filename), 0x00,strlen($comment),0x00,0x00,
+ 0x0000, $this->offset - 1).
+ $filename . $comment;
+ $offset = strlen($central) - 1;
+ break;
+ case 'comment' :
+ $central = "PK\x01\x02\x00\x00\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvvvvvVV", $crc32, $complength, $uncomplength, strlen($filename), 0x00,strlen($comment) + 1,0x00,0x00,
+ 0x0000, $this->offset).
+ $filename . $comment;
+ $offset = strlen($central);
+ break;
+ case 'extralen1' :
+ $extra = 'nu' . 0xffff; // way huge size
+ $central = "PK\x01\x02\x00\x00\x14\x00\x00\x00" . pack('v', $compmethod) .
+ $mtime .
+ pack("VVVvvvvvVV", $crc32, $complength, $uncomplength, strlen($filename), strlen($extra),strlen($comment),0x00,0x00,
+ 0x0000, $this->offset).
+ $filename . $extra . $comment;
+ $offset = strlen($central);
+ break;
+ }
+ return $central;
+ }
+
+ function addFile($filename, $mtime, $data, $comment = null, $compress = null, $filecorrupt = null, $centralcorrupt = null, $fakecomp = 1)
+ {
+ $mtime = $this->getMTime($mtime ? $mtime : null);
+
+ $uncomplength = strlen($data);
+ $crc32 = crc32($data) & 0xFFFFFFFF;
+ $compmethod = 0;
+ switch ($compress) {
+ case 'gz' :
+ $data = gzcompress($data);
+ $compmethod = 8;
+ break;
+ case 'bz2' :
+ $data = bzcompress($data);
+ $compmethod = 12;
+ break;
+ }
+ $complength = strlen($data);
+
+ $this->start .= ($file = $this->getFileEntry($compmethod, $mtime, $crc32, $complength, $uncomplength, $filename, $data, $filecorrupt, $fakecomp));
+
+ $offset = 0;
+ $this->central .= $this->getCentralEntry($compmethod, $mtime, $crc32, $complength, $uncomplength, $filename, $comment, $centralcorrupt, $offset, $fakecomp);
+
+ $this->offset += $offset;
+ $this->count++;
+ }
+
+ function writeZip($zipfile, $corrupt = null)
+ {
+ $write = $this->start . $this->central;
+ switch ($corrupt) {
+ case null :
+ $write .= "PK\x05\x06\x00\x00\x00\x00" .
+ pack("vvVVv", $this->count, $this->count,
+ $this->offset, strlen($this->start),
+ strlen($this->comment)) . $this->comment;
+ break;
+ case 'disknumber' :
+ $write .= "PK\x05\x06\x01\x00\x01\x00" .
+ pack("vvVVv", $this->count, $this->count,
+ $this->offset, strlen($this->start),
+ strlen($this->comment)) . $this->comment;
+ break;
+ case 'count1' :
+ $write .= "PK\x05\x06\x00\x00\x00\x00" .
+ pack("vvVVv", $this->count + 1, $this->count,
+ $this->offset, strlen($this->start),
+ strlen($this->comment)) . $this->comment;
+ break;
+ case 'count2' :
+ $write .= "PK\x05\x06\x00\x00\x00\x00" .
+ pack("vvVVv", $this->count, $this->count + 1,
+ $this->offset, strlen($this->start),
+ strlen($this->comment)) . $this->comment;
+ break;
+ case 'cdir_offset' :
+ $write .= "PK\x05\x06\x00\x00\x00\x00" .
+ pack("vvVVv", $this->count, $this->count,
+ $this->offset, strlen($this->start) - 3,
+ strlen($this->comment)) . $this->comment;
+ break;
+ case 'cdir_len' :
+ $write .= "PK\x05\x06\x00\x00\x00\x00" .
+ pack("vvVVv", $this->count, $this->count,
+ $this->offset - 5, strlen($this->start),
+ strlen($this->comment)) . $this->comment;
+ break;
+ case 'comment' :
+ $write .= "PK\x05\x06\x00\x00\x00\x00" .
+ pack("vvVVv", $this->count, $this->count,
+ strlen($this->start), $this->offset + 1,
+ strlen($this->comment) + 1) . $this->comment;
+ break;
+ case 'none' :
+ }
+ file_put_contents($zipfile, $write);
+ }
+}
+?> \ No newline at end of file
diff --git a/ext/phar/tests/zip/files/count1.zip b/ext/phar/tests/zip/files/count1.zip
new file mode 100644
index 0000000..73b5561
--- /dev/null
+++ b/ext/phar/tests/zip/files/count1.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/count2.zip b/ext/phar/tests/zip/files/count2.zip
new file mode 100644
index 0000000..6aa2619
--- /dev/null
+++ b/ext/phar/tests/zip/files/count2.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/disknumber.zip b/ext/phar/tests/zip/files/disknumber.zip
new file mode 100644
index 0000000..f20db05
--- /dev/null
+++ b/ext/phar/tests/zip/files/disknumber.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/encrypted.zip b/ext/phar/tests/zip/files/encrypted.zip
new file mode 100644
index 0000000..dee73ca
--- /dev/null
+++ b/ext/phar/tests/zip/files/encrypted.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/extralen_toolong.zip b/ext/phar/tests/zip/files/extralen_toolong.zip
new file mode 100644
index 0000000..a03a403
--- /dev/null
+++ b/ext/phar/tests/zip/files/extralen_toolong.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/filecomment.zip b/ext/phar/tests/zip/files/filecomment.zip
new file mode 100644
index 0000000..414b121
--- /dev/null
+++ b/ext/phar/tests/zip/files/filecomment.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/frontcontroller.phar.inc b/ext/phar/tests/zip/files/frontcontroller.phar.inc
new file mode 100644
index 0000000..241dceb
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller.phar.inc
@@ -0,0 +1,13 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller.phar.zip');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller.phar.zip');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a['index.php'] = 'here is my index';
+$a->setStub('<?php
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/zip/files/frontcontroller.phar.zip b/ext/phar/tests/zip/files/frontcontroller.phar.zip
new file mode 100644
index 0000000..28992ff
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/frontcontroller10.phar.inc b/ext/phar/tests/zip/files/frontcontroller10.phar.inc
new file mode 100644
index 0000000..c973cc1
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller10.phar.inc
@@ -0,0 +1,20 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller10.phar.zip');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller10.phar.zip');
+$a['index.php'] = '<?php
+var_dump($_SERVER["PHP_SELF"]);
+var_dump($_SERVER["SCRIPT_NAME"]);
+var_dump($_SERVER["SCRIPT_FILENAME"]);
+var_dump($_SERVER["REQUEST_URI"]);
+var_dump($_SERVER["PHAR_PHP_SELF"]);
+var_dump($_SERVER["PHAR_SCRIPT_NAME"]);
+var_dump($_SERVER["PHAR_SCRIPT_FILENAME"]);
+var_dump($_SERVER["PHAR_REQUEST_URI"]);
+';
+$a->setStub('<?php
+Phar::mungServer(array("PHP_SELF", "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI", "OOPSIE"));
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/zip/files/frontcontroller10.phar.zip b/ext/phar/tests/zip/files/frontcontroller10.phar.zip
new file mode 100644
index 0000000..d206c89
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller10.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/frontcontroller11.phar.inc b/ext/phar/tests/zip/files/frontcontroller11.phar.inc
new file mode 100644
index 0000000..c24a6f1
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller11.phar.inc
@@ -0,0 +1,20 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller11.phar.zip');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller11.phar.zip');
+$a['index.php'] = '<?php
+var_dump($_SERVER["PHP_SELF"]);
+var_dump($_SERVER["SCRIPT_NAME"]);
+var_dump($_SERVER["SCRIPT_FILENAME"]);
+var_dump($_SERVER["REQUEST_URI"]);
+var_dump($_SERVER["PHAR_PHP_SELF"]);
+var_dump($_SERVER["PHAR_SCRIPT_NAME"]);
+var_dump($_SERVER["PHAR_SCRIPT_FILENAME"]);
+var_dump($_SERVER["PHAR_REQUEST_URI"]);
+';
+$a->setStub('<?php
+Phar::mungServer(array(array(), "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI"));
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/zip/files/frontcontroller11.phar.zip b/ext/phar/tests/zip/files/frontcontroller11.phar.zip
new file mode 100644
index 0000000..9942183
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller11.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/frontcontroller12.phar.inc b/ext/phar/tests/zip/files/frontcontroller12.phar.inc
new file mode 100644
index 0000000..c5f38ff
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller12.phar.inc
@@ -0,0 +1,20 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller12.phar.zip');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller12.phar.zip');
+$a['index.php'] = '<?php
+var_dump($_SERVER["PHP_SELF"]);
+var_dump($_SERVER[b"SCRIPT_NAME"]);
+var_dump($_SERVER[b"SCRIPT_FILENAME"]);
+var_dump($_SERVER[b"REQUEST_URI"]);
+var_dump($_SERVER[b"PHAR_PHP_SELF"]);
+var_dump($_SERVER[b"PHAR_SCRIPT_NAME"]);
+var_dump($_SERVER[b"PHAR_SCRIPT_FILENAME"]);
+var_dump($_SERVER[b"PHAR_REQUEST_URI"]);
+';
+$a->setStub('<?php
+Phar::mungServer(array("PHP_SELF", "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI"));
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/zip/files/frontcontroller12.phar.zip b/ext/phar/tests/zip/files/frontcontroller12.phar.zip
new file mode 100644
index 0000000..ed9be3d
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller12.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/frontcontroller2.phar.inc b/ext/phar/tests/zip/files/frontcontroller2.phar.inc
new file mode 100644
index 0000000..6cfa052
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller2.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller2.phar.zip');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller2.phar.zip');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "a.php");
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/zip/files/frontcontroller2.phar.zip b/ext/phar/tests/zip/files/frontcontroller2.phar.zip
new file mode 100644
index 0000000..3d7c0bb
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller2.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/frontcontroller3.phar.inc b/ext/phar/tests/zip/files/frontcontroller3.phar.inc
new file mode 100644
index 0000000..ccd55b7
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller3.phar.inc
@@ -0,0 +1,18 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller3.phar.zip');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller3.phar.zip');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+function s($a)
+{
+ static $b = array(b"/hi" => b"a.phps");
+ if (isset($b[$a])) return $b[$a];
+ return $a;
+}
+Phar::webPhar("whatever", "/index.php", null, array(), "s");
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/zip/files/frontcontroller3.phar.zip b/ext/phar/tests/zip/files/frontcontroller3.phar.zip
new file mode 100644
index 0000000..6f35a80
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller3.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/frontcontroller4.phar.inc b/ext/phar/tests/zip/files/frontcontroller4.phar.inc
new file mode 100644
index 0000000..9f664cf
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller4.phar.inc
@@ -0,0 +1,18 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller4.phar.zip');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller4.phar.zip');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+function s($a)
+{
+ static $b = array(b"/hi" => false);
+ if (isset($b[$a])) return $b[$a];
+ return $a;
+}
+Phar::webPhar("whatever", "index.php", null, array(), "s");
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/zip/files/frontcontroller4.phar.zip b/ext/phar/tests/zip/files/frontcontroller4.phar.zip
new file mode 100644
index 0000000..fb27ccb
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller4.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/frontcontroller5.phar.inc b/ext/phar/tests/zip/files/frontcontroller5.phar.inc
new file mode 100644
index 0000000..931fa97
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller5.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller5.phar.zip');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller5.phar.zip');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", null, array(0 => "oops"));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/zip/files/frontcontroller5.phar.zip b/ext/phar/tests/zip/files/frontcontroller5.phar.zip
new file mode 100644
index 0000000..7fa7ab6
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller5.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/frontcontroller6.phar.inc b/ext/phar/tests/zip/files/frontcontroller6.phar.inc
new file mode 100644
index 0000000..da178fe
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller6.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller6.phar.zip');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller6.phar.zip');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", null, array("php" => 100));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/zip/files/frontcontroller6.phar.zip b/ext/phar/tests/zip/files/frontcontroller6.phar.zip
new file mode 100644
index 0000000..eac313c
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller6.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/frontcontroller7.phar.inc b/ext/phar/tests/zip/files/frontcontroller7.phar.inc
new file mode 100644
index 0000000..a186491
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller7.phar.inc
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller7.phar.zip');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller7.phar.zip');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", null, array("php" => null));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/zip/files/frontcontroller7.phar.zip b/ext/phar/tests/zip/files/frontcontroller7.phar.zip
new file mode 100644
index 0000000..be72052
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller7.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/frontcontroller8.phar.inc b/ext/phar/tests/zip/files/frontcontroller8.phar.inc
new file mode 100644
index 0000000..e04ac41
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller8.phar.inc
@@ -0,0 +1,13 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller8.phar.zip');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller8.phar.zip');
+$a['a.phps'] = 'hio1';
+$a['a.jpg'] = 'hio2';
+$a['a.php'] = '<?php function hio(){}';
+$a['fronk.gronk'] = 'hio3';
+$a->setStub('<?php
+Phar::webPhar("whatever", "index.php", null, array("jpg" => "foo/bar", "phps" => Phar::PHP, "php" => Phar::PHPS));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/zip/files/frontcontroller8.phar.zip b/ext/phar/tests/zip/files/frontcontroller8.phar.zip
new file mode 100644
index 0000000..d065cd5
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller8.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/frontcontroller9.phar.inc b/ext/phar/tests/zip/files/frontcontroller9.phar.inc
new file mode 100644
index 0000000..5044045
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller9.phar.inc
@@ -0,0 +1,14 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller9.phar.zip');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller9.phar.zip');
+$a['a.phps'] = 'hio1';
+$a['a.jpg'] = 'hio2';
+$a['a.php'] = '<?php function hio(){}';
+$a['fronk.gronk'] = 'hio3';
+$a->setStub('<?php
+Phar::mungServer(array());
+Phar::webPhar("whatever", "index.php", null, array("jpg" => "foo/bar", "phps" => Phar::PHP, "php" => Phar::PHPS));
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/zip/files/frontcontroller9.phar.zip b/ext/phar/tests/zip/files/frontcontroller9.phar.zip
new file mode 100644
index 0000000..82c4eb7
--- /dev/null
+++ b/ext/phar/tests/zip/files/frontcontroller9.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/make_invalid_tar.php.inc b/ext/phar/tests/zip/files/make_invalid_tar.php.inc
new file mode 100644
index 0000000..cec8ef7
--- /dev/null
+++ b/ext/phar/tests/zip/files/make_invalid_tar.php.inc
@@ -0,0 +1,12 @@
+<?php
+include dirname(__FILE__) . '/tarmaker.php.inc';
+class corrupter extends tarmaker {
+function close()
+{
+ parent::close();
+ $fp = fopen($this->path, 'r+b');
+ fseek($fp, 20);
+ fwrite($fp, 'oopsie');
+ fclose($fp);
+}
+} \ No newline at end of file
diff --git a/ext/phar/tests/zip/files/metadata.phar.inc b/ext/phar/tests/zip/files/metadata.phar.inc
new file mode 100644
index 0000000..932fc96
--- /dev/null
+++ b/ext/phar/tests/zip/files/metadata.phar.inc
@@ -0,0 +1,11 @@
+<?php
+@unlink(dirname(__FILE__) . '/metadata.phar.zip');
+$a = new Phar(dirname(__FILE__) . '/metadata.phar.zip');
+$a['a'] = 'a';
+$a['b'] = 'b';
+$a['b']->setMetadata('hi there');
+$a['c'] = 'c';
+$a['c']->setMetadata(array('hi', 'there'));
+$a['d'] = 'd';
+$a['d']->setMetadata(array('hi'=>'there','foo'=>'bar'));
+?>
diff --git a/ext/phar/tests/zip/files/metadata.phar.zip b/ext/phar/tests/zip/files/metadata.phar.zip
new file mode 100644
index 0000000..3c5cf00
--- /dev/null
+++ b/ext/phar/tests/zip/files/metadata.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/nozipend.zip b/ext/phar/tests/zip/files/nozipend.zip
new file mode 100644
index 0000000..f976072
--- /dev/null
+++ b/ext/phar/tests/zip/files/nozipend.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/odt.odt b/ext/phar/tests/zip/files/odt.odt
new file mode 100644
index 0000000..527e09f
--- /dev/null
+++ b/ext/phar/tests/zip/files/odt.odt
Binary files differ
diff --git a/ext/phar/tests/zip/files/stdin.zip b/ext/phar/tests/zip/files/stdin.zip
new file mode 100644
index 0000000..4376eb6
--- /dev/null
+++ b/ext/phar/tests/zip/files/stdin.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/test.odt b/ext/phar/tests/zip/files/test.odt
new file mode 100644
index 0000000..c5cefe5
--- /dev/null
+++ b/ext/phar/tests/zip/files/test.odt
Binary files differ
diff --git a/ext/phar/tests/zip/files/truncfilename.zip b/ext/phar/tests/zip/files/truncfilename.zip
new file mode 100644
index 0000000..d8a526a
--- /dev/null
+++ b/ext/phar/tests/zip/files/truncfilename.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/zip.zip b/ext/phar/tests/zip/files/zip.zip
new file mode 100644
index 0000000..5ee9cae
--- /dev/null
+++ b/ext/phar/tests/zip/files/zip.zip
Binary files differ
diff --git a/ext/phar/tests/zip/files/zipmaker.php.inc b/ext/phar/tests/zip/files/zipmaker.php.inc
new file mode 100644
index 0000000..aceab0d
--- /dev/null
+++ b/ext/phar/tests/zip/files/zipmaker.php.inc
@@ -0,0 +1,70 @@
+<?php
+// stolen from PEAR2_Pyrus_Developer_Creator_Zip by Greg Beaver, the original author, for use in unit tests
+class zipmaker
+{
+ /**
+ * Path to archive file
+ *
+ * @var string
+ */
+ protected $archive;
+ /**
+ * @var ZIPArchive
+ */
+ protected $zip;
+ protected $path;
+ function __construct($path)
+ {
+ if (!class_exists('ZIPArchive')) {
+ throw new Exception(
+ 'Zip extension is not available');
+ }
+ $this->path = $path;
+ }
+
+ /**
+ * save a file inside this package
+ * @param string relative path within the package
+ * @param string|resource file contents or open file handle
+ */
+ function addFile($path, $fileOrStream)
+ {
+ if (is_resource($fileOrStream)) {
+ $this->zip->addFromString($path, stream_get_contents($fileOrStream));
+ } else {
+ $this->zip->addFromString($path, $fileOrStream);
+ }
+ }
+
+ /**
+ * Initialize the package creator
+ */
+ function init()
+ {
+ $this->zip = new ZipArchive;
+ if (true !== $this->zip->open($this->path, ZIPARCHIVE::CREATE)) {
+ throw new Exception(
+ 'Cannot open ZIP archive ' . $this->path
+ );
+ }
+ }
+
+ /**
+ * Create an internal directory, creating parent directories as needed
+ *
+ * This is a no-op for the tar creator
+ * @param string $dir
+ */
+ function mkdir($dir)
+ {
+ $this->zip->addEmptyDir($dir);
+ }
+
+ /**
+ * Finish saving the package
+ */
+ function close()
+ {
+ $this->zip->close();
+ }
+} \ No newline at end of file
diff --git a/ext/phar/tests/zip/files/zlib_alias.phar.zip b/ext/phar/tests/zip/files/zlib_alias.phar.zip
new file mode 100644
index 0000000..d6f98e8
--- /dev/null
+++ b/ext/phar/tests/zip/files/zlib_alias.phar.zip
Binary files differ
diff --git a/ext/phar/tests/zip/frontcontroller1.phar.phpt b/ext/phar/tests/zip/frontcontroller1.phar.phpt
new file mode 100644
index 0000000..b4ace60
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller1.phar.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller other zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller1.phar.php
+REQUEST_URI=/frontcontroller1.phar.php/a.jpg
+PATH_INFO=/a.jpg
+--FILE_EXTERNAL--
+files/frontcontroller.phar.zip
+--EXPECTHEADERS--
+Content-type: image/jpeg
+Content-length: 3
+--EXPECT--
+hio
diff --git a/ext/phar/tests/zip/frontcontroller10.phar.phpt b/ext/phar/tests/zip/frontcontroller10.phar.phpt
new file mode 100644
index 0000000..56d16c2
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller10.phar.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Phar front controller rewrite array invalid zip-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller10.phar.php
+REQUEST_URI=/frontcontroller10.phar.php/hi
+PATH_INFO=/hi
+--FILE_EXTERNAL--
+files/frontcontroller4.phar.zip
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+Status: 403 Access Denied
+--EXPECT--
+<html>
+ <head>
+ <title>Access Denied</title>
+ </head>
+ <body>
+ <h1>403 - File /hi Access Denied</h1>
+ </body>
+</html> \ No newline at end of file
diff --git a/ext/phar/tests/zip/frontcontroller11.phar.phpt b/ext/phar/tests/zip/frontcontroller11.phar.phpt
new file mode 100644
index 0000000..e4900cd
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller11.phar.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Phar front controller mime type extension is not a string zip-based
+--INI--
+default_charset=
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+<?php die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller11.phar.php
+REQUEST_URI=/frontcontroller11.phar.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller5.phar.zip
+--EXPECTHEADERS--
+Content-type: text/html
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Key of MIME type overrides array must be a file extension, was "0"' in %sfrontcontroller11.phar.php:2
+Stack trace:
+#0 %sfrontcontroller11.phar.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+ thrown in %sfrontcontroller11.phar.php on line 2 \ No newline at end of file
diff --git a/ext/phar/tests/zip/frontcontroller12.phar.phpt b/ext/phar/tests/zip/frontcontroller12.phar.phpt
new file mode 100644
index 0000000..504d037
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller12.phar.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller mime type unknown int zip-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller12.phar.php
+REQUEST_URI=/frontcontroller12.phar.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller6.phar.zip
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Unknown mime type specifier used, only Phar::PHP, Phar::PHPS and a mime type string are allowed' in %sfrontcontroller12.phar.php:2
+Stack trace:
+#0 %sfrontcontroller12.phar.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+ thrown in %sfrontcontroller12.phar.php on line 2 \ No newline at end of file
diff --git a/ext/phar/tests/zip/frontcontroller13.phar.phpt b/ext/phar/tests/zip/frontcontroller13.phar.phpt
new file mode 100644
index 0000000..4b9e910
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller13.phar.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller mime type not string/int zip-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller13.phar.php
+REQUEST_URI=/frontcontroller13.phar.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller7.phar.zip
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Unknown mime type specifier used (not a string or int), only Phar::PHP, Phar::PHPS and a mime type string are allowed' in %sfrontcontroller13.phar.php:2
+Stack trace:
+#0 %sfrontcontroller13.phar.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+ thrown in %sfrontcontroller13.phar.php on line 2 \ No newline at end of file
diff --git a/ext/phar/tests/zip/frontcontroller14.phar.phpt b/ext/phar/tests/zip/frontcontroller14.phar.phpt
new file mode 100644
index 0000000..496160b
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller14.phar.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller mime type override, other zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller14.phar.php
+REQUEST_URI=/frontcontroller14.phar.php/a.jpg
+PATH_INFO=/a.jpg
+--FILE_EXTERNAL--
+files/frontcontroller8.phar.zip
+--EXPECTHEADERS--
+Content-type: foo/bar
+Content-length: 4
+--EXPECT--
+hio2
diff --git a/ext/phar/tests/zip/frontcontroller15.phar.phpt b/ext/phar/tests/zip/frontcontroller15.phar.phpt
new file mode 100644
index 0000000..f6cd29a
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller15.phar.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller mime type override, Phar::PHPS zip-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller15.phar.php
+REQUEST_URI=/frontcontroller15.phar.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller8.phar.zip
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+<code><span style="color: #000000">
+<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
+</span>
+</code>
+
diff --git a/ext/phar/tests/zip/frontcontroller16.phar.phpt b/ext/phar/tests/zip/frontcontroller16.phar.phpt
new file mode 100644
index 0000000..d3f457b
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller16.phar.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller mime type override, Phar::PHP zip-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller16.phar.php
+REQUEST_URI=/frontcontroller16.phar.php/a.phps
+PATH_INFO=/a.phps
+--FILE_EXTERNAL--
+files/frontcontroller8.phar.zip
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+hio1
+
diff --git a/ext/phar/tests/zip/frontcontroller17.phar.phpt b/ext/phar/tests/zip/frontcontroller17.phar.phpt
new file mode 100644
index 0000000..5d52653
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller17.phar.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller mime type unknown zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller17.phar.php
+REQUEST_URI=/frontcontroller17.phar.php/fronk.gronk
+PATH_INFO=/fronk.gronk
+--FILE_EXTERNAL--
+files/frontcontroller8.phar.zip
+--EXPECTHEADERS--
+Content-type: application/octet-stream
+Content-length: 4
+--EXPECT--
+hio3
+
diff --git a/ext/phar/tests/zip/frontcontroller18.phar.phpt b/ext/phar/tests/zip/frontcontroller18.phar.phpt
new file mode 100644
index 0000000..dbd09ca
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller18.phar.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller $_SERVER munging failure zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller18.phar.php
+REQUEST_URI=/frontcontroller18.phar.php/fronk.gronk
+PATH_INFO=/fronk.gronk
+--FILE_EXTERNAL--
+files/frontcontroller9.phar.zip
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'No values passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller18.phar.php:2
+Stack trace:
+#0 %sfrontcontroller18.phar.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller18.phar.php on line 2
diff --git a/ext/phar/tests/zip/frontcontroller19.phar.phpt b/ext/phar/tests/zip/frontcontroller19.phar.phpt
new file mode 100644
index 0000000..0eb87bf
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller19.phar.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller $_SERVER munging failure 2 zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller19.phar.php
+REQUEST_URI=/frontcontroller19.phar.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller10.phar.zip
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Too many values passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller19.phar.php:2
+Stack trace:
+#0 %sfrontcontroller19.phar.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller19.phar.php on line 2
diff --git a/ext/phar/tests/zip/frontcontroller2.phar.phpt b/ext/phar/tests/zip/frontcontroller2.phar.phpt
new file mode 100644
index 0000000..e143e79
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller2.phar.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller PHP test zip-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller2.phar.php
+REQUEST_URI=/frontcontroller2.phar.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar.zip
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+hio
diff --git a/ext/phar/tests/zip/frontcontroller20.phar.phpt b/ext/phar/tests/zip/frontcontroller20.phar.phpt
new file mode 100644
index 0000000..b1caf52
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller20.phar.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller $_SERVER munging failure 3 zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller20.phar.php
+REQUEST_URI=/frontcontroller20.phar.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller11.phar.zip
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Non-string value passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller20.phar.php:2
+Stack trace:
+#0 %sfrontcontroller20.phar.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller20.phar.php on line 2
diff --git a/ext/phar/tests/zip/frontcontroller21.phar.phpt b/ext/phar/tests/zip/frontcontroller21.phar.phpt
new file mode 100644
index 0000000..74caa2c
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller21.phar.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Phar front controller $_SERVER munging success zip-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller21.phar.php
+REQUEST_URI=/frontcontroller21.phar.php/index.php?test=hi
+PATH_INFO=/index.php
+QUERY_STRING=test=hi
+--FILE_EXTERNAL--
+files/frontcontroller12.phar.zip
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+%unicode|string%(10) "/index.php"
+string(10) "/index.php"
+string(%d) "phar://%sfrontcontroller21.phar.php/index.php"
+string(18) "/index.php?test=hi"
+string(37) "/frontcontroller21.phar.php/index.php"
+string(27) "/frontcontroller21.phar.php"
+string(%d) "%sfrontcontroller21.phar.php"
+string(45) "/frontcontroller21.phar.php/index.php?test=hi" \ No newline at end of file
diff --git a/ext/phar/tests/zip/frontcontroller3.phar.phpt b/ext/phar/tests/zip/frontcontroller3.phar.phpt
new file mode 100644
index 0000000..88a8a24
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller3.phar.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Phar front controller phps zip-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller3.phar.php
+REQUEST_URI=/frontcontroller3.phar.php/a.phps
+PATH_INFO=/a.phps
+--FILE_EXTERNAL--
+files/frontcontroller.phar.zip
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+<code><span style="color: #000000">
+<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
+</span>
+</code>
diff --git a/ext/phar/tests/zip/frontcontroller4.phar.phpt b/ext/phar/tests/zip/frontcontroller4.phar.phpt
new file mode 100644
index 0000000..ff85eb6
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller4.phar.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar front controller index.php relocate (no /) zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller4.phar.php
+REQUEST_URI=/frontcontroller4.phar.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar.zip
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller4.phar.php/index.php
+--EXPECT--
diff --git a/ext/phar/tests/zip/frontcontroller5.phar.phpt b/ext/phar/tests/zip/frontcontroller5.phar.phpt
new file mode 100644
index 0000000..1705fac
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller5.phar.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar front controller index.php relocate zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller5.phar.php
+REQUEST_URI=/frontcontroller5.phar.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller.phar.zip
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller5.phar.php/index.php
+--EXPECT--
diff --git a/ext/phar/tests/zip/frontcontroller6.phar.phpt b/ext/phar/tests/zip/frontcontroller6.phar.phpt
new file mode 100644
index 0000000..15489f6
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller6.phar.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Phar front controller 404 zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller6.phar.php
+REQUEST_URI=/frontcontroller6.phar.php/notfound.php
+PATH_INFO=/notfound.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar.zip
+--EXPECTHEADERS--
+Status: 404 Not Found
+--EXPECT--
+<html>
+ <head>
+ <title>File Not Found</title>
+ </head>
+ <body>
+ <h1>404 - File /notfound.php Not Found</h1>
+ </body>
+</html> \ No newline at end of file
diff --git a/ext/phar/tests/zip/frontcontroller7.phar.phpt b/ext/phar/tests/zip/frontcontroller7.phar.phpt
new file mode 100644
index 0000000..828da0a
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller7.phar.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar front controller alternate index file zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller7.phar.php
+REQUEST_URI=/frontcontroller7.phar.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller2.phar.zip
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller7.phar.php/a.php
+--EXPECT--
diff --git a/ext/phar/tests/zip/frontcontroller8.phar.phpt b/ext/phar/tests/zip/frontcontroller8.phar.phpt
new file mode 100644
index 0000000..1b0d133
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller8.phar.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller no index file 404 zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller8.phar.php
+REQUEST_URI=/frontcontroller8.phar.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller3.phar.zip
+--EXPECTHEADERS--
+Status: 404 Not Found
+--EXPECT--
+<html>
+ <head>
+ <title>File Not Found</title>
+ </head>
+ <body>
+ <h1>404 - File /index.php Not Found</h1>
+ </body>
+</html> \ No newline at end of file
diff --git a/ext/phar/tests/zip/frontcontroller9.phar.phpt b/ext/phar/tests/zip/frontcontroller9.phar.phpt
new file mode 100644
index 0000000..4f12c9c
--- /dev/null
+++ b/ext/phar/tests/zip/frontcontroller9.phar.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Phar front controller rewrite array zip-based
+--INI--
+default_charset=UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller9.phar.php
+REQUEST_URI=/frontcontroller9.phar.php/hi
+PATH_INFO=/hi
+--FILE_EXTERNAL--
+files/frontcontroller3.phar.zip
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+<code><span style="color: #000000">
+<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
+</span>
+</code> \ No newline at end of file
diff --git a/ext/phar/tests/zip/getalias.phpt b/ext/phar/tests/zip/getalias.phpt
new file mode 100644
index 0000000..9c91763
--- /dev/null
+++ b/ext/phar/tests/zip/getalias.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Phar: getAlias() with an existing phar.zip
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+
+// sanity check with a virgin phar.zip
+$phar = new Phar($fname);
+var_dump($phar->getAlias());
+unset($phar);
+
+copy(dirname(__FILE__) . '/files/metadata.phar.zip', $fname);
+
+// existing phar.zip, no alias set
+$phar = new Phar($fname);
+var_dump($phar->getAlias());
+
+// check that default alias can be overwritten
+$phar->setAlias('jiminycricket');
+var_dump($phar->getAlias());
+unset($phar);
+
+// existing phar.zip, alias set
+$phar = new Phar($fname);
+var_dump($phar->getAlias());
+
+// check that alias can't be set manually
+try {
+ $phar['.phar/alias.txt'] = 'pinocchio';
+} catch (Exception $e) {
+ echo $e->getMessage()."\n";
+}
+var_dump($phar->getAlias());
+
+// check that user-defined alias can be overwritten
+$phar->setAlias('pinocchio');
+var_dump($phar->getAlias());
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+string(%d) "%sgetalias.phar.zip"
+string(%d) "%sgetalias.phar.zip"
+string(13) "jiminycricket"
+string(13) "jiminycricket"
+Cannot set alias ".phar/alias.txt" directly in phar "%sgetalias.phar.zip", use setAlias
+string(13) "jiminycricket"
+string(9) "pinocchio"
+===DONE===
diff --git a/ext/phar/tests/zip/largezip.phpt b/ext/phar/tests/zip/largezip.phpt
new file mode 100644
index 0000000..a8438eb
--- /dev/null
+++ b/ext/phar/tests/zip/largezip.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Phar: large zip file (zip edge cases)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php';
+$pname = 'phar://' . $fname;
+$pname2 = 'phar://' . $fname2;
+
+$p = new Phar($fname);
+$p['big'] = str_repeat(str_repeat('hi', 100), 1000);
+$p['big2'] = str_repeat(str_repeat('hi', 100), 1000);
+
+copy($fname, $fname2);
+$p2 = new Phar($fname2);
+var_dump(strlen($p2['big']->getContent()));
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); ?>
+--EXPECT--
+int(200000)
+===DONE===
diff --git a/ext/phar/tests/zip/metadata_write_commit.phpt b/ext/phar/tests/zip/metadata_write_commit.phpt
new file mode 100644
index 0000000..1629636
--- /dev/null
+++ b/ext/phar/tests/zip/metadata_write_commit.phpt
@@ -0,0 +1,88 @@
+--TEST--
+Phar with meta-data (write) zip-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$f2name = dirname(__FILE__) . '/files/metadata.phar.zip';
+$pname = 'phar://' . $fname;
+$p2name = 'phar://' . $f2name;
+
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = array('cont' => 'a');
+$files['b'] = array('cont' => 'b', 'meta' => 'hi there');
+$files['c'] = array('cont' => 'c', 'meta' => array('hi', 'there'));
+$files['d'] = array('cont' => 'd', 'meta' => array('hi'=>'there','foo'=>'bar'));
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($p2name.'/'.$name));
+}
+
+copy($f2name, $fname);
+$phar = new Phar($fname);
+$phar->startBuffering();
+$phar['a']->setMetadata(42);
+$phar['b']->setMetadata(NULL);
+$phar['c']->setMetadata(array(25, 'foo'=>'bar'));
+$phar['d']->setMetadata(true);
+$phar->setMetadata('hi');
+
+foreach($files as $name => $cont) {
+ var_dump($phar[$name]->getMetadata());
+}
+$phar->stopBuffering();
+
+unset($phar);
+
+$phar = new Phar($fname);
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+
+foreach($files as $name => $cont) {
+ var_dump($phar[$name]->getMetadata());
+}
+var_dump($phar->getMetadata());
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?>
+--EXPECT--
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+int(42)
+NULL
+array(2) {
+ [0]=>
+ int(25)
+ ["foo"]=>
+ string(3) "bar"
+}
+bool(true)
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+int(42)
+NULL
+array(2) {
+ [0]=>
+ int(25)
+ ["foo"]=>
+ string(3) "bar"
+}
+bool(true)
+string(2) "hi"
+===DONE===
diff --git a/ext/phar/tests/zip/metadata_write_commitU.phpt b/ext/phar/tests/zip/metadata_write_commitU.phpt
new file mode 100644
index 0000000..bc589af
--- /dev/null
+++ b/ext/phar/tests/zip/metadata_write_commitU.phpt
@@ -0,0 +1,88 @@
+--TEST--
+Phar with meta-data (write) zip-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$f2name = dirname(__FILE__) . '/files/metadata.phar.zip';
+$pname = 'phar://' . $fname;
+$p2name = 'phar://' . $f2name;
+
+$file = "<?php __HALT_COMPILER(); ?>";
+
+$files = array();
+$files['a'] = array('cont' => 'a');
+$files['b'] = array('cont' => 'b', 'meta' => 'hi there');
+$files['c'] = array('cont' => 'c', 'meta' => array('hi', 'there'));
+$files['d'] = array('cont' => 'd', 'meta' => array('hi'=>'there','foo'=>'bar'));
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($p2name.'/'.$name));
+}
+
+copy($f2name, $fname);
+$phar = new Phar($fname);
+$phar->startBuffering();
+$phar['a']->setMetadata(42);
+$phar['b']->setMetadata(NULL);
+$phar['c']->setMetadata(array(25, 'foo'=>'bar'));
+$phar['d']->setMetadata(true);
+$phar->setMetadata('hi');
+
+foreach($files as $name => $cont) {
+ var_dump($phar[$name]->getMetadata());
+}
+$phar->stopBuffering();
+
+unset($phar);
+
+$phar = new Phar($fname);
+
+foreach($files as $name => $cont) {
+ var_dump(file_get_contents($pname.'/'.$name));
+}
+
+foreach($files as $name => $cont) {
+ var_dump($phar[$name]->getMetadata());
+}
+var_dump($phar->getMetadata());
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?>
+--EXPECT--
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+int(42)
+NULL
+array(2) {
+ [0]=>
+ int(25)
+ [u"foo"]=>
+ unicode(3) "bar"
+}
+bool(true)
+string(1) "a"
+string(1) "b"
+string(1) "c"
+string(1) "d"
+int(42)
+NULL
+array(2) {
+ [0]=>
+ int(25)
+ [u"foo"]=>
+ unicode(3) "bar"
+}
+bool(true)
+unicode(2) "hi"
+===DONE===
diff --git a/ext/phar/tests/zip/notphar.phpt b/ext/phar/tests/zip/notphar.phpt
new file mode 100644
index 0000000..c0648c4
--- /dev/null
+++ b/ext/phar/tests/zip/notphar.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Phar: a non-executable zip with no stub named .phar.zip
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=1
+detect_unicode=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$pname = 'phar://' . $fname;
+
+copy(dirname(__FILE__) . '/files/zip.zip', $fname);
+include $fname;
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+Warning: include(phar://%snotphar.phar.zip/.phar/stub.php): failed to open stream: '%snotphar.phar.zip' is not a phar archive. Use PharData::__construct() for a standard zip or tar archive in %snotphar.php on line %d
+PK%a
diff --git a/ext/phar/tests/zip/odt.phpt b/ext/phar/tests/zip/odt.phpt
new file mode 100644
index 0000000..b007d44
--- /dev/null
+++ b/ext/phar/tests/zip/odt.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Phar: test a zip archive created by openoffice
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--FILE--
+<?php
+$a = new PharData(dirname(__FILE__) . '/files/odt.odt');
+foreach (new RecursiveIteratorIterator($a, RecursiveIteratorIterator::LEAVES_ONLY) as $b) {
+ if ($b->isDir()) {
+ echo "dir " . $b->getPathName() . "\n";
+ } else {
+ echo $b->getPathName() . "\n";
+ }
+}
+// this next line is for increased code coverage
+try {
+ $b = new Phar(dirname(__FILE__) . '/files/odt.odt');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECTF--
+phar://%sodt.odt/Configurations2/accelerator%ccurrent.xml
+phar://%sodt.odt/META-INF%cmanifest.xml
+phar://%sodt.odt/Thumbnails%cthumbnail.png
+phar://%sodt.odt%ccontent.xml
+phar://%sodt.odt%cmeta.xml
+phar://%sodt.odt%cmimetype
+phar://%sodt.odt%csettings.xml
+phar://%sodt.odt%cstyles.xml
+Cannot create phar '%sodt.odt', file extension (or combination) not recognised or the directory does not exist
+===DONE===
diff --git a/ext/phar/tests/zip/open_for_write_existing.phpt b/ext/phar/tests/zip/open_for_write_existing.phpt
new file mode 100644
index 0000000..bbf036c
--- /dev/null
+++ b/ext/phar/tests/zip/open_for_write_existing.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file) zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, b'extra');
+fclose($fp);
+include $alias . '/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECT--
+extra
+===DONE===
diff --git a/ext/phar/tests/zip/open_for_write_existing_b.phpt b/ext/phar/tests/zip/open_for_write_existing_b.phpt
new file mode 100644
index 0000000..b997c68
--- /dev/null
+++ b/ext/phar/tests/zip/open_for_write_existing_b.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file) zip-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+ini_set('phar.readonly', 1);
+
+function err_handler($errno, $errstr, $errfile, $errline) {
+ echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
+}
+
+set_error_handler("err_handler", E_RECOVERABLE_ERROR);
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, b'extra');
+fclose($fp);
+include $alias . '/b/c.php';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_existing_b.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b.php on line %d
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in %spen_for_write_existing_b.php on line %d
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in %spen_for_write_existing_b.php on line %d
+This is b/c
+===DONE===
diff --git a/ext/phar/tests/zip/open_for_write_existing_b_5_2.phpt b/ext/phar/tests/zip/open_for_write_existing_b_5_2.phpt
new file mode 100644
index 0000000..b88a496
--- /dev/null
+++ b/ext/phar/tests/zip/open_for_write_existing_b_5_2.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file) zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+ini_set('phar.readonly', 1);
+
+function err_handler($errno, $errstr, $errfile, $errline) {
+ echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
+}
+
+set_error_handler("err_handler", E_RECOVERABLE_ERROR);
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+include $alias . '/b/c.php';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_existing_b_5_2.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b_5_2.php on line %d
+
+Warning: fwrite(): supplied argument is not a valid stream resource in %spen_for_write_existing_b_5_2.php on line %d
+
+Warning: fclose(): supplied argument is not a valid stream resource in %spen_for_write_existing_b_5_2.php on line %d
+This is b/c
+===DONE===
diff --git a/ext/phar/tests/zip/open_for_write_existing_c.phpt b/ext/phar/tests/zip/open_for_write_existing_c.phpt
new file mode 100644
index 0000000..313ee4a
--- /dev/null
+++ b/ext/phar/tests/zip/open_for_write_existing_c.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file) zip-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+ini_set('phar.readonly', 1);
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, b'extra');
+fclose($fp);
+include $alias . '/b/c.php';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_existing_c.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c.php on line %d
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in %spen_for_write_existing_c.php on line %d
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in %spen_for_write_existing_c.php on line %d
+This is b/c
+===DONE===
diff --git a/ext/phar/tests/zip/open_for_write_existing_c_5_2.phpt b/ext/phar/tests/zip/open_for_write_existing_c_5_2.phpt
new file mode 100644
index 0000000..9e23fd5
--- /dev/null
+++ b/ext/phar/tests/zip/open_for_write_existing_c_5_2.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Phar: fopen a .phar for writing (existing file) zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+ini_set('phar.readonly', 1);
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+include $alias . '/b/c.php';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_existing_c_5_2.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c_5_2.php on line %d
+
+Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_existing_c_5_2.php on line %d
+
+Warning: fclose(): supplied argument is not a valid stream resource in %sopen_for_write_existing_c_5_2.php on line %d
+This is b/c
+===DONE===
diff --git a/ext/phar/tests/zip/open_for_write_newfile.phpt b/ext/phar/tests/zip/open_for_write_newfile.phpt
new file mode 100644
index 0000000..ffcae0f
--- /dev/null
+++ b/ext/phar/tests/zip/open_for_write_newfile.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Phar: fopen a .phar for writing (new file) zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+$fp = fopen($alias . '/b/new.php', 'wb');
+fwrite($fp, b'extra');
+fclose($fp);
+
+include $alias . '/b/c.php';
+include $alias . '/b/new.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECT--
+This is b/c
+extra
+===DONE===
diff --git a/ext/phar/tests/zip/open_for_write_newfile_b.phpt b/ext/phar/tests/zip/open_for_write_newfile_b.phpt
new file mode 100644
index 0000000..96fd2e4
--- /dev/null
+++ b/ext/phar/tests/zip/open_for_write_newfile_b.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Phar: fopen a .phar for writing (new file) zip-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+ini_set('phar.readonly', 1);
+
+function err_handler($errno, $errstr, $errfile, $errline) {
+ echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
+}
+
+set_error_handler("err_handler", E_RECOVERABLE_ERROR);
+
+$fp = fopen($alias . '/b/new.php', 'wb');
+fwrite($fp, b'extra');
+fclose($fp);
+
+include $alias . '/b/c.php';
+include $alias . '/b/new.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_newfile_b.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b.php on line %d
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_b.php on line %d
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_b.php on line %d
+This is b/c
+
+Warning: include(phar://%sopen_for_write_newfile_b.phar.zip/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_b.phar.zip" in %sopen_for_write_newfile_b.php on line %d
+
+Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_b.phar.zip/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_b.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/zip/open_for_write_newfile_b_5_2.phpt b/ext/phar/tests/zip/open_for_write_newfile_b_5_2.phpt
new file mode 100644
index 0000000..3032427
--- /dev/null
+++ b/ext/phar/tests/zip/open_for_write_newfile_b_5_2.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Phar: fopen a .phar for writing (new file) zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+ini_set('phar.readonly', 1);
+
+function err_handler($errno, $errstr, $errfile, $errline) {
+ echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
+}
+
+set_error_handler("err_handler", E_RECOVERABLE_ERROR);
+
+$fp = fopen($alias . '/b/new.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+
+include $alias . '/b/c.php';
+include $alias . '/b/new.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_newfile_b_5_2.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b_5_2.php on line %d
+
+Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_b_5_2.php on line %d
+
+Warning: fclose(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_b_5_2.php on line %d
+This is b/c
+
+Warning: include(phar://%sopen_for_write_newfile_b_5_2.phar.zip/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_b_5_2.phar.zip" in %sopen_for_write_newfile_b_5_2.php on line %d
+
+Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_b_5_2.phar.zip/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_b_5_2.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/zip/open_for_write_newfile_c.phpt b/ext/phar/tests/zip/open_for_write_newfile_c.phpt
new file mode 100644
index 0000000..ef580cb
--- /dev/null
+++ b/ext/phar/tests/zip/open_for_write_newfile_c.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Phar: fopen a .phar for writing (new file) zip-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later");
+?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+ini_set('phar.readonly', 1);
+
+$fp = fopen($alias . '/b/new.php', 'wb');
+fwrite($fp, b'extra');
+fclose($fp);
+
+include $alias . '/b/c.php';
+include $alias . '/b/new.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_newfile_c.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c.php on line %d
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_c.php on line %d
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_c.php on line %d
+This is b/c
+
+Warning: include(phar://%sopen_for_write_newfile_c.phar.zip/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_c.phar.zip" in %sopen_for_write_newfile_c.php on line %d
+
+Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_c.phar.zip/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_c.php on line %d
+
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/zip/open_for_write_newfile_c_5_2.phpt b/ext/phar/tests/zip/open_for_write_newfile_c_5_2.phpt
new file mode 100644
index 0000000..9bf5af5
--- /dev/null
+++ b/ext/phar/tests/zip/open_for_write_newfile_c_5_2.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Phar: fopen a .phar for writing (new file) zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub('<?php __HALT_COMPILER(); ?>');
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+ini_set('phar.readonly', 1);
+
+$fp = fopen($alias . '/b/new.php', 'wb');
+fwrite($fp, 'extra');
+fclose($fp);
+
+include $alias . '/b/c.php';
+include $alias . '/b/new.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+
+Warning: fopen(phar://%sopen_for_write_newfile_c_5_2.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c_5_2.php on line %d
+
+Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_c_5_2.php on line %d
+
+Warning: fclose(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_c_5_2.php on line %d
+This is b/c
+
+Warning: include(phar://%sopen_for_write_newfile_c_5_2.phar.zip/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_c_5_2.phar.zip" in %sopen_for_write_newfile_c_5_2.php on line %d
+
+Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_c_5_2.phar.zip/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_c_5_2.php on line %d
+
+===DONE===
diff --git a/ext/phar/tests/zip/phar_begin_setstub_commit.phpt b/ext/phar/tests/zip/phar_begin_setstub_commit.phpt
new file mode 100644
index 0000000..dc59f2f
--- /dev/null
+++ b/ext/phar/tests/zip/phar_begin_setstub_commit.phpt
@@ -0,0 +1,71 @@
+--TEST--
+Phar::startBuffering()/setStub()/stopBuffering() zip-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$p = new Phar(dirname(__FILE__) . '/brandnewphar.phar.zip', 0, 'brandnewphar.phar');
+var_dump($p->isFileFormat(Phar::ZIP));
+//var_dump($p->getStub());
+var_dump($p->isBuffering());
+$p->startBuffering();
+var_dump($p->isBuffering());
+$p['a.php'] = '<?php var_dump("Hello");';
+$p->setStub('<?php var_dump("First"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>');
+include 'phar://brandnewphar.phar/a.php';
+var_dump($p->getStub());
+$p['b.php'] = '<?php var_dump("World");';
+$p->setStub('<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER();');
+include 'phar://brandnewphar.phar/b.php';
+var_dump($p->getStub());
+$p->stopBuffering();
+echo "===COMMIT===\n";
+var_dump($p->isBuffering());
+include 'phar://brandnewphar.phar/a.php';
+include 'phar://brandnewphar.phar/b.php';
+var_dump($p->getStub());
+
+// add portion to test setting stub from resource
+file_put_contents(dirname(__FILE__) . '/myfakestub.php', '<?php var_dump("First resource"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>');
+$a = fopen(dirname(__FILE__) . '/myfakestub.php', 'rb');
+$p->setStub($a);
+var_dump($p->getStub());
+$c = strlen('<?php var_dump("First resource"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>');
+file_put_contents(dirname(__FILE__) . '/myfakestub.php', '<?php var_dump("First resource"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>' . 'extra stuff');
+fseek($a, 0);
+$p->setStub($a, $c);
+var_dump($p->getStub());
+fclose($a);
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/brandnewphar.phar.zip');
+unlink(dirname(__FILE__) . '/myfakestub.php');
+?>
+--EXPECT--
+bool(true)
+bool(false)
+bool(true)
+string(5) "Hello"
+string(84) "<?php var_dump("First"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+string(5) "World"
+string(85) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+===COMMIT===
+bool(false)
+string(5) "Hello"
+string(5) "World"
+string(85) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+string(93) "<?php var_dump("First resource"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+string(93) "<?php var_dump("First resource"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/zip/phar_begin_setstub_commitU.phpt b/ext/phar/tests/zip/phar_begin_setstub_commitU.phpt
new file mode 100644
index 0000000..2956fc6
--- /dev/null
+++ b/ext/phar/tests/zip/phar_begin_setstub_commitU.phpt
@@ -0,0 +1,71 @@
+--TEST--
+Phar::startBuffering()/setStub()/stopBuffering() zip-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$p = new Phar(dirname(__FILE__) . '/brandnewphar.phar.zip', 0, 'brandnewphar.phar');
+var_dump($p->isFileFormat(Phar::ZIP));
+//var_dump($p->getStub());
+var_dump($p->isBuffering());
+$p->startBuffering();
+var_dump($p->isBuffering());
+$p['a.php'] = '<?php var_dump("Hello");';
+$p->setStub('<?php var_dump("First"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>');
+include 'phar://brandnewphar.phar/a.php';
+var_dump($p->getStub());
+$p['b.php'] = '<?php var_dump("World");';
+$p->setStub('<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER();');
+include 'phar://brandnewphar.phar/b.php';
+var_dump($p->getStub());
+$p->stopBuffering();
+echo "===COMMIT===\n";
+var_dump($p->isBuffering());
+include 'phar://brandnewphar.phar/a.php';
+include 'phar://brandnewphar.phar/b.php';
+var_dump($p->getStub());
+
+// add portion to test setting stub from resource
+file_put_contents(dirname(__FILE__) . '/myfakestub.php', '<?php var_dump("First resource"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>');
+$a = fopen(dirname(__FILE__) . '/myfakestub.php', 'rb');
+$p->setStub($a);
+var_dump($p->getStub());
+$c = strlen('<?php var_dump("First resource"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>');
+file_put_contents(dirname(__FILE__) . '/myfakestub.php', '<?php var_dump("First resource"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>' . 'extra stuff');
+fseek($a, 0);
+$p->setStub($a, $c);
+var_dump($p->getStub());
+fclose($a);
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/brandnewphar.phar.zip');
+unlink(dirname(__FILE__) . '/myfakestub.php');
+?>
+--EXPECT--
+bool(true)
+bool(false)
+bool(true)
+unicode(5) "Hello"
+string(84) "<?php var_dump("First"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+unicode(5) "World"
+string(85) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+===COMMIT===
+bool(false)
+unicode(5) "Hello"
+unicode(5) "World"
+string(85) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+string(93) "<?php var_dump("First resource"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+string(93) "<?php var_dump("First resource"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>
+"
+===DONE===
diff --git a/ext/phar/tests/zip/phar_buildfromiterator4.phpt b/ext/phar/tests/zip/phar_buildfromiterator4.phpt
new file mode 100644
index 0000000..cc11fe5
--- /dev/null
+++ b/ext/phar/tests/zip/phar_buildfromiterator4.phpt
@@ -0,0 +1,66 @@
+--TEST--
+Phar::buildFromIterator() iterator, 1 file passed in zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.zip');
+ var_dump($phar->buildFromIterator(new myIterator(array('a' => basename(__FILE__, 'php') . 'phpt'))));
+ var_dump($phar->isFileFormat(Phar::ZIP));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar.zip');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+key
+next
+valid
+array(1) {
+ ["a"]=>
+ string(%d) "%sphar_buildfromiterator4.phpt"
+}
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/zip/phar_buildfromiterator5.phpt b/ext/phar/tests/zip/phar_buildfromiterator5.phpt
new file mode 100644
index 0000000..1d14686
--- /dev/null
+++ b/ext/phar/tests/zip/phar_buildfromiterator5.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Phar::buildFromIterator() iterator, iterator returns non-string zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.zip');
+ var_dump($phar->buildFromIterator(new myIterator(array('a' => new stdClass))));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar.zip');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+%s(24) "UnexpectedValueException"
+Iterator myIterator returned an invalid value (must return a string)
+===DONE===
diff --git a/ext/phar/tests/zip/phar_buildfromiterator6.phpt b/ext/phar/tests/zip/phar_buildfromiterator6.phpt
new file mode 100644
index 0000000..936dda9
--- /dev/null
+++ b/ext/phar/tests/zip/phar_buildfromiterator6.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Phar::buildFromIterator() iterator, key is int zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.zip');
+ var_dump($phar->buildFromIterator(new myIterator(array(basename(__FILE__, 'php') . 'phpt'))));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar.zip');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+key
+%s(24) "UnexpectedValueException"
+Iterator myIterator returned an invalid key (must return a string)
+===DONE===
diff --git a/ext/phar/tests/zip/phar_buildfromiterator7.phpt b/ext/phar/tests/zip/phar_buildfromiterator7.phpt
new file mode 100644
index 0000000..777dbf8
--- /dev/null
+++ b/ext/phar/tests/zip/phar_buildfromiterator7.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Phar::buildFromIterator() iterator, file can't be opened zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.zip');
+ var_dump($phar->buildFromIterator(new myIterator(array('a' => basename(__FILE__, 'php') . '/oopsie/there.phpt'))));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar.zip');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+key
+%s(24) "UnexpectedValueException"
+Iterator myIterator returned a file that could not be opened "phar_buildfromiterator7./oopsie/there.phpt"
+===DONE===
diff --git a/ext/phar/tests/zip/phar_buildfromiterator8.phpt b/ext/phar/tests/zip/phar_buildfromiterator8.phpt
new file mode 100644
index 0000000..d2b1be2
--- /dev/null
+++ b/ext/phar/tests/zip/phar_buildfromiterator8.phpt
@@ -0,0 +1,73 @@
+--TEST--
+Phar::buildFromIterator() iterator, SplFileInfo as current zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.zip');
+ $a = $phar->buildFromIterator(new RegexIterator(new DirectoryIterator('.'), '/^frontcontroller\d{0,2}\.phar\.phpt\\z|^\.\\z|^\.\.\\z/'), dirname(__FILE__) . DIRECTORY_SEPARATOR);
+ asort($a);
+ var_dump($a);
+ var_dump($phar->isFileFormat(Phar::ZIP));
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar.zip');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+array(21) {
+ ["frontcontroller1.phar.phpt"]=>
+ string(%d) "%sfrontcontroller1.phar.phpt"
+ ["frontcontroller10.phar.phpt"]=>
+ string(%d) "%sfrontcontroller10.phar.phpt"
+ ["frontcontroller11.phar.phpt"]=>
+ string(%d) "%sfrontcontroller11.phar.phpt"
+ ["frontcontroller12.phar.phpt"]=>
+ string(%d) "%sfrontcontroller12.phar.phpt"
+ ["frontcontroller13.phar.phpt"]=>
+ string(%d) "%sfrontcontroller13.phar.phpt"
+ ["frontcontroller14.phar.phpt"]=>
+ string(%d) "%sfrontcontroller14.phar.phpt"
+ ["frontcontroller15.phar.phpt"]=>
+ string(%d) "%sfrontcontroller15.phar.phpt"
+ ["frontcontroller16.phar.phpt"]=>
+ string(%d) "%sfrontcontroller16.phar.phpt"
+ ["frontcontroller17.phar.phpt"]=>
+ string(%d) "%sfrontcontroller17.phar.phpt"
+ ["frontcontroller18.phar.phpt"]=>
+ string(%d) "%sfrontcontroller18.phar.phpt"
+ ["frontcontroller19.phar.phpt"]=>
+ string(%d) "%sfrontcontroller19.phar.phpt"
+ ["frontcontroller2.phar.phpt"]=>
+ string(%d) "%sfrontcontroller2.phar.phpt"
+ ["frontcontroller20.phar.phpt"]=>
+ string(%d) "%sfrontcontroller20.phar.phpt"
+ ["frontcontroller21.phar.phpt"]=>
+ string(%d) "%sfrontcontroller21.phar.phpt"
+ ["frontcontroller3.phar.phpt"]=>
+ string(%d) "%sfrontcontroller3.phar.phpt"
+ ["frontcontroller4.phar.phpt"]=>
+ string(%d) "%sfrontcontroller4.phar.phpt"
+ ["frontcontroller5.phar.phpt"]=>
+ string(%d) "%sfrontcontroller5.phar.phpt"
+ ["frontcontroller6.phar.phpt"]=>
+ string(%d) "%sfrontcontroller6.phar.phpt"
+ ["frontcontroller7.phar.phpt"]=>
+ string(%d) "%sfrontcontroller7.phar.phpt"
+ ["frontcontroller8.phar.phpt"]=>
+ string(%d) "%sfrontcontroller8.phar.phpt"
+ ["frontcontroller9.phar.phpt"]=>
+ string(%d) "%sfrontcontroller9.phar.phpt"
+}
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/zip/phar_buildfromiterator9.phpt b/ext/phar/tests/zip/phar_buildfromiterator9.phpt
new file mode 100644
index 0000000..0b56307
--- /dev/null
+++ b/ext/phar/tests/zip/phar_buildfromiterator9.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Phar::buildFromIterator() iterator, 1 file resource passed in
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+class myIterator implements Iterator
+{
+ var $a;
+ function __construct(array $a)
+ {
+ $this->a = $a;
+ }
+ function next() {
+ echo "next\n";
+ return next($this->a);
+ }
+ function current() {
+ echo "current\n";
+ return current($this->a);
+ }
+ function key() {
+ echo "key\n";
+ return key($this->a);
+ }
+ function valid() {
+ echo "valid\n";
+ return current($this->a);
+ }
+ function rewind() {
+ echo "rewind\n";
+ return reset($this->a);
+ }
+}
+try {
+ chdir(dirname(__FILE__));
+ $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar');
+ var_dump($phar->buildFromIterator(new myIterator(array('a' => $a = fopen(basename(__FILE__, 'php') . 'phpt', 'r')))));
+ fclose($a);
+} catch (Exception $e) {
+ var_dump(get_class($e));
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/buildfromiterator.phar');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+rewind
+valid
+current
+key
+next
+valid
+array(1) {
+ ["a"]=>
+ string(%d) "[stream]"
+}
+===DONE===
diff --git a/ext/phar/tests/zip/phar_commitwrite.phpt b/ext/phar/tests/zip/phar_commitwrite.phpt
new file mode 100644
index 0000000..4e18a6b
--- /dev/null
+++ b/ext/phar/tests/zip/phar_commitwrite.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Phar::setStub()/stopBuffering() zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--ENV--
+TEMP=.
+TMP=.
+--FILE--
+<?php
+$p = new Phar(dirname(__FILE__) . '/brandnewphar.phar.zip', 0, 'brandnewphar.phar');
+$p['file1.txt'] = 'hi';
+$p->stopBuffering();
+var_dump($p->getStub());
+$p->setStub("<?php
+function __autoload(\$class)
+{
+ include 'phar://' . str_replace('_', '/', \$class);
+}
+Phar::mapPhar('brandnewphar.phar');
+include 'phar://brandnewphar.phar/startup.php';
+__HALT_COMPILER();
+?>");
+var_dump($p->getStub());
+var_dump($p->isFileFormat(Phar::ZIP));
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/brandnewphar.phar.zip');
+?>
+--EXPECT--
+string(60) "<?php // zip-based phar archive stub file
+__HALT_COMPILER();"
+string(200) "<?php
+function __autoload($class)
+{
+ include 'phar://' . str_replace('_', '/', $class);
+}
+Phar::mapPhar('brandnewphar.phar');
+include 'phar://brandnewphar.phar/startup.php';
+__HALT_COMPILER(); ?>
+"
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/zip/phar_convert_phar.phpt b/ext/phar/tests/zip/phar_convert_phar.phpt
new file mode 100644
index 0000000..cad6d9f
--- /dev/null
+++ b/ext/phar/tests/zip/phar_convert_phar.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Phar::convertToPhar() from zip
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.3.phar';
+
+$phar = new Phar($fname);
+$phar['a.txt'] = 'some text';
+$phar->stopBuffering();
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump(strlen($phar->getStub()));
+
+$phar = $phar->convertToExecutable(Phar::ZIP);
+var_dump($phar->isFileFormat(Phar::ZIP));
+var_dump($phar->getStub());
+
+$phar['a'] = 'hi there';
+
+$phar = $phar->convertToExecutable(Phar::PHAR, Phar::NONE, '.3.phar');
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump(strlen($phar->getStub()));
+
+copy($fname3, $fname2);
+
+$phar = new Phar($fname2);
+var_dump($phar->isFileFormat(Phar::PHAR));
+var_dump(strlen($phar->getStub()));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.3.phar');
+__HALT_COMPILER();
+?>
+--EXPECT--
+bool(false)
+int(6683)
+bool(true)
+string(60) "<?php // zip-based phar archive stub file
+__HALT_COMPILER();"
+bool(true)
+int(6683)
+bool(true)
+int(6683)
+===DONE===
diff --git a/ext/phar/tests/zip/phar_copy.phpt b/ext/phar/tests/zip/phar_copy.phpt
new file mode 100644
index 0000000..14034c9
--- /dev/null
+++ b/ext/phar/tests/zip/phar_copy.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Phar: copy() zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=1
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar.php';
+
+$pname = 'phar://'.$fname;
+$iname = '/file.txt';
+$ename = '/error/..';
+
+$p = new Phar($fname);
+
+try
+{
+ $p['a'] = 'hi';
+ $p->startBuffering();
+ $p->copy('a', 'b');
+ echo file_get_contents($p['b']->getPathName());
+ $p->copy('b', 'c');
+ $p->stopBuffering();
+ echo file_get_contents($p['c']->getPathName());
+ copy($fname, $fname2);
+ var_dump($p->isFileFormat(Phar::ZIP));
+ $p->copy('a', $ename);
+}
+catch(Exception $e)
+{
+ echo $e->getMessage() . "\n";
+}
+ini_set('phar.readonly',1);
+$p2 = new Phar($fname2);
+var_dump($p2->isFileFormat(Phar::ZIP));
+echo "\n";
+echo 'a: ' , file_get_contents($p2['a']->getPathName());
+echo 'b: ' ,file_get_contents($p2['b']->getPathName());
+echo 'c: ' ,file_get_contents($p2['c']->getPathName());
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.php'); ?>
+--EXPECTF--
+hihibool(true)
+file "/error/.." contains invalid characters upper directory reference, cannot be copied from "a" in phar %s
+bool(true)
+
+a: hib: hic: hi===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/zip/phar_magic.phpt b/ext/phar/tests/zip/phar_magic.phpt
new file mode 100644
index 0000000..694f927
--- /dev/null
+++ b/ext/phar/tests/zip/phar_magic.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Phar: include/fopen magic zip-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$pname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$p = new Phar($fname);
+var_dump($p->isFileFormat(Phar::ZIP));
+$p['a'] = '<?php include "b/c.php";' . "\n";
+$p['b/c.php'] = '<?php echo "in b\n";$a = fopen("a", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";';
+$p['d'] = "in d\n";
+$p->setStub('<?php
+var_dump(__FILE__);
+var_dump(substr(__FILE__, 0, 4) != "phar");
+set_include_path("phar://" . __FILE__);
+if (version_compare(PHP_VERSION, "5.3", "<")) {
+Phar::interceptFileFuncs();
+}
+include "phar://" . __FILE__ . "/a";
+__HALT_COMPILER();');
+include $pname;
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+bool(true)
+string(%d) "%sphar_magic.phar.zip.php"
+bool(true)
+in b
+<?php include "b/c.php";
+in d
+===DONE===
diff --git a/ext/phar/tests/zip/phar_magicU.phpt b/ext/phar/tests/zip/phar_magicU.phpt
new file mode 100644
index 0000000..f034e4e
--- /dev/null
+++ b/ext/phar/tests/zip/phar_magicU.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Phar: include/fopen magic zip-based
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (version_compare(PHP_VERSION, "6.0", "<")) die("skip Unicode support required");
+?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$pname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$p = new Phar($fname);
+var_dump($p->isFileFormat(Phar::ZIP));
+$p['a'] = '<?php include "b/c.php";' . "\n";
+$p['b/c.php'] = '<?php echo "in b\n";$a = fopen("a", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";';
+$p['d'] = "in d\n";
+$p->setStub('<?php
+var_dump(__FILE__);
+var_dump(substr(__FILE__, 0, 4) != "phar");
+set_include_path("phar://" . __FILE__);
+include "phar://" . __FILE__ . "/a";
+__HALT_COMPILER();');
+include $pname;
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+bool(true)
+unicode(%d) "%sphar_magicU.phar.zip.php"
+bool(true)
+in b
+<?php include "b/c.php";
+in d
+===DONE===
diff --git a/ext/phar/tests/zip/phar_oo_compressallbz2.phpt b/ext/phar/tests/zip/phar_oo_compressallbz2.phpt
new file mode 100644
index 0000000..d6b0a8f
--- /dev/null
+++ b/ext/phar/tests/zip/phar_oo_compressallbz2.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Phar::compressFiles(Phar::BZ2) zip format
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("bz2")) die("skip bz2 not present"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$pname = 'phar://' . $fname;
+$pname2 = 'phar://' . $fname2;
+
+$phar = new Phar($fname);
+$phar['a'] = 'a';
+$phar['b'] = 'b';
+$phar['c'] = 'c';
+
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+
+$phar->compressFiles(Phar::BZ2);
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed(Phar::GZ));
+var_dump($phar['a']->isCompressed(Phar::BZ2));
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed(Phar::GZ));
+var_dump($phar['b']->isCompressed(Phar::BZ2));
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed(Phar::GZ));
+var_dump($phar['b']->isCompressed(Phar::BZ2));
+$phar['d'] = 'hi'; // increases code coverage by having ufp open
+copy($fname, $fname2);
+$c = new Phar($fname2);
+var_dump(file_get_contents($pname2 . '/a'));
+var_dump($c['a']->isCompressed(Phar::GZ));
+var_dump($c['a']->isCompressed(Phar::BZ2));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+?>
+--EXPECTF--
+string(1) "a"
+bool(false)
+string(1) "b"
+bool(false)
+string(1) "c"
+bool(false)
+string(1) "a"
+bool(false)
+bool(true)
+string(1) "b"
+bool(false)
+bool(true)
+string(1) "c"
+bool(false)
+bool(true)
+string(1) "a"
+bool(false)
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/zip/phar_oo_compressallgz.phpt b/ext/phar/tests/zip/phar_oo_compressallgz.phpt
new file mode 100644
index 0000000..47dddac
--- /dev/null
+++ b/ext/phar/tests/zip/phar_oo_compressallgz.phpt
@@ -0,0 +1,58 @@
+--TEST--
+Phar::compressFiles(Phar::GZ) zip format
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not present"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$pname = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar['a'] = 'a';
+$phar['b'] = 'b';
+$phar['c'] = 'c';
+
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed());
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed());
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['c']->isCompressed());
+
+$phar->compressFiles(Phar::GZ);
+var_dump(file_get_contents($pname . '/a'));
+var_dump($phar['a']->isCompressed(Phar::BZ2));
+var_dump($phar['a']->isCompressed(Phar::GZ));
+var_dump(file_get_contents($pname . '/b'));
+var_dump($phar['b']->isCompressed(Phar::BZ2));
+var_dump($phar['b']->isCompressed(Phar::GZ));
+var_dump(file_get_contents($pname . '/c'));
+var_dump($phar['b']->isCompressed(Phar::BZ2));
+var_dump($phar['c']->isCompressed(Phar::GZ));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php');
+?>
+--EXPECTF--
+string(1) "a"
+bool(false)
+string(1) "b"
+bool(false)
+string(1) "c"
+bool(false)
+string(1) "a"
+bool(false)
+bool(true)
+string(1) "b"
+bool(false)
+bool(true)
+string(1) "c"
+bool(false)
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/zip/phar_setalias.phpt b/ext/phar/tests/zip/phar_setalias.phpt
new file mode 100644
index 0000000..1a39633
--- /dev/null
+++ b/ext/phar/tests/zip/phar_setalias.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Phar::setAlias() zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("zlib")) die("skip no zlib"); ?>
+<?php if (!extension_loaded("bz2")) die("skip no bz2"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar.zip';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '3.phar.zip';
+
+$phar = new Phar($fname);
+$phar->setStub('<?php echo "first stub\n"; __HALT_COMPILER(); ?>');
+$phar->setAlias('hio');
+
+$files = array();
+
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+echo $phar->getAlias() . "\n";
+$phar->setAlias('test');
+echo $phar->getAlias() . "\n";
+
+// test compression
+
+$phar->compressFiles(Phar::GZ);
+copy($fname, $fname2);
+$phar->setAlias('unused');
+$p2 = new Phar($fname2);
+echo $p2->getAlias(), "\n";
+$p2->compressFiles(Phar::BZ2);
+copy($fname2, $fname3);
+$p2->setAlias('unused2');
+$p3 = new Phar($fname3);
+echo $p3->getAlias(), "\n";
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '3.phar.zip');
+__HALT_COMPILER();
+?>
+--EXPECT--
+hio
+test
+test
+test
+===DONE===
diff --git a/ext/phar/tests/zip/phar_setalias2.phpt b/ext/phar/tests/zip/phar_setalias2.phpt
new file mode 100644
index 0000000..c89f4c7
--- /dev/null
+++ b/ext/phar/tests/zip/phar_setalias2.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Phar::setAlias() error zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+
+$phar = new Phar($fname);
+$phar->setStub('<?php echo "first stub\n"; __HALT_COMPILER(); ?>');
+$phar->setAlias('hio');
+
+$files = array();
+
+$files['a'] = 'a';
+$files['b'] = 'b';
+$files['c'] = 'c';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+echo $phar->getAlias() . "\n";
+$phar->setAlias('test');
+echo $phar->getAlias() . "\n";
+$b = $phar;
+$phar = new Phar(dirname(__FILE__) . '/notphar.phar');
+try {
+ $phar->setAlias('test');
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+hio
+test
+alias "test" is already used for archive "%sphar_setalias2.phar.zip" and cannot be used for other archives
+===DONE===
diff --git a/ext/phar/tests/zip/phar_setdefaultstub.phpt b/ext/phar/tests/zip/phar_setdefaultstub.phpt
new file mode 100644
index 0000000..e21d764
--- /dev/null
+++ b/ext/phar/tests/zip/phar_setdefaultstub.phpt
@@ -0,0 +1,80 @@
+--TEST--
+Phar: Phar::setDefaultStub() with and without arg, zip-based phar
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+
+$phar = new Phar($fname);
+$phar['a.php'] = '<php echo "this is a\n"; ?>';
+$phar['b.php'] = '<php echo "this is b\n"; ?>';
+$phar->setStub('<?php echo "Hello World\n"; __HALT_COMPILER(); ?>');
+
+var_dump($phar->getStub());
+
+echo "============================================================================\n";
+echo "============================================================================\n";
+
+try {
+ $phar->setDefaultStub();
+ $phar->stopBuffering();
+} catch(Exception $e) {
+ echo $e->getMessage(). "\n";
+}
+
+var_dump($phar->getStub());
+
+echo "============================================================================\n";
+echo "============================================================================\n";
+
+try {
+ $phar->setDefaultStub('my/custom/thingy.php');
+ $phar->stopBuffering();
+} catch(Exception $e) {
+ echo $e->getMessage(). "\n";
+}
+
+var_dump($phar->getStub());
+
+echo "============================================================================\n";
+echo "============================================================================\n";
+
+try {
+ $phar->setDefaultStub('my/custom/thingy.php', 'the/web.php');
+ $phar->stopBuffering();
+} catch(Exception $e) {
+ echo $e->getMessage(). "\n";
+}
+
+var_dump($phar->getStub());
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+?>
+--EXPECTF--
+string(51) "<?php echo "Hello World\n"; __HALT_COMPILER(); ?>
+"
+============================================================================
+============================================================================
+string(60) "<?php // zip-based phar archive stub file
+__HALT_COMPILER();"
+============================================================================
+============================================================================
+
+Warning: Phar::setDefaultStub(): method accepts no arguments for a tar- or zip-based phar stub, 1 given in %sphar_setdefaultstub.php on line %d
+string(60) "<?php // zip-based phar archive stub file
+__HALT_COMPILER();"
+============================================================================
+============================================================================
+
+Warning: Phar::setDefaultStub(): method accepts no arguments for a tar- or zip-based phar stub, 2 given in %sphar_setdefaultstub.php on line %d
+string(60) "<?php // zip-based phar archive stub file
+__HALT_COMPILER();"
+===DONE===
diff --git a/ext/phar/tests/zip/phar_setsignaturealgo2.phpt b/ext/phar/tests/zip/phar_setsignaturealgo2.phpt
new file mode 100644
index 0000000..7d3730c
--- /dev/null
+++ b/ext/phar/tests/zip/phar_setsignaturealgo2.phpt
@@ -0,0 +1,115 @@
+--TEST--
+Phar::setSupportedSignatures() with hash, zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("hash")) die("skip extension hash required");
+$arr = Phar::getSupportedSignatures();
+if (!in_array("OpenSSL", $arr)) die("skip openssl support required");
+if (!in_array('SHA-256', $arr)) die("skip hash extension loaded shared"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip';
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.3.phar.zip';
+$fname4 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.4.phar.zip';
+$fname5 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.5.phar.zip';
+$fname6 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.6.phar.zip';
+$p = new Phar($fname);
+$p['file1.txt'] = 'hi';
+var_dump($p->getSignature());
+$p->setSignatureAlgorithm(Phar::MD5);
+
+copy($fname, $fname2);
+$p = new Phar($fname2);
+var_dump($p->getSignature());
+
+$p->setSignatureAlgorithm(Phar::SHA1);
+
+copy($fname2, $fname3);
+$p = new Phar($fname3);
+var_dump($p->getSignature());
+
+try {
+$p->setSignatureAlgorithm(Phar::SHA256);
+copy($fname3, $fname4);
+$p = new Phar($fname4);
+var_dump($p->getSignature());
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+try {
+$p->setSignatureAlgorithm(Phar::SHA512);
+copy($fname4, $fname5);
+$p = new Phar($fname5);
+var_dump($p->getSignature());
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+try {
+$config = dirname(__FILE__) . '/../files/openssl.cnf';
+$config_arg = array('config' => $config);
+$keys=openssl_pkey_new($config_arg);
+openssl_pkey_export($keys, $privkey, NULL, $config_arg);
+$pubkey=openssl_pkey_get_details($keys);
+$p->setSignatureAlgorithm(Phar::OPENSSL, $privkey);
+
+copy($fname5, $fname6);
+file_put_contents($fname6 . '.pubkey', $pubkey['key']);
+$p = new Phar($fname6);
+var_dump($p->getSignature());
+} catch (Exception $e) {
+echo $e->getMessage();
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.3.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.4.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.5.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.6.phar.zip');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.6.phar.zip.pubkey');
+?>
+--EXPECTF--
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(5) "SHA-1"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(3) "MD5"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(5) "SHA-1"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(7) "SHA-256"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(7) "SHA-512"
+}
+array(2) {
+ ["hash"]=>
+ string(%d) "%s"
+ ["hash_type"]=>
+ string(7) "OpenSSL"
+}
+===DONE===
diff --git a/ext/phar/tests/zip/phar_stub.phpt b/ext/phar/tests/zip/phar_stub.phpt
new file mode 100644
index 0000000..72c1f17
--- /dev/null
+++ b/ext/phar/tests/zip/phar_stub.phpt
@@ -0,0 +1,75 @@
+--TEST--
+Phar::setStub() (zip-based)
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php';
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
+$pname = 'phar://' . $fname;
+$pname2 = 'phar://' . $fname2;
+
+$p = new Phar($pname2);
+$p->setStub('<?php echo "first stub\n"; __HALT_COMPILER(); ?>');
+$p['a'] = 'a';
+$p['b'] = 'b';
+$p['c'] = 'c';
+copy($fname2, $fname);
+
+$phar = new Phar($fname);
+echo $phar->getStub();
+
+$file = b'<?php echo "second stub\n"; __HALT_COMPILER(); ?>';
+
+//// 2
+$phar->setStub($file);
+echo $phar->getStub();
+
+$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phartmp.php';
+$file = b'<?php echo "third stub\n"; __HALT_COMPILER(); ?>';
+$fp = fopen($fname3, 'wb');
+fwrite($fp, $file);
+fclose($fp);
+$fp = fopen($fname3, 'rb');
+
+//// 3
+$phar->setStub($fp);
+fclose($fp);
+
+echo $phar->getStub();
+
+$fp = fopen($fname3, 'ab');
+fwrite($fp, b'booya');
+fclose($fp);
+echo file_get_contents($fname3) . "\n";
+
+$fp = fopen($fname3, 'rb');
+
+//// 4
+$phar->setStub($fp, strlen($file));
+fclose($fp);
+echo $phar->getStub();
+
+$phar['testing'] = 'hi';
+
+echo $phar->getStub();
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php');
+__HALT_COMPILER();
+?>
+--EXPECT--
+<?php echo "first stub\n"; __HALT_COMPILER(); ?>
+<?php echo "second stub\n"; __HALT_COMPILER(); ?>
+<?php echo "third stub\n"; __HALT_COMPILER(); ?>
+<?php echo "third stub\n"; __HALT_COMPILER(); ?>booya
+<?php echo "third stub\n"; __HALT_COMPILER(); ?>
+<?php echo "third stub\n"; __HALT_COMPILER(); ?>
+===DONE===
diff --git a/ext/phar/tests/zip/phar_stub_error.phpt b/ext/phar/tests/zip/phar_stub_error.phpt
new file mode 100644
index 0000000..dafb312
--- /dev/null
+++ b/ext/phar/tests/zip/phar_stub_error.phpt
@@ -0,0 +1,55 @@
+--TEST--
+Phar::setStub()/getStub() zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+
+$phar = new Phar($fname);
+$phar->setStub($stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>' . "\r\n");
+$phar->setAlias('hio');
+$phar['a'] = 'a';
+$phar->stopBuffering();
+
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+
+$newstub = '<?php echo "second stub\n"; _x_HALT_COMPILER(); ?>';
+try
+{
+ $phar->setStub($newstub);
+}
+catch(exception $e)
+{
+ echo 'Exception: ' . $e->getMessage() . "\n";
+}
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+$phar->stopBuffering();
+var_dump($phar->getStub());
+var_dump($phar->getStub() == $stub);
+
+?>
+===DONE===
+--CLEAN--
+<?php
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
+__HALT_COMPILER();
+?>
+--EXPECTF--
+string(50) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>
+"
+bool(true)
+Exception: illegal stub for zip-based phar "%sphar_stub_error.phar.zip"
+string(50) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>
+"
+bool(true)
+string(50) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>
+"
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/zip/refcount1.phpt b/ext/phar/tests/zip/refcount1.phpt
new file mode 100644
index 0000000..618e7fe
--- /dev/null
+++ b/ext/phar/tests/zip/refcount1.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Phar: test that refcounting avoids problems with deleting a file zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or later"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php __HALT_COMPILER(); ?>");
+$phar->setAlias('hio');
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, b"extra");
+fclose($fp);
+echo "===CLOSE===\n";
+$b = fopen($alias . '/b/c.php', 'rb');
+$a = $phar['b/c.php'];
+var_dump($a);
+var_dump(fread($b, 20));
+rewind($b);
+echo "===UNLINK===\n";
+unlink($alias . '/b/c.php');
+var_dump($a);
+var_dump(fread($b, 20));
+include $alias . '/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+===CLOSE===
+object(PharFileInfo)#%d (2) {
+ [%spathName":%sSplFileInfo":private]=>
+ string(%d) "phar://%srefcount1.phar.zip/b/c.php"
+ [%sfileName":%sSplFileInfo":private]=>
+ string(%d) "c.php"
+}
+string(5) "extra"
+===UNLINK===
+
+Warning: unlink(): phar error: "b/c.php" in phar "%srefcount1.phar.zip", has open file pointers, cannot unlink in %srefcount1.php on line %d
+object(PharFileInfo)#%d (2) {
+ [%spathName":%sSplFileInfo":private]=>
+ string(%d) "phar://%srefcount1.phar.zip/b/c.php"
+ [%sfileName":%sSplFileInfo":private]=>
+ string(%s) "c.php"
+}
+string(5) "extra"
+extra
+===DONE===
diff --git a/ext/phar/tests/zip/refcount1_5_2.phpt b/ext/phar/tests/zip/refcount1_5_2.phpt
new file mode 100644
index 0000000..f3b2771
--- /dev/null
+++ b/ext/phar/tests/zip/refcount1_5_2.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Phar: test that refcounting avoids problems with deleting a file zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (version_compare(PHP_VERSION, "5.3", ">")) die("skip requires 5.2 or earlier"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php __HALT_COMPILER(); ?>");
+$phar->setAlias('hio');
+
+$files = array();
+
+$files['a.php'] = '<?php echo "This is a\n"; ?>';
+$files['b.php'] = '<?php echo "This is b\n"; ?>';
+$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
+
+foreach ($files as $n => $file) {
+ $phar[$n] = $file;
+}
+$phar->stopBuffering();
+
+$fp = fopen($alias . '/b/c.php', 'wb');
+fwrite($fp, "extra");
+fclose($fp);
+
+echo "===CLOSE===\n";
+
+$b = fopen($alias . '/b/c.php', 'rb');
+$a = $phar['b/c.php'];
+var_dump($a);
+var_dump(fread($b, 20));
+rewind($b);
+echo "===UNLINK===\n";
+unlink($alias . '/b/c.php');
+var_dump($a);
+var_dump(fread($b, 20));
+include $alias . '/b/c.php';
+?>
+
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+===CLOSE===
+object(PharFileInfo)#%d (0) {
+}
+string(5) "extra"
+===UNLINK===
+
+Warning: unlink(): phar error: "b/c.php" in phar "%sefcount1_5_2.phar.zip", has open file pointers, cannot unlink in %sefcount1_5_2.php on line %d
+object(PharFileInfo)#%d (0) {
+}
+string(5) "extra"
+extra
+===DONE===
diff --git a/ext/phar/tests/zip/rename.phpt b/ext/phar/tests/zip/rename.phpt
new file mode 100644
index 0000000..9b1f5c9
--- /dev/null
+++ b/ext/phar/tests/zip/rename.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Phar: rename test zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>");
+$phar['a'] = 'a';
+$phar->stopBuffering();
+
+include $fname;
+
+echo file_get_contents($alias . '/a') . "\n";
+rename($alias . '/a', $alias . '/b');
+echo file_get_contents($alias . '/b') . "\n";
+echo file_get_contents($alias . '/a') . "\n";
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+a
+a
+
+Warning: file_get_contents(phar://%srename.phar.zip/a): failed to open stream: phar error: "a" is not a file in phar "%srename.phar.zip" in %srename.php on line %d \ No newline at end of file
diff --git a/ext/phar/tests/zip/rename_dir.phpt b/ext/phar/tests/zip/rename_dir.phpt
new file mode 100644
index 0000000..bb03c7f
--- /dev/null
+++ b/ext/phar/tests/zip/rename_dir.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Phar: rename_dir test zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>");
+$phar['a/x'] = 'a';
+$phar->stopBuffering();
+
+include $fname;
+
+echo file_get_contents($alias . '/a/x') . "\n";
+rename($alias . '/a', $alias . '/b');
+echo file_get_contents($alias . '/b/x') . "\n";
+echo file_get_contents($alias . '/a/x') . "\n";
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+a
+a
+
+Warning: file_get_contents(phar://%srename_dir.phar.zip/a/x): failed to open stream: phar error: "a/x" is not a file in phar "%srename_dir.phar.zip" in %srename_dir.php on line %d \ No newline at end of file
diff --git a/ext/phar/tests/zip/rmdir.phpt b/ext/phar/tests/zip/rmdir.phpt
new file mode 100644
index 0000000..c7ef9da
--- /dev/null
+++ b/ext/phar/tests/zip/rmdir.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Phar: rmdir test zip-based
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
+phar.require_hash=0
+--FILE--
+<?php
+
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
+$alias = 'phar://' . $fname;
+
+$phar = new Phar($fname);
+$phar->setStub("<?php
+Phar::mapPhar('hio');
+__HALT_COMPILER(); ?>");
+$phar->addEmptyDir('a');
+$phar['a/x'] = 'a';
+$phar->stopBuffering();
+
+include $fname;
+
+echo file_get_contents($alias . '/a/x') . "\n";
+var_dump(rmdir($alias . '/a'));
+echo file_get_contents($alias . '/a/x') . "\n";
+unlink($alias . '/a/x');
+var_dump(rmdir($alias . '/a'));
+?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
+--EXPECTF--
+a
+
+Warning: rmdir(): phar error: Directory not empty in %srmdir.php on line %d
+bool(false)
+a
+bool(true)
diff --git a/ext/phar/tests/zip/unixzip.phpt b/ext/phar/tests/zip/unixzip.phpt
new file mode 100644
index 0000000..e2b95be
--- /dev/null
+++ b/ext/phar/tests/zip/unixzip.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Phar: test a zip archive created by unix "zip" command
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--FILE--
+<?php
+$a = new PharData(dirname(__FILE__) . '/files/zip.zip');
+foreach ($a as $b) {
+ if ($b->isDir()) {
+ echo "dir " . $b->getPathName() . "\n";
+ } else {
+ echo $b->getPathName(), "\n";
+ echo file_get_contents($b->getPathName()), "\n";
+ }
+}
+if (isset($a['notempty/hi.txt'])) {
+ echo $a['notempty/hi.txt']->getPathName() . "\n";
+}
+?>
+===DONE===
+--EXPECTF--
+dir phar://%s/zip.zip%cempty
+phar://%s/zip.zip%chi.txt
+hi there
+
+dir phar://%s/zip.zip%cnotempty
+phar://%s/zip.zip/notempty%chi.txt
+===DONE===
diff --git a/ext/phar/tests/zip/zlib.phpt b/ext/phar/tests/zip/zlib.phpt
new file mode 100644
index 0000000..c7494e2
--- /dev/null
+++ b/ext/phar/tests/zip/zlib.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Phar: process zlib-compressed zip alias
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--FILE--
+<?php
+try {
+ $a = new Phar(dirname(__FILE__) . '/files/zlib_alias.phar.zip');
+ var_dump($a->getAlias());
+} catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECT--
+string(175) "hitheresuperlongzipistoostupidtodowhatIsaysoIhavetousethisridiculouslylongaliasbecauseitisstupiddidImentionthatalreadythemadnessdoesnotstopIhateinfozipIhateinfozipIhateinfozip"
+===DONE===