File: write25.phar.inc

package info (click to toggle)
php7.3 7.3.31-1~deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 187,388 kB
  • sloc: ansic: 913,717; php: 22,387; sh: 11,230; cpp: 7,678; javascript: 3,040; pascal: 2,519; xml: 2,099; yacc: 1,950; exp: 1,514; makefile: 721; perl: 315; awk: 263; sql: 22
file content (16 lines) | stat: -rw-r--r-- 390 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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();";
?>