1<?php 2$br = (php_sapi_name() == "cli")? "":"<br>"; 3 4if(!extension_loaded('libsodium')) { 5 dl('libsodium.' . PHP_SHLIB_SUFFIX); 6} 7$module = 'libsodium'; 8$functions = get_extension_funcs($module); 9echo "Functions available in the test extension:$br\n"; 10foreach($functions as $func) { 11 echo $func."$br\n"; 12} 13echo "$br\n"; 14$function = 'sodium_memzero'; 15$exit = 0; 16if (extension_loaded($module)) { 17 $str = $function($module); 18} else { 19 $str = "Module $module is not compiled into PHP"; 20 $exit = 255; 21} 22echo "$str\n"; 23exit($exit); 24?> 25