Skip to content

Commit

Permalink
Modify README for PHP expression
Browse files Browse the repository at this point in the history
  • Loading branch information
zonuexe committed Dec 12, 2018
1 parent d7c18cf commit a2e6096
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a2e6096

Please sign in to comment.