3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(strtotime('-3 day')); $str = '3day'; var_dump(strtotime("-{$str}"));
based on Eaqsb
Output for 7.0.20 - 7.2.0
int(1446778525) int(1446778525)
Output for 7.0.6
int(1463575516) int(1463575516)
Output for 7.0.5
int(1459413276) int(1459413276)
Output for 7.0.4
int(1457387106) int(1457387106)
Output for 7.0.3
int(1458084274) int(1458084274)
Output for 7.0.2
int(1458451787) int(1458451787)
Output for 7.0.1
int(1458549064) int(1458549064)
Output for 7.0.0
int(1458814835) int(1458814835)
Output for 5.6.21
int(1461943857) int(1461943857)
Output for 5.6.20
int(1460014622) int(1460014622)
Output for 5.6.19
int(1457157270) int(1457157270)
Output for 5.6.18
int(1457794596) int(1457794596)
Output for 5.6.17
int(1458182139) int(1458182139)
Output for 5.6.16
int(1458904214) int(1458904214)
Output for 5.6.15
int(1458993559) int(1458993559)
Output for 5.6.14
int(1460392955) int(1460392955)
Output for 5.6.13
int(1460481961) int(1460481961)
Output for 5.6.12
int(1460880643) int(1460880643)
Output for 5.6.11
int(1461248416) int(1461248416)
Output for 5.6.10
int(1461342322) int(1461342322)
Output for 5.6.9
int(1461534906) int(1461534906)
Output for 5.6.8
int(1461737949) int(1461737949)
Output for 5.5.35
int(1463710484) int(1463710484)
Output for 5.5.34
int(1460109087) int(1460109087)
Output for 5.5.33
int(1457254857) int(1457254857)
Output for 5.5.32
int(1457981906) int(1457981906)
Output for 5.5.31
int(1458280066) int(1458280066)
Output for 5.5.30
int(1459255821) int(1459255821)
Output for 5.5.29
int(1460619534) int(1460619534)
Output for 5.5.28
int(1460978128) int(1460978128)
Output for 5.5.27
int(1461070168) int(1461070168)
Output for 5.5.26
int(1461438506) int(1461438506)
Output for 5.5.25
int(1461638202) int(1461638202)
Output for 5.5.24
int(1463821522) int(1463821522)
Output for 5.4.45
int(1453972271) int(1453972271)
Output for 5.4.44
int(1453972274) int(1453972274)
Output for 5.4.43
int(1453972278) int(1453972278)
Output for 5.4.42
int(1453972279) int(1453972279)
Output for 5.4.41
int(1453972280) int(1453972280)
Output for 5.4.40
int(1453972284) int(1453972284)
Output for 5.4.39
int(1453972287) int(1453972287)
Output for 5.4.38
int(1453972288) int(1453972288)
Output for 5.4.37
int(1453972290) int(1453972290)
Output for 5.4.36
int(1453972291) int(1453972291)
Output for 5.4.35
int(1453972293) int(1453972293)
Output for 5.4.34
int(1453972294) int(1453972294)
Output for 5.4.32
int(1453972297) int(1453972297)
Output for 5.3.29, 5.4.31
int(1453972298) int(1453972298)
Output for 5.4.30
int(1453972300) int(1453972300)
Output for 5.4.29
int(1453972301) int(1453972301)
Output for 5.4.28
int(1453972302) int(1453972302)
Output for 5.4.27
int(1453972303) int(1453972303)
Output for 5.4.26
int(1453972304) int(1453972304)
Output for 5.4.25
int(1453972305) int(1453972305)
Output for 5.4.24
int(1453972306) int(1453972306)
Output for 5.4.23
int(1453972307) int(1453972307)
Output for 5.4.22
int(1453972309) int(1453972309)
Output for 5.4.21
int(1453972310) int(1453972310)
Output for 5.4.20
int(1453972311) int(1453972311)
Output for 5.4.19
int(1453972313) int(1453972313)
Output for 5.4.18
int(1453972314) int(1453972314)
Output for 5.3.27, 5.4.17
int(1453972315) int(1453972315)
Output for 5.3.26, 5.4.15 - 5.4.16
int(1453972317) int(1453972317)
Output for 5.3.24, 5.4.14
int(1453972319) int(1453972319)
Output for 5.3.23, 5.4.13
int(1453972320) int(1453972320)
Output for 5.3.20 - 5.3.22, 5.4.11 - 5.4.12
int(1453972321) int(1453972321)
Output for 5.4.9 - 5.4.10
int(1453972322) int(1453972322)
Output for 5.3.28
int(1453972308) int(1453972308)
Output for 5.3.25
int(1453972318) int(1453972318)
Output for 5.3.19
int(1453972323) int(1453972323)