X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=docs%2Fexamples%2Fextract.php;fp=docs%2Fexamples%2Fextract.php;h=32aa173ae859d29e282c93a1b0b51307371cf2c6;hp=0000000000000000000000000000000000000000;hb=b562e34cf4f8c8fae7b8fe773e0eed71592b09c2;hpb=b1d7d87f91b5cdcf321cb103e1a315f639885d61 diff --git a/docs/examples/extract.php b/docs/examples/extract.php new file mode 100644 index 0000000..32aa173 --- /dev/null +++ b/docs/examples/extract.php @@ -0,0 +1,9 @@ +)/s', file_get_contents($_SERVER['argv'][1]), $matches)) { + for ($i = 0; $i < count($matches[0]); $i++) { + file_put_contents(preg_replace('/\W/', '_', $matches[1][$i]).".php", $matches[2][$i]."\n"); + } +} + +?>