strtotime() Simulator

Test PHP's strtotime() function with natural language inputs and see the resulting timestamp and date in real-time.

Input

Try: "next Friday", "+2 weeks", "last Monday", "first day of next month"
Leave empty to use current time

Common Examples

Output

Unix Timestamp

Formatted Date

PHP Code

Relative Time

Features

  • Real-time testing of PHP's strtotime() function
  • See timestamp, formatted date, and relative time instantly
  • Test with custom base time or current time
  • Common examples for quick testing
  • Generate ready-to-use PHP code snippets

How to Use

  1. Type a natural language time expression (e.g., "next Friday", "+1 week")
  2. Optionally set a base time to calculate from
  3. View the resulting timestamp and formatted date in real-time
  4. Copy the PHP code or timestamp for use in your projects
  5. Try the common examples for inspiration