4$s .=
"\nExtract_Phar::go();\n__HALT_COMPILER();";
34 +----------------------------------------------------------------------+
35 | phar php single-file executable PHP extension generated stub |
36 +----------------------------------------------------------------------+
37 | Copyright (c) The PHP Group |
38 +----------------------------------------------------------------------+
39 | This source file is subject to version 3.01 of the PHP license, |
40 | that is bundled with this package in the file LICENSE, and is |
41 | available through the world-wide-web at the following url: |
42 | https://www.php.net/license/3_01.txt |
43 | If you did not receive a copy of the PHP license and are unable to |
44 | obtain it through the world-wide-web, please send a note to |
45 | license@php.net so we can mail you a copy immediately. |
46 +----------------------------------------------------------------------+
47 | Authors: Gregory Beaver <cellog@php.net> |
48 +----------------------------------------------------------------------+
51static inline void phar_get_stub(const char *index_php, const char *web, size_t *len, char **stub, const int name_len, const int web_len)
62 if ($chunk[
strlen($chunk) - 1] ==
'\\') {
72 if ($chunk[
strlen($chunk) - 1] ==
'\\') {
77$stub .=
"\tstatic const char newstub0[] = \"" .
$webs .
'";
81 $stub .=
"\tstatic const char newstub1_" . $i .
'[] = "' . $chunk .
'";
84$stub .=
"\tstatic const char newstub2[] = \"" .
$s2 .
"\";
88 $stub .=
"\tstatic const char newstub3_" . $i .
'[] = "' . $chunk .
'";
91$stub .=
"\n\tstatic const int newstub_len = " .
$slen .
";
93\t*len = spprintf(stub, name_len + web_len + newstub_len, \"%s%s" .
str_repeat(
'%s', $s1count) .
'%s%s%d'
94 .
str_repeat(
'%s', $s3count) .
'", newstub0, web';
96 $stub .=
', newstub1_' . $i;
98$stub .=
', index_php, newstub2';
99$stub .=
", name_len + web_len + newstub_len";
100foreach (
$s3split as $i => $unused) {
101 $stub .=
', newstub3_' . $i;
str_split(string $string, int $length=1)
str_repeat(string $string, int $times)
substr_count(string $haystack, string $needle, int $offset=0, ?int $length=null)
file_get_contents(string $filename, bool $use_include_path=false, $context=null, int $offset=0, ?int $length=null)
strpos(string $haystack, string $needle, int $offset=0)
str_replace(array|string $search, array|string $replace, string|array $subject, &$count=null)
file_put_contents(string $filename, mixed $data, int $flags=0, $context=null)
dirname(string $path, int $levels=1)
substr(string $string, int $offset, ?int $length=null)
token_get_all(string $code, int $flags=0)