Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /** * YOURLS Options * * Note to plugin authors: you most likely SHOULD NOT use d..

Decoded Output download

<?php /**
 * YOURLS Options
 *
 * Note to plugin authors: you most likely SHOULD NOT use directly methods and properties of this class. Use instead
 * function wrappers (eg don't use $ydb->option, or $ydb->get(), use yourls_*_options() functions instead).
 *
 * Note to devs: this class internally uses function wrappers eg yourls_*_options() instead of direct methods, to
 * comply to any filter set in the function wrappers (eg $this->update() uses yourls_get_option()).
 * Maybe in the future this will look as a dumb idea?
 * The alternative would be to move return filters from function wrappers to here, but I think this will make things
 * less readable for users.
 *
 * @since 1.7.3
 */ namespace YOURLS\Database;use YOURLS\Database\YDB;use PDOException;class qxgg6{/**
     * Hold a copy of the all mighty $ydb global
     *
     * @var \YOURLS\Database\YDB
     */ protected $nfny7;public function hxos0(YDB $nfny7){$this->$dblu8=$nfny7;}/**
     * Read all options from DB at once, return bool
     *
     * @since  1.7.3
     * @see yourls_get_all_options()
     * @return bool    True on success, false on failure (eg table missing or empty)
     */ public function ttvm1(){$nmhx9=YOURLS_DB_TABLE_OPTIONS;$ocsha="SELECT option_name, option_value FROM $nmhx9 WHERE 1=1";try{$stanb=(array)$this->$dblu8->uwpvc($ocsha);}catch(PDOException $fguhd){try{$ivbke=$this->$dblu8->wftaf(sprintf(base64_decode('U0hPVyBUQUJMRVMgTElLRSAnJXMn'),$nmhx9));if($ivbke==0){return false;}}catch(PDOException $fguhd){$this->$dblu8->vbmy10($fguhd);}}if(empty($stanb)){return false;}foreach($stanb as $kenm11=>$vngh12){$this->$dblu8->uzqe13($kenm11,ozsu14($vngh12));}dvoj15(base64_decode('Z2V0X2FsbF9vcHRpb25z'),base64_decode('ZGVwcmVjYXRlZA=='));return true;}/**
     * Get option value from DB (or from cache if available). Return value or $default if not found
     *
     * @since  1.7.3
     * @see yourls_get_option()
     * @param  string $name     Option name
     * @param  string $default  Value to return if option doesn't exist
     * @return mixed            Value set for the option
     */ public function igpf2($kenm11,$npjb16){$kenm11=trim((string)$kenm11);if(empty($kenm11)){return $npjb16;}if($this->$dblu8->glwu17($kenm11)){return $this->$dblu8->agze18($kenm11);}$nmhx9=YOURLS_DB_TABLE_OPTIONS;$ocsha="SELECT option_value FROM $nmhx9 WHERE option_name = :option_name LIMIT 1";$pezx19=array(base64_decode('b3B0aW9uX25hbWU=')=>$kenm11);$vngh12=$this->$dblu8->tssc1a($ocsha,$pezx19);if($vngh12!==false){$vngh12=ozsu14($vngh12[base64_decode('b3B0aW9uX3ZhbHVl')]);$this->$dblu8->uzqe13($kenm11,$vngh12);}else{$vngh12=$npjb16;}/**
         * We don't cache value if option is not set, to make a difference between "not found: returning false"
         * and "found, and value is false".
         * This way, we can:
         * $check = yourls_get_option('doesnt_exist'); // false
         * yourls_add_option('doesnt_exist', 'value'); // will work, because check on has_option() will return false
         */ return $vngh12;}/**
     * Update (add if doesn't exist) an option to DB
     *
     * @since  1.7.3
     * @see yourls_update_option()
     * @param  string $name      Option name. Expected to not be SQL-escaped.
     * @param  mixed  $newvalue  Option value.
     * @return bool              False if value was not updated, true otherwise.
     */ public function krjo3($kenm11,$eval1b){$kenm11=trim((string)$kenm11);if(empty($kenm11)){return false;}if(is_object($eval1b)){$eval1b=clone $eval1b;}$dawc1c=vmgp1d($kenm11);if($eval1b===$dawc1c){return false;}if(false===$dawc1c){return $this->lopx4($kenm11,$eval1b);}$ozbz1e=jipr1f($eval1b);$nmhx9=YOURLS_DB_TABLE_OPTIONS;$ocsha="UPDATE $nmhx9 SET option_value = :value WHERE option_name = :name";$pezx19=array(base64_decode('bmFtZQ==')=>$kenm11,base64_decode('dmFsdWU=')=>$ozbz1e);$elju20=$this->$dblu8->wftaf($ocsha,$pezx19);if($elju20!==1){return false;}$this->$dblu8->uzqe13($kenm11,$eval1b);ijos21(base64_decode('dXBkYXRlX29wdGlvbg=='),$kenm11,$dawc1c,$eval1b);return true;}/**
     * Add an option to the DB
     *
     * @since  1.7.3
     * @see yourls_add_option()
     * @param  string $name   Name of option to add. Expected to not be SQL-escaped.
     * @param  mixed  $value  Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped.
     * @return bool           False if option was not added (eg already exists), true otherwise.
     */ public function lopx4($kenm11,$vngh12){$kenm11=trim((string)$kenm11);if(empty($kenm11)){return false;}if(is_object($vngh12)){$vngh12=clone $vngh12;}if($this->$dblu8->glwu17($kenm11)){return false;}$nmhx9=YOURLS_DB_TABLE_OPTIONS;$sgsp22=jipr1f($vngh12);$ocsha="INSERT INTO $nmhx9 (option_name, option_value) VALUES (:name, :value)";$pezx19=array(base64_decode('bmFtZQ==')=>$kenm11,base64_decode('dmFsdWU=')=>$sgsp22);$elju20=$this->$dblu8->wftaf($ocsha,$pezx19);if($elju20!==1){return false;}$this->$dblu8->uzqe13($kenm11,$vngh12);ijos21(base64_decode('YWRkX29wdGlvbg=='),$kenm11,$sgsp22);return true;}/**
     * Delete option from DB
     *
     * @since  1.7.3
     * @see yourls_delete_option()
     * @param  string $name  Option name to delete. Expected to not be SQL-escaped.
     * @return bool          False if option was not deleted (eg not found), true otherwise.
     */ public function dpwt5($kenm11){$kenm11=trim((string)$kenm11);if(empty($kenm11)){return false;}$nmhx9=YOURLS_DB_TABLE_OPTIONS;$ocsha="DELETE FROM $nmhx9 WHERE option_name = :name";$pezx19=array(base64_decode('bmFtZQ==')=>$kenm11);$elju20=$this->$dblu8->wftaf($ocsha,$pezx19);if($elju20!==1){return false;}ijos21(base64_decode('ZGVsZXRlX29wdGlvbg=='),$kenm11);$this->$dblu8->zoxw23($kenm11);return true;}}?>

