File: qm-assign.xml

package info (click to toggle)
php-doc 20140201-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 74,084 kB
  • ctags: 4,040
  • sloc: xml: 998,137; php: 20,812; cpp: 500; sh: 177; makefile: 63; awk: 28
file content (176 lines) | stat: -rw-r--r-- 4,681 bytes parent folder | download
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 324373 $ -->
<section xml:id="internals2.opcodes.qm-assign">
 <title>QM_ASSIGN</title>
 <section xml:id="internals2.opcodes.qm-assign.code">
  <title>PHP code</title>
  <programlisting role="php">
   <![CDATA[
<?php
/*
 * Question Mark Assign, used twice inside a question mark assign to temporarily assign result as value1  (this is followed up with an ASSIGN bytecode)
 * opcode number: 22
 */
function A(){
 echo 1?2:3;
}

function B(){
 $b = 0;
 $a = $b > 1 ? 10: 11;
}
?>
]]>
  </programlisting>
 </section>
 <section xml:id="internals2.opcodes.qm-assign.listing">
  <title>PHP opcodes</title>
  <simpara>Function name: (null)</simpara>
  <simpara>Compiled variables: none </simpara>
  <informaltable>
   <tgroup cols="7">
    <thead>
     <row>
      <entry>line</entry><entry>#</entry><entry>op</entry>
      <entry>fetch</entry><entry>ext</entry><entry>return</entry>
      <entry>operands</entry>
     </row>
    </thead>
    <tbody>
     <row>
      <entry>6</entry><entry>0</entry>
      <entry>NOP</entry><entry></entry>
      <entry></entry><entry></entry>
      <entry></entry>
     </row>
     <row>
      <entry>10</entry><entry>1</entry>
      <entry>NOP</entry><entry></entry>
      <entry></entry><entry></entry>
      <entry></entry>
     </row>
     <row>
      <entry>14</entry><entry>2</entry>
      <entry>RETURN</entry><entry></entry>
      <entry></entry><entry></entry>
      <entry>1</entry>
     </row>
    </tbody>
   </tgroup>
  </informaltable>
  <simpara>Function name: A</simpara>
  <simpara>Compiled variables: none </simpara>
  <informaltable>
   <tgroup cols="7">
    <thead>
     <row>
      <entry>line</entry><entry>#</entry><entry>op</entry>
      <entry>fetch</entry><entry>ext</entry><entry>return</entry>
      <entry>operands</entry>
     </row>
    </thead>
    <tbody>
     <row>
      <entry>7</entry><entry>0</entry>
      <entry>JMPZ</entry><entry></entry>
      <entry></entry><entry></entry>
      <entry>1,->3</entry>
     </row>
     <row>
      <entry></entry><entry>1</entry>
      <entry>QM_ASSIGN</entry><entry></entry>
      <entry></entry><entry>~0</entry>
      <entry>2</entry>
     </row>
     <row>
      <entry></entry><entry>2</entry>
      <entry>JMP</entry><entry></entry>
      <entry></entry><entry></entry>
      <entry>->4</entry>
     </row>
     <row>
      <entry></entry><entry>3</entry>
      <entry>QM_ASSIGN</entry><entry></entry>
      <entry></entry><entry>~0</entry>
      <entry>3</entry>
     </row>
     <row>
      <entry></entry><entry>4</entry>
      <entry>ECHO</entry><entry></entry>
      <entry></entry><entry></entry>
      <entry>~0</entry>
     </row>
     <row>
      <entry>8</entry><entry>5</entry>
      <entry>RETURN</entry><entry></entry>
      <entry></entry><entry></entry>
      <entry>null</entry>
     </row>
    </tbody>
   </tgroup>
  </informaltable>
  <simpara>Function name: B</simpara>
  <simpara>Compiled variables: !0=$b,  !1=$a </simpara>
  <informaltable>
   <tgroup cols="7">
    <thead>
     <row>
      <entry>line</entry><entry>#</entry><entry>op</entry>
      <entry>fetch</entry><entry>ext</entry><entry>return</entry>
      <entry>operands</entry>
     </row>
    </thead>
    <tbody>
     <row>
      <entry>11</entry><entry>0</entry>
      <entry>ASSIGN</entry><entry></entry>
      <entry></entry><entry></entry>
      <entry>!0,0</entry>
     </row>
     <row>
      <entry>12</entry><entry>1</entry>
      <entry>IS_SMALLER</entry><entry></entry>
      <entry></entry><entry>~1</entry>
      <entry>1,!0</entry>
     </row>
     <row>
      <entry></entry><entry>2</entry>
      <entry>JMPZ</entry><entry></entry>
      <entry></entry><entry></entry>
      <entry>~1,->5</entry>
     </row>
     <row>
      <entry></entry><entry>3</entry>
      <entry>QM_ASSIGN</entry><entry></entry>
      <entry></entry><entry>~2</entry>
      <entry>10</entry>
     </row>
     <row>
      <entry></entry><entry>4</entry>
      <entry>JMP</entry><entry></entry>
      <entry></entry><entry></entry>
      <entry>->6</entry>
     </row>
     <row>
      <entry></entry><entry>5</entry>
      <entry>QM_ASSIGN</entry><entry></entry>
      <entry></entry><entry>~2</entry>
      <entry>11</entry>
     </row>
     <row>
      <entry></entry><entry>6</entry>
      <entry>ASSIGN</entry><entry></entry>
      <entry></entry><entry></entry>
      <entry>!1,~2</entry>
     </row>
     <row>
      <entry>13</entry><entry>7</entry>
      <entry>RETURN</entry><entry></entry>
      <entry></entry><entry></entry>
      <entry>null</entry>
     </row>
    </tbody>
   </tgroup>
  </informaltable>
 </section>
</section>