3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $target_dir = "in/"; $target_filename = 'asurite_hw1.m'; // Splits the input file name and its extension. $base_name = pathinfo($target_filename, PATHINFO_FILENAME); $extension = pathinfo($target_filename, PATHINFO_EXTENSION); echo 'base_name: ' . $base_name . "\n"; echo 'extension: ' . $extension . "\n"; $previous_files = glob($target_dir . $base_name . '*'); echo $previous_files // $pattern = '/^asurite ?>
based on M62vr
Output for 7.0.0 - 7.2.0
base_name: asurite_hw1 extension: m Notice: Array to string conversion in /in/TlAeI on line 14 Array
Output for 5.4.11 - 5.6.28
base_name: asurite_hw1 extension: m Notice: Array to string conversion in /in/TlAeI on line 18 Array
Output for 5.3.21 - 5.3.29
base_name: asurite_hw1 extension: m Array