UNPKG

phpjs

Version:

php.js offers community built php functions in javascript

17 lines (14 loc) 524 B
function ob_get_level() { // http://kevin.vanzonneveld.net // + original by: Brett Zamir (http://brett-zamir.me) // * example 1: ob_get_level(); // * returns 1: 1 this.php_js = this.php_js || {}; var phpjs = this.php_js, ini = phpjs.ini, obs = phpjs.obs; if (!obs || !obs.length) { return (ini && ini['output_buffering'] && (typeof ini['output_buffering'].local_value !== 'string' || ini['output_buffering'].local_value.toLowerCase() !== 'off')) ? 1 : 0; } return obs.length; }