blob f1c901c499c7dd848fa2222fd5f865e348d00b85 1539 bytes (raw)
name: testing/examples/ob-php-test.org # note: path name is non-authoritative(*)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
| | * php test expand test
:PROPERTIES:
:ID: 39b75bdf-0f2a-4e7a-a03c-4c2bfa96bf60
:END:
#+source: hello
#+begin_src php :expand true
echo "hello world";
#+end_src
#+RESULTS:
: hello world
#+source: intreturn
#+begin_src php :expand true
echo 42;
#+end_src
#+RESULTS:
: 42
#+source: expandvar
#+begin_src php :var foo="bar" :var baz=1 :expand true
echo "$baz $foo";
#+end_src
#+RESULTS:
: 1 bar
#+source: multiline
#+begin_src php :expand true
echo "php!\n";
echo "sucks!";
#+end_src
#+RESULTS:
| php! |
| sucks! |
* php noexpand test
:PROPERTIES:
:ID: 47f2043a-abc9-4059-92bf-5df939e6881b
:END:
#+source: externalstuff
#+begin_src php
outside php
<?php echo "inside php\n"?>
#+end_src
#+RESULTS:
| outside | php |
| inside | php |
* php var array test
:PROPERTIES:
:ID: 2472b4b4-6582-44ca-844d-6a8299dd728b
:END:
#+name: atable
| a | b |
| c | duck |
#+source: fromvar
#+begin_src php :var foo='("baz" "bar")
<?php
foreach($foo as $val){
echo "value: $val\n";
}
?>
#+end_src
#+RESULTS:
| value: | baz |
| value: | bar |
#+source: fromvarexpand
#+begin_src php :var foo='("baz" "bar") :expand true
foreach($foo as $val){
echo "value: $val\n";
}
#+end_src
#+RESULTS:
| value: | baz |
| value: | bar |
#+source: fromtableexpand
#+begin_src php :var foo=atable :expand true
foreach($foo as $row){
foreach($row as $val)
echo "value: $val\n";
}
#+end_src
#+RESULTS:
| value: | a |
| value: | b |
| value: | c |
| value: | duck |
|
debug log:
solving f1c901c ...
found f1c901c in https://list.orgmode.org/orgmode/20150112121032.e352cf20e00a217e4bc8a956@neg9.org/
applying [1/1] https://list.orgmode.org/orgmode/20150112121032.e352cf20e00a217e4bc8a956@neg9.org/
diff --git a/testing/examples/ob-php-test.org b/testing/examples/ob-php-test.org
new file mode 100644
index 0000000..f1c901c
Checking patch testing/examples/ob-php-test.org...
1:104: new blank line at EOF.
+
Applied patch testing/examples/ob-php-test.org cleanly.
warning: 1 line adds whitespace errors.
index at:
100644 f1c901c499c7dd848fa2222fd5f865e348d00b85 testing/examples/ob-php-test.org
(*) Git path names are given by the tree(s) the blob belongs to.
Blobs themselves have no identifier aside from the hash of its contents.^
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).