3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php touch(dirname(__FILE__) . '/post-types/foo.php'); touch(dirname(__FILE__) . '/post-types/foo.php'); if ($post_types = glob(dirname(__FILE__) . '/post-types/*.php')) foreach ($post_types as $post_type) echo $post_type;
Output for 4.3.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: touch(): Unable to create file /in/post-types/foo.php because No such file or directory in /in/tbTNa on line 4 Warning: touch(): Unable to create file /in/post-types/foo.php because No such file or directory in /in/tbTNa on line 5
Output for 4.3.0 - 4.3.1
Warning: touch() [http://www.php.net/function.touch]: Unable to create file /in/post-types/foo.php because No such file or directory in /in/tbTNa on line 4 Warning: touch() [http://www.php.net/function.touch]: Unable to create file /in/post-types/foo.php because No such file or directory in /in/tbTNa on line 5