-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
187 lines (163 loc) · 19.7 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html>
<?php
$functions = ['freeze', 'return', 'scale', 'travel'];
$time = isset($_GET['time'])?$_GET['time']:'1970-01-01 00:00:00';
$url = htmlspecialchars((isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'], ENT_QUOTES, 'UTF-8');
?>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TimeCop</title>
<link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAABoBAMAAADvMqiSAAAAGFBMVEVHcEw6mVXgR1IDBgM0f0e+QUgfUy6DST/kPdT8AAAAAXRSTlMAQObYZgAAAaxJREFUWMPtmMFqwzAMhjUyehc1eQBfdjUo9DxT0/NwS3vtcMkbjL3+gDWxk9mO7YUujPyUYpd8yFIVIwkgJM3fIFsrlANt1EAHzc/uvvUyN6WkYkx2X5qf7N5P3SRKdMU0Pw1+QHUdMzjWTwjxdcA8YxLEBrZkGoR13JAfwmvUUADa22hjMsSipwtA9nxPJdB7BrSPxSEE9UHHHEhEgjcrxCgS8RCEj4NMkSVRYukXkJN6rLXS/Nyvo1BNVpof+3Xckh/azQ/VRPc/DyrNj11GT1ry3eWbCUjkQ3UJxJYNrT4t2CfnjjgkQ41TpgReDadyMSQAeIGWDl0un0Nd7uL8pVuOnvgAgEYyvH9CaaT6J5ihNctXn1af/odPbdeQbTQ/p13LiEx5Sjc5U723VIgeDWX2GgVQn9JFUE6ntu2grJ6wBDIdlNPn9jVDTkdtC4303n1roSYZMvbVrpLnEeTcB03i5MM4tRNUaTMWQy4EdJOTEDPkng6gol2rYpBSLdHQEEBFRDsyjjQ/utvv9ksMJ0c0ltsTdhLjGVUCJDzjsAlITA/h3J7w74aCXwzSsw37s73BAAAAAElFTkSuQmCC">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulmaswatch/0.6.2/darkly/bulmaswatch.min.css" integrity="sha256-KM06RFCwAAPP6VGIdcn1FqGktG4dbKBGVTE3dNPV5z8=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/solarized-dark.min.css" integrity="sha256-90Y+fvi28WF+3jKH4tHEkoQ9WLeFKJjpvCPNOtU9ZvU=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<style>
h1 img {
height: 20vh;
min-height: 4em;
}
.message-body pre {
background-color: #002B36;
}
</style>
</head>
<body>
<?php
$enabled = class_exists('Timecop');
?>
<?php if ($enabled === false) : ?>
<header class="hero has-text-centered">
<div class="hero-body">
<h1 class="title">PHP TimeCop is not (yet) enabled</h1>
<p class="subtitle">Please contact your favorite sysops person to discuss how PHP TimeCop can be enabled for you!</p>
</div>
</header>
<?php else: ?>
<header class="hero has-text-centered">
<div class="hero-body">
<h1 class="title">
<img alt="PHP TimeCop Logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAE2CAMAAACuvgb1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOk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tv3xmxuqOBRmQQjBvzK3Znz33A9jEiglTAAgIQEAAAgIQEICAAAQEICAAAQEICEBAABAQgIAABAQgIAABAQgIQEAAAgIQEAAEBCAgwIbMr3/7+bevTTYE4CSWT6VS+RgbAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMA2+x0YxTKhyE/LYwAAAABJRU5ErkJggg=="/>
</h1>
<blockquote class="subtitle">
<p><em>"There is never enough time."</em> ~ Max Walker</p>
</blockquote>
</div>
</header>
<section class="section">
<article class="container">
<div class="message">
<h2 class="message-header title is-5">Introduction</h2>
<div class="message-body">
<p>
The <a href="https://github.com/hnw/php-timecop">php-timecop</a> PHP extension
makes it possible to manipulate time as experienced by the PHP runtime.
</p>
<p>It provides "time travel" and "time freezing" capabilities.</p>
<p>This can be very useful when testing code that has time-sensitive functionality.</p>
<p>This project offers examples demonstrating how PHP TimeCop works.</p>
</div>
</div>
<div class="message">
<h2 class="message-header title is-5">Usage</h2>
<div class="message-body">
<ol>
<li><a href="https://github.com/hnw/php-timecop#install-with-package-manager">Install php-timecop</a> on a PHP server of your choice.</li>
<li>Clone this repository to the same server.</li>
<li>Visit the <code>index.php</code> in a web browser.</li>
<li>Study the provided examples and their output.</li>
<li>...</li>
<li><a href="http://knowyourmeme.com/memes/profit">Profit!</a></li>
</ol>
</div>
</div>
<div class="message">
<h2 class="message-header title is-5">Features</h2>
<div class="message-body">
<p>PHP TimeCop offers four functions to manipulate time.</p>
<br/>
<p>For the static class method a regular function is also available (execept for `return` as that is a reserved word in PHP):</p>
<ul>
<li><code>TimeCop::freeze($new_time)</code> / <code>timecop_freeze($new_time)</code></li>
<li><code>timecop_return()</code></li>
<li><code>TimeCop::scale($scaling_factor)</code> / <code>timecop_scale($scaling_factor)</code></li>
<li><code>TimeCop::travel($new_time)</code> / <code>timecop_travel($new_time)</code></li>
</ul>
<br/>
<div class="box">
<h3 class="title">Freeze</h3>
<p>
Used to statically mock the concept of "now".
</p>
<p>
As the PHP runtime executes, <code>time()</code> will not change unless subsequent calls to freeze/return/scale/travel are made.
</p>
</div>
<div class="box">
<h3 class="title">Return</h3>
<p>Return the system to a normal state. Effectively "turn off" php-timecop</p>
</div>
<div class="box">
<h3 class="title">Scale</h3>
<p>
Make time move at an accelerated pace. With this function, long time spans can be emulated in a shorter time.
</p>
</div>
<div class="box">
<h3 class="title">Travel</h3>
<p>
Computes an offset between the currently think <code>time()</code> and the time passed in.
It uses this offset to simulate the passage of time.
</p>
</div>
</div>
</div>
<div class="message">
<h2 class="message-header title is-5">Examples</h2>
<div class="message-body">
<form action="" method="get">
<label class="label">The result of these examples can be seen below. The results can be altered by providing a time:</label>
<div class="field has-addons">
<div class="control">
<a class="button is-static">
<?=$url?>?time=
</a>
</div>
<div class="control is-expanded">
<input class="input" name="time" type="datetime-local" value="<?=date('Y-m-d\\TH:i:s', strtotime($time));?>" placeholder="1970-01-01 00:00:00"/>
</div>
<div class="control">
<button class="button is-info">Submit</button>
</div>
</div>
</form>
<br/>
<?php foreach($functions as $function): ?>
<div class="box">
<h3 class="title"><?= ucfirst($function)?></h3>
<pre><code class="php"><?= htmlentities(file_get_contents(__DIR__.'/examples/'.$function.'.php'))?></code></pre>
</div>
<?php endforeach;?>
</div>
</div>
<div class="message">
<h2 class="message-header title is-5">Example Output</h2>
<div class="message-body">
<p>
Below is the output of the examples mentioned above.
</p>
<?php foreach($functions as $function): ?>
<div class="box">
<h3 class="title"><?= ucfirst($function)?></h3>
<?php require __DIR__.'/examples/'.$function.'.php' ?>
</div>
<?php endforeach;?>
</div>
</div>
</article>
</section>
<script>hljs.initHighlightingOnLoad();</script>
<?php endif;?>
</body>
</html>