3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = date('YmdHi'); $b = 'secret'; $bb = sha1($b); $bc = preg_replace('#[^0-9]#u', '', $bb); $bd = (int)$bc - (int)$a; $c = "{$b}|{$a}"; $d = base64_encode($c); $e = base64_decode($d); echo $a . PHP_EOL; echo $b . PHP_EOL; echo $bb . PHP_EOL; echo $bc . PHP_EOL; echo $bd . PHP_EOL; echo $c . PHP_EOL; echo $d . PHP_EOL; echo $e . PHP_EOL;
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
201312140116 secret e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4 59131184754743663054 9223371835542635691 secret|201312140116 c2VjcmV0fDIwMTMxMjE0MDExNg== secret|201312140116
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PlStu on line 14 201312140116PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PlStu on line 15 secretPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PlStu on line 16 e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PlStu on line 17 59131184754743663054PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PlStu on line 18 9223371835542635691PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PlStu on line 19 secret|201312140116PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PlStu on line 20 c2VjcmV0fDIwMTMxMjE0MDExNg==PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PlStu on line 21 secret|201312140116PHP_EOL