3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = "Wednesday, 01/27/2016"; $calDate = explode(', ',$date); echo (int)(abs( strtotime($calDate) - strtotime('now') )/ ( 60 * 60 * 24 ) );
based on 6LXgi
Output for 5.3.21 - 5.4.45, 5.6.28, 7.0.20 - 7.2.0
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16799
Output for 7.0.6
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16942
Output for 7.0.5
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16894
Output for 7.0.4
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16870
Output for 7.0.3
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16878
Output for 7.0.2
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16883
Output for 7.0.1
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16884
Output for 7.0.0
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16887
Output for 5.6.21
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16923
Output for 5.6.20
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16901
Output for 5.6.19
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16868
Output for 5.6.18
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16875
Output for 5.6.17
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16880
Output for 5.6.16
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16888
Output for 5.6.15
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16889
Output for 5.6.14
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16905
Output for 5.6.13
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16906
Output for 5.6.12
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16911
Output for 5.6.11
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16915
Output for 5.6.10
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16916
Output for 5.6.9
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16918
Output for 5.6.8
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16921
Output for 5.5.35
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16943
Output for 5.5.34
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16902
Output for 5.5.33
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16869
Output for 5.5.32
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16877
Output for 5.5.31
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16881
Output for 5.5.30
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16892
Output for 5.5.29
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16908
Output for 5.5.28
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16912
Output for 5.5.27
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16913
Output for 5.5.26
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16917
Output for 5.5.25
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16920
Output for 5.5.24
Warning: strtotime() expects parameter 1 to be string, array given in /in/LW3lV on line 7 16945