Add documentation and examples for php version pragma.
Pragma version to specify versions for PHP5 and PHP7 extensions. See issue #360.
This commit is contained in:
parent
7f72398eb6
commit
21108781a7
5 changed files with 13 additions and 0 deletions
|
|
@ -820,6 +820,15 @@ Results in the following in "example.php"
|
||||||
echo "example.php execution\n";
|
echo "example.php execution\n";
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The <b>version</b> pragma can be used to add version to generated PHP extension module. The version is inserted in the zend_module_entry block.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="code"><pre>
|
||||||
|
%module example
|
||||||
|
%pragma(php) version="1.5"
|
||||||
|
</pre></div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <b>include</b> pragma is a short cut to add include statements to
|
The <b>include</b> pragma is a short cut to add include statements to
|
||||||
the example.php file.
|
the example.php file.
|
||||||
|
|
|
||||||
|
|
@ -27,5 +27,6 @@
|
||||||
# This code is inserted into example.php
|
# This code is inserted into example.php
|
||||||
echo \"this was php code\\n\";
|
echo \"this was php code\\n\";
|
||||||
"
|
"
|
||||||
|
%pragma(php) version="1.5"
|
||||||
|
|
||||||
%pragma(php) phpinfo="php_info_print_table_start();"
|
%pragma(php) phpinfo="php_info_print_table_start();"
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,5 @@
|
||||||
|
|
||||||
require "example.php";
|
require "example.php";
|
||||||
|
|
||||||
|
echo "Version - " . ((new ReflectionExtension('example'))->getVersion());
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -27,5 +27,6 @@
|
||||||
# This code is inserted into example.php
|
# This code is inserted into example.php
|
||||||
echo \"this was php code\\n\";
|
echo \"this was php code\\n\";
|
||||||
"
|
"
|
||||||
|
%pragma(php) version="1.5"
|
||||||
|
|
||||||
%pragma(php) phpinfo="php_info_print_table_start();"
|
%pragma(php) phpinfo="php_info_print_table_start();"
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,5 @@
|
||||||
|
|
||||||
require "example.php";
|
require "example.php";
|
||||||
|
|
||||||
|
echo "Version - " . ((new ReflectionExtension('example'))->getVersion());
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue