Примеры в отдельную папку
This commit is contained in:
parent
0f62ba3a29
commit
313413931b
7 changed files with 6 additions and 6 deletions
|
|
@ -11,7 +11,8 @@ class Klein {
|
|||
function ($x) use ($result) {
|
||||
$code = "<?php " . preg_replace_callback("/#(\d+)(s?)/", function ($s) use($x) {
|
||||
$pref = $s[2] == 's' ? '$' : '';
|
||||
return implode(", ", array_map(function ($s) use($pref) { return $pref.preg_replace("/\.\s*(\w+)/", "['$1']", $s); }, preg_split("/\s*,\s*/", $x[$s[1]])));
|
||||
return implode(", ", array_map(function ($s) use($pref) {
|
||||
return $pref.preg_replace("/\.\s*(\w+)/", "['$1']", $s); }, preg_split("/\s*,\s*/", $x[$s[1]])));
|
||||
}, $result) . " ?>";
|
||||
return ($x[0][2] == '!') ? "<!-- $code -->" : $code;
|
||||
}];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue