HEX
Server: Apache/2
System: Linux ind.multivistaglobal.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: multivis (1002)
PHP: 8.1.32
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/multivis/public_html/wp-content/plugins/popup-maker/classes/Utils/Time.php
<?php
/**
 * Time Utility
 *
 * @package   PopupMaker
 * @copyright Copyright (c) 2024, Code Atlantic LLC
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class PUM_Utils_Time
 */
class PUM_Utils_Time {

	/**
	 * Check if a value is a valid Unix timestamp.
	 *
	 * Validates whether the input represents a valid Unix timestamp.
	 * A valid timestamp must be a positive integer (as string or int).
	 * Unix timestamps are positive integers representing seconds since 1970-01-01 00:00:00 UTC.
	 *
	 * @param int|string $timestamp Value to check for timestamp validity (accepts numeric strings)
	 * @return bool True if the value is a valid Unix timestamp, false otherwise
	 */
	public static function is_timestamp( $timestamp ) {
		return ( 1 === preg_match( '~^[1-9][0-9]*$~', (string) $timestamp ) );
	}
}