3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(strtotime('-1 day')); $str = '1day'; var_dump(strtotime("-{$str}"));
based on 9mU6u
Output for 5.6.28, 7.0.20 - 7.2.0
int(1446951314) int(1446951314)
Output for 7.0.6
int(1462206724) int(1462206724)
Output for 7.0.5
int(1459573027) int(1459573027)
Output for 7.0.4
int(1457545449) int(1457545449)
Output for 7.0.3
int(1458240783) int(1458240783)
Output for 7.0.2
int(1458608429) int(1458608429)
Output for 7.0.1
int(1458707973) int(1458707973)
Output for 7.0.0
int(1458974137) int(1458974137)
Output for 5.6.21
int(1462102885) int(1462102885)
Output for 5.6.20
int(1460174185) int(1460174185)
Output for 5.6.19
int(1457315741) int(1457315741)
Output for 5.6.18
int(1457951951) int(1457951951)
Output for 5.6.17
int(1458339516) int(1458339516)
Output for 5.6.16
int(1459059776) int(1459059776)
Output for 5.6.15
int(1459149213) int(1459149213)
Output for 5.6.14
int(1459501481) int(1459501481)
Output for 5.6.13
int(1460640544) int(1460640544)
Output for 5.6.12
int(1461038293) int(1461038293)
Output for 5.6.11
int(1461406862) int(1461406862)
Output for 5.6.10
int(1461500624) int(1461500624)
Output for 5.6.9
int(1461692014) int(1461692014)
Output for 5.6.8
int(1461896742) int(1461896742)
Output for 5.5.35
int(1463857161) int(1463857161)
Output for 5.5.34
int(1460268505) int(1460268505)
Output for 5.5.33
int(1457411959) int(1457411959)
Output for 5.5.32
int(1458138885) int(1458138885)
Output for 5.5.31
int(1458436843) int(1458436843)
Output for 5.5.30
int(1459415237) int(1459415237)
Output for 5.5.29
int(1460778736) int(1460778736)
Output for 5.5.28
int(1461136336) int(1461136336)
Output for 5.5.27
int(1461229110) int(1461229110)
Output for 5.5.26
int(1461596799) int(1461596799)
Output for 5.5.25
int(1461794344) int(1461794344)
Output for 5.5.24
int(1463977895) int(1463977895)
Output for 5.4.45
int(1446951316) int(1446951316)
Output for 5.4.44
int(1446951317) int(1446951317)
Output for 5.4.43
int(1446951318) int(1446951318)
Output for 5.4.41 - 5.4.42
int(1446951319) int(1446951319)
Output for 5.4.39 - 5.4.40
int(1446951320) int(1446951320)
Output for 5.4.36 - 5.4.38
int(1446951321) int(1446951321)
Output for 5.4.34 - 5.4.35
int(1446951322) int(1446951322)
Output for 5.3.29, 5.4.29 - 5.4.32
int(1446951323) int(1446951323)
Output for 5.4.25 - 5.4.28
int(1446951324) int(1446951324)
Output for 5.3.28, 5.4.21 - 5.4.24
int(1446951325) int(1446951325)
Output for 5.3.27, 5.4.18 - 5.4.20
int(1446951326) int(1446951326)
Output for 5.3.24 - 5.3.26, 5.4.13 - 5.4.17
int(1446951327) int(1446951327)
Output for 5.3.19 - 5.3.23, 5.4.9 - 5.4.12
int(1446951328) int(1446951328)