3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $files = [ '/usr/share/nginx/wordpress/wp-content/plugins/myplugin.php', '/usr/share/nginx/wordpress/wp-content/themes/index.php', '/usr/share/nginx/wordpress/wp-content/themes/mytheme.php', '/usr/share/nginx/wordpress/wp-content/plugins/akismet.php', '/usr/share/nginx/wordpress/wp-content/uploads/november.jpg', ]; $exclude = [ '/usr/share/nginx/wordpress/wp-content/plugins/myplugin.php', '/usr/share/nginx/wordpress/wp-content/uploads', ]; // tamamen eşit klasör ya da dosya = 0 // klasörden dolayı alt dosya olabilir = 1 // hiç eşleşmeyebilir = -1 var_dump(array_udiff($files, $exclude, function($a, $b) { var_dump($a, $b, strpos($a, $b)); return strpos($a, $b) === false ? -1 (strtolower($a) == strtolower($b) ? 0 : 1); }));
Output for 5.6.30, 7.0.0 - 7.2.9
Parse error: syntax error, unexpected '(' in /in/fTYcQ on line 23
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: syntax error, unexpected ';' in /in/fTYcQ:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.15.4 - 3.21.3
Fatal error: Uncaught Error: syntax error, unexpected ';' in /in/fTYcQ:23 Stack trace: #0 {main}
Process exited with code 255.