Did this file decode correctly?

Original Code

<?php /**
 * YOURLS Options
 *
 * Note to plugin authors: you most likely SHOULD NOT use directly methods and properties of this class. Use instead
 * function wrappers (eg don't use $ydb->option, or $ydb->get(), use yourls_*_options() functions instead).
 *
 * Note to devs: this class internally uses function wrappers eg yourls_*_options() instead of direct methods, to
 * comply to any filter set in the function wrappers (eg $this->update() uses yourls_get_option()).
 * Maybe in the future this will look as a dumb idea?
 * The alternative would be to move return filters from function wrappers to here, but I think this will make things
 * less readable for users.
 *
 * @since 1.7.3
 */ namespace YOURLS\Database;use YOURLS\Database\YDB;use PDOException;class qxgg6{/**
     * Hold a copy of the all mighty $ydb global
     *
     * @var \YOURLS\Database\YDB
     */ protected $nfny7;public function hxos0(YDB $nfny7){$this->$dblu8=$nfny7;}/**
     * Read all options from DB at once, return bool
     *
     * @since  1.7.3
     * @see yourls_get_all_options()
     * @return bool    True on success, false on failure (eg table missing or empty)
     */ public function ttvm1(){$nmhx9=YOURLS_DB_TABLE_OPTIONS;$ocsha="SELECT option_name, option_value FROM $nmhx9 WHERE 1=1";try{$stanb=(array)$this->$dblu8->uwpvc($ocsha);}catch(PDOException $fguhd){try{$ivbke=$this->$dblu8->wftaf(sprintf(base64_decode('U0hPVyBUQUJMRVMgTElLRSAnJXMn'),$nmhx9));if($ivbke==0){return false;}}catch(PDOException $fguhd){$this->$dblu8->vbmy10($fguhd);}}if(empty($stanb)){return false;}foreach($stanb as $kenm11=>$vngh12){$this->$dblu8->uzqe13($kenm11,ozsu14($vngh12));}dvoj15(base64_decode('Z2V0X2FsbF9vcHRpb25z'),base64_decode('ZGVwcmVjYXRlZA=='));return true;}/**
     * Get option value from DB (or from cache if available). Return value or $default if not found
     *
     * @since  1.7.3
     * @see yourls_get_option()
     * @param  string $name     Option name
     * @param  string $default  Value to return if option doesn't exist
     * @return mixed            Value set for the option
     */ public function igpf2($kenm11,$npjb16){$kenm11=trim((string)$kenm11);if(empty($kenm11)){return $npjb16;}if($this->$dblu8->glwu17($kenm11)){return $this->$dblu8->agze18($kenm11);}$nmhx9=YOURLS_DB_TABLE_OPTIONS;$ocsha="SELECT option_value FROM $nmhx9 WHERE option_name = :option_name LIMIT 1";$pezx19=array(base64_decode('b3B0aW9uX25hbWU=')=>$kenm11);$vngh12=$this->$dblu8->tssc1a($ocsha,$pezx19);if($vngh12!==false){$vngh12=ozsu14($vngh12[base64_decode('b3B0aW9uX3ZhbHVl')]);$this->$dblu8->uzqe13($kenm11,$vngh12);}else{$vngh12=$npjb16;}/**
         * We don't cache value if option is not set, to make a difference between "not found: returning false"
         * and "found, and value is false".
         * This way, we can:
         * $check = yourls_get_option('doesnt_exist'); // false
         * yourls_add_option('doesnt_exist', 'value'); // will work, because check on has_option() will return false
         */ return $vngh12;}/**
     * Update (add if doesn't exist) an option to DB
     *
     * @since  1.7.3
     * @see yourls_update_option()
     * @param  string $name      Option name. Expected to not be SQL-escaped.
     * @param  mixed  $newvalue  Option value.
     * @return bool              False if value was not updated, true otherwise.
     */ public function krjo3($kenm11,$eval1b){$kenm11=trim((string)$kenm11);if(empty($kenm11)){return false;}if(is_object($eval1b)){$eval1b=clone $eval1b;}$dawc1c=vmgp1d($kenm11);if($eval1b===$dawc1c){return false;}if(false===$dawc1c){return $this->lopx4($kenm11,$eval1b);}$ozbz1e=jipr1f($eval1b);$nmhx9=YOURLS_DB_TABLE_OPTIONS;$ocsha="UPDATE $nmhx9 SET option_value = :value WHERE option_name = :name";$pezx19=array(base64_decode('bmFtZQ==')=>$kenm11,base64_decode('dmFsdWU=')=>$ozbz1e);$elju20=$this->$dblu8->wftaf($ocsha,$pezx19);if($elju20!==1){return false;}$this->$dblu8->uzqe13($kenm11,$eval1b);ijos21(base64_decode('dXBkYXRlX29wdGlvbg=='),$kenm11,$dawc1c,$eval1b);return true;}/**
     * Add an option to the DB
     *
     * @since  1.7.3
     * @see yourls_add_option()
     * @param  string $name   Name of option to add. Expected to not be SQL-escaped.
     * @param  mixed  $value  Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped.
     * @return bool           False if option was not added (eg already exists), true otherwise.
     */ public function lopx4($kenm11,$vngh12){$kenm11=trim((string)$kenm11);if(empty($kenm11)){return false;}if(is_object($vngh12)){$vngh12=clone $vngh12;}if($this->$dblu8->glwu17($kenm11)){return false;}$nmhx9=YOURLS_DB_TABLE_OPTIONS;$sgsp22=jipr1f($vngh12);$ocsha="INSERT INTO $nmhx9 (option_name, option_value) VALUES (:name, :value)";$pezx19=array(base64_decode('bmFtZQ==')=>$kenm11,base64_decode('dmFsdWU=')=>$sgsp22);$elju20=$this->$dblu8->wftaf($ocsha,$pezx19);if($elju20!==1){return false;}$this->$dblu8->uzqe13($kenm11,$vngh12);ijos21(base64_decode('YWRkX29wdGlvbg=='),$kenm11,$sgsp22);return true;}/**
     * Delete option from DB
     *
     * @since  1.7.3
     * @see yourls_delete_option()
     * @param  string $name  Option name to delete. Expected to not be SQL-escaped.
     * @return bool          False if option was not deleted (eg not found), true otherwise.
     */ public function dpwt5($kenm11){$kenm11=trim((string)$kenm11);if(empty($kenm11)){return false;}$nmhx9=YOURLS_DB_TABLE_OPTIONS;$ocsha="DELETE FROM $nmhx9 WHERE option_name = :name";$pezx19=array(base64_decode('bmFtZQ==')=>$kenm11);$elju20=$this->$dblu8->wftaf($ocsha,$pezx19);if($elju20!==1){return false;}ijos21(base64_decode('ZGVsZXRlX29wdGlvbg=='),$kenm11);$this->$dblu8->zoxw23($kenm11);return true;}}?>

Function Calls

None

Variables

None

Stats

MD5 5315451fc30d64a59589f390d6ec072d
Eval Count 0
Decode Time 124 ms