3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo json_encode(date_create('21 years ago')) . ' teste';
based on ONLm6
Output for 7.2.0
{"date":"1995-01-26 01:41:26.004120","timezone_type":3,"timezone":"Europe\/Amsterdam"} teste
Output for 7.1.10
{"date":"1995-01-26 01:41:26.003861","timezone_type":3,"timezone":"Europe\/Amsterdam"} teste
Output for 7.1.7
{"date":"1995-01-26 01:41:26.002406","timezone_type":3,"timezone":"Europe\/Amsterdam"} teste
Output for 7.1.6
{"date":"1995-01-26 01:41:26.012457","timezone_type":3,"timezone":"Europe\/Amsterdam"} teste
Output for 7.1.5
{"date":"1995-01-26 01:41:26.008962","timezone_type":3,"timezone":"Europe\/Amsterdam"} teste
Output for 7.1.0
{"date":"1995-01-26 01:41:26.004009","timezone_type":3,"timezone":"Europe\/Amsterdam"} teste
Output for 5.5.14 - 7.0.20
{"date":"1995-01-26 01:41:26.000000","timezone_type":3,"timezone":"Europe\/Amsterdam"} teste
Output for 5.5.0 - 5.5.13
{"date":"1995-01-26 01:41:26","timezone_type":3,"timezone":"Europe\/Amsterdam"} teste