3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = date('YmdHis'); $b = 'secret'; $bb = sha1($b); $bc = preg_replace('#[^0-9]#u', '', $bb); $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 $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
20131214011448 secret e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4 59131184754743663054 secret|20131214011448 c2VjcmV0fDIwMTMxMjE0MDExNDQ4 secret|20131214011448
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/kKb6E on line 13 20131214011448PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/kKb6E on line 14 secretPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/kKb6E on line 15 e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/kKb6E on line 16 59131184754743663054PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/kKb6E on line 17 secret|20131214011448PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/kKb6E on line 18 c2VjcmV0fDIwMTMxMjE0MDExNDQ4PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/kKb6E on line 19 secret|20131214011448PHP_EOL