3v4l.org

run code in 300+ PHP versions simultaneously
<?php // doesn't update realpath cache touch('/tmp/foo'); var_dump(filemtime('/tmp/foo')); touch('/tmp/foo', 1); var_dump(filemtime('/tmp/foo')); // does update the realpath cache touch('file:///tmp/foo'); var_dump(filemtime('file:///tmp/foo')); touch('file:///tmp/foo', 1); var_dump(filemtime('file:///tmp/foo'));
based on YEAOW
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.9, 7.3.11 - 7.3.28, 7.4.0 - 7.4.15, 8.0.0 - 8.0.3
int(1480431692) int(1480431692) int(1480431692) int(1480431692)
Output for 7.3.10
int(1480431692) int(1480431692) int(1480431692) Warning: filemtime(): stat failed for file:///tmp/foo in /in/0VQIo on line 14 bool(false)
Output for 5.5.38
int(1500684170) int(1500684170) int(1500684170) int(1)
Output for 5.5.37
int(1500684171) int(1500684171) int(1500684171) int(1)
Output for 5.5.35 - 5.5.36
int(1500684172) int(1500684172) int(1500684172) int(1)
Output for 5.5.34
int(1500684173) int(1500684173) int(1500684173) int(1)
Output for 5.5.32 - 5.5.33
int(1500684174) int(1500684174) int(1500684174) int(1)
Output for 5.5.31
int(1500684175) int(1500684175) int(1500684175) int(1)
Output for 5.5.30
int(1500684177) int(1500684177) int(1500684177) int(1)
Output for 5.4.44 - 5.4.45, 5.5.27 - 5.5.29
int(1500684178) int(1500684178) int(1500684178) int(1)
Output for 5.4.42 - 5.4.43, 5.5.26
int(1500684179) int(1500684179) int(1500684179) int(1)
Output for 5.4.41, 5.5.25
int(1500684180) int(1500684180) int(1500684180) int(1)
Output for 5.4.40, 5.5.23 - 5.5.24
int(1500684181) int(1500684181) int(1500684181) int(1)
Output for 5.4.39, 5.5.22
int(1500684182) int(1500684182) int(1500684182) int(1)
Output for 5.4.37 - 5.4.38, 5.5.21
int(1500684183) int(1500684183) int(1500684183) int(1)
Output for 5.4.36, 5.5.20
int(1500684184) int(1500684184) int(1500684184) int(1)
Output for 5.4.35, 5.5.18 - 5.5.19
int(1500684185) int(1500684185) int(1500684185) int(1)
Output for 5.4.34, 5.5.16
int(1500684186) int(1500684186) int(1500684186) int(1)
Output for 5.4.31 - 5.4.32, 5.5.15
int(1500684187) int(1500684187) int(1500684187) int(1)
Output for 5.4.28 - 5.4.30, 5.5.13 - 5.5.14
int(1500684188) int(1500684188) int(1500684188) int(1)
Output for 5.4.26 - 5.4.27, 5.5.11 - 5.5.12
int(1500684189) int(1500684189) int(1500684189) int(1)
Output for 5.4.24 - 5.4.25, 5.5.8 - 5.5.10
int(1500684190) int(1500684190) int(1500684190) int(1)
Output for 5.4.22 - 5.4.23, 5.5.6 - 5.5.7
int(1500684191) int(1500684191) int(1500684191) int(1)
Output for 5.4.19 - 5.4.21, 5.5.3 - 5.5.5
int(1500684192) int(1500684192) int(1500684192) int(1)
Output for 5.4.16 - 5.4.18, 5.5.0 - 5.5.2
int(1500684193) int(1500684193) int(1500684193) int(1)
Output for 5.4.12 - 5.4.15
int(1500684194) int(1500684194) int(1500684194) int(1)
Output for 5.4.8 - 5.4.11
int(1500684195) int(1500684195) int(1500684195) int(1)
Output for 5.4.5 - 5.4.7
int(1500684196) int(1500684196) int(1500684196) int(1)
Output for 5.4.1 - 5.4.4
int(1500684197) int(1500684197) int(1500684197) int(1)
Output for 5.4.0
int(1500684198) int(1500684198) int(1500684198) int(1)
Output for 5.3.29
int(1500684187) int(1500684187) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 int(1) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 int(1)
Output for 5.3.28
int(1500684191) int(1500684191) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 int(1) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 int(1)
Output for 5.3.27
int(1500684193) int(1500684193) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 int(1) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 int(1)
Output for 5.3.23 - 5.3.26
int(1500684194) int(1500684194) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 int(1) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 int(1)
Output for 5.3.19 - 5.3.22
int(1500684195) int(1500684195) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 int(1) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 int(1)
Output for 5.3.15 - 5.3.18
int(1500684196) int(1500684196) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 int(1) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 int(1)
Output for 5.3.11 - 5.3.14
int(1500684197) int(1500684197) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 int(1) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 int(1)
Output for 5.2.17, 5.3.5 - 5.3.10
int(1500684198) int(1500684198) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 int(1) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 int(1)
Output for 5.2.12 - 5.2.16, 5.3.2 - 5.3.4
int(1500684199) int(1500684199) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 int(1) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 int(1)
Output for 5.2.7 - 5.2.11, 5.3.0 - 5.3.1
int(1500684200) int(1500684200) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 int(1) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 int(1)
Output for 5.2.2 - 5.2.6
int(1500684201) int(1500684201) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 int(1) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 int(1)
Output for 5.1.4 - 5.1.6, 5.2.0 - 5.2.1
int(1500684202) int(1500684202) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 int(1) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 int(1)
Output for 5.0.4 - 5.0.5, 5.1.0 - 5.1.3
int(1500684203) int(1500684203) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 int(1) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 int(1)
Output for 5.0.0 - 5.0.3
int(1500684204) int(1500684204) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 int(1) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 int(1)
Output for 4.4.6 - 4.4.9
int(1500684201) int(1500684201) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 Warning: filemtime(): Stat failed for file:///tmp/foo (errno=2 - No such file or directory) in /in/0VQIo on line 12 bool(false) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 Warning: filemtime(): Stat failed for file:///tmp/foo (errno=2 - No such file or directory) in /in/0VQIo on line 14 bool(false)
Output for 4.4.3 - 4.4.5
int(1500684202) int(1500684202) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 Warning: filemtime(): Stat failed for file:///tmp/foo (errno=2 - No such file or directory) in /in/0VQIo on line 12 bool(false) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 Warning: filemtime(): Stat failed for file:///tmp/foo (errno=2 - No such file or directory) in /in/0VQIo on line 14 bool(false)
Output for 4.4.0 - 4.4.2
int(1500684203) int(1500684203) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 Warning: filemtime(): Stat failed for file:///tmp/foo (errno=2 - No such file or directory) in /in/0VQIo on line 12 bool(false) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 Warning: filemtime(): Stat failed for file:///tmp/foo (errno=2 - No such file or directory) in /in/0VQIo on line 14 bool(false)
Output for 4.3.9 - 4.3.11
int(1500684204) int(1500684204) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 Warning: filemtime(): Stat failed for file:///tmp/foo (errno=2 - No such file or directory) in /in/0VQIo on line 12 bool(false) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 Warning: filemtime(): Stat failed for file:///tmp/foo (errno=2 - No such file or directory) in /in/0VQIo on line 14 bool(false)
Output for 4.3.2 - 4.3.8
int(1500684205) int(1500684205) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 Warning: filemtime(): Stat failed for file:///tmp/foo (errno=2 - No such file or directory) in /in/0VQIo on line 12 bool(false) Warning: touch(): Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 Warning: filemtime(): Stat failed for file:///tmp/foo (errno=2 - No such file or directory) in /in/0VQIo on line 14 bool(false)
Output for 4.3.0 - 4.3.1
int(1500684206) int(1500684206) Warning: touch() [http://www.php.net/function.touch]: Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 11 Warning: filemtime() [http://www.php.net/function.filemtime]: Stat failed for file:///tmp/foo (errno=2 - No such file or directory) in /in/0VQIo on line 12 bool(false) Warning: touch() [http://www.php.net/function.touch]: Unable to create file file:///tmp/foo because No such file or directory in /in/0VQIo on line 13 Warning: filemtime() [http://www.php.net/function.filemtime]: Stat failed for file:///tmp/foo (errno=2 - No such file or directory) in /in/0VQIo on line 14 bool(false)