3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set('GMT'); $now = strtotime("now"); echo "\nnow is $now"; $purchasedDate = strtotime($now); echo "\npurchasedDate is $purchasedDate";
based on iRZbC
Output for 5.6.28, 7.0.14 - 7.1.0
now is 1410560606 purchasedDate is -43021705744
Output for 7.0.6
now is 1462287321 purchasedDate is
Output for 7.0.5
now is 1459653900 purchasedDate is
Output for 7.0.4
now is 1457625885 purchasedDate is
Output for 7.0.3
now is 1458319724 purchasedDate is
Output for 7.0.2
now is 1458687309 purchasedDate is
Output for 7.0.1
now is 1458788678 purchasedDate is
Output for 7.0.0
now is 1459051288 purchasedDate is
Output for 5.6.21
now is 1462183543 purchasedDate is
Output for 5.6.20
now is 1460255014 purchasedDate is
Output for 5.6.19
now is 1457395836 purchasedDate is 122004975459
Output for 5.6.18
now is 1458031365 purchasedDate is
Output for 5.6.17
now is 1458419788 purchasedDate is 246719055521
Output for 5.6.16
now is 1459140546 purchasedDate is
Output for 5.6.15
now is 1459230001 purchasedDate is
Output for 5.6.14
now is 1459582556 purchasedDate is 18500367598
Output for 5.6.13
now is 1460721222 purchasedDate is
Output for 5.6.12
now is 1461118818 purchasedDate is
Output for 5.6.11
now is 1461401434 purchasedDate is
Output for 5.6.10
now is 1461581181 purchasedDate is
Output for 5.6.9
now is 1461772508 purchasedDate is
Output for 5.6.8
now is 1461976746 purchasedDate is
Output for 5.5.35
now is 1463932152 purchasedDate is
Output for 5.5.34
now is 1460349436 purchasedDate is
Output for 5.5.33
now is 1457491881 purchasedDate is -2802675731
Output for 5.5.32
now is 1458217571 purchasedDate is
Output for 5.5.31
now is 1458516535 purchasedDate is 144064277931
Output for 5.5.30
now is 1459496001 purchasedDate is 127213945189
Output for 5.5.29
now is 1460859509 purchasedDate is
Output for 5.5.28
now is 1461216674 purchasedDate is
Output for 5.5.27
now is 1461309954 purchasedDate is
Output for 5.5.26
now is 1461677257 purchasedDate is
Output for 5.5.25
now is 1461874702 purchasedDate is
Output for 5.5.24
now is 1464058797 purchasedDate is
Output for 5.4.45
now is 1442587032 purchasedDate is 159763848178
Output for 5.4.44
now is 1440211590 purchasedDate is
Output for 5.4.43
now is 1440211587 purchasedDate is
Output for 5.4.42
now is 1440211586 purchasedDate is
Output for 5.4.41
now is 1440211584 purchasedDate is
Output for 5.4.40
now is 1440211580 purchasedDate is
Output for 5.4.39
now is 1440211579 purchasedDate is
Output for 5.4.38
now is 1426339268 purchasedDate is
Output for 5.4.37
now is 1426339262 purchasedDate is
Output for 5.4.34 - 5.4.36
now is 1426339261 purchasedDate is
Output for 5.4.21 - 5.4.32
now is 1410560610 purchasedDate is -42895475344
Output for 5.4.0 - 5.4.20
now is 1410560611 purchasedDate is -42863939344
Output for 5.3.8 - 5.3.29
now is 1410560612 purchasedDate is -42832316944
Output for 5.2.6 - 5.3.7
now is 1410560613 purchasedDate is -42800780944
Output for 5.2.0 - 5.2.5
now is 1410560613 purchasedDate is
Output for 5.1.0 - 5.1.6
now is 1410560614 purchasedDate is
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function date_default_timezone_set() in /in/jUUek on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: date_default_timezone_set() in /in/jUUek on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: date_default_timezone_set() in /in/jUUek on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: date_default_timezone_set() in /in/jUUek on line 3