From a2e60967ce18bbb6e092acdb454610f29bb585b4 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Thu, 13 Dec 2018 03:24:08 +0900 Subject: [PATCH] Modify README for PHP expression --- README.org | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.org b/README.org index 0aea1fc..1133b15 100644 --- a/README.org +++ b/README.org @@ -32,3 +32,16 @@ This package bridges to [[http://php.net/][PHP: Hypertext Preprocessor]]. (princ (php-runtime-eval "while ($line = trim(fgets(STDIN))) { var_dump($line); }" (cons :file "/etc/hosts"))) #+END_SRC +*** Construct PHP expression +#+BEGIN_SRC emacs-lisp +(php-runtime-\' "You're wellcome.") +;;=> "'You\\'re wellcome.'" + +(let ((a "You'er") + (b "wellcome")) + (php-runtime-expr + (format "implode([%s, %s], ' ')" + (php-runtime-\' a) + (php-runtime-\' b)))) +;;=> "'You\\'re wellcome.'" +#+END_SRC