mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
import MessagePack for PHP
This commit is contained in:
parent
254ee80c16
commit
99a2d28592
16 changed files with 2321 additions and 0 deletions
21
php/msgpack.php
Normal file
21
php/msgpack.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
$br = (php_sapi_name() == "cli")? "":"<br>";
|
||||
|
||||
if(!extension_loaded('msgpack')) {
|
||||
dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
||||
}
|
||||
$module = 'msgpack';
|
||||
$functions = get_extension_funcs($module);
|
||||
echo "Functions available in the test extension:$br\n";
|
||||
foreach($functions as $func) {
|
||||
echo $func."$br\n";
|
||||
}
|
||||
echo "$br\n";
|
||||
$function = 'confirm_' . $module . '_compiled';
|
||||
if (extension_loaded($module)) {
|
||||
$str = $function($module);
|
||||
} else {
|
||||
$str = "Module $module is not compiled into PHP";
|
||||
}
|
||||
echo "$str\n";
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue