3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filename = "9567567208_2014-10-16_12-16-02_1137592.wav"; $r = '/(?P<phone>\d{10})_(?P<Y>\d{4})-(?P<m>\d{2})-(?P<d>\d{2})_(?P<H>\d{2})-(?P<i>\d{2})-(?P<s>\d{2})_.*/'; if (preg_match($r, $filename, $bits)) { $phone = $bits['phone']; $year = $bits['Y']; $month = sprintf('%02s', $bits['m']); $day = sprintf('%02s', $bits['d']); $hour = sprintf('%02s', $bits['H']); $minute = sprintf('%02s', $bits['i']); $second = sprintf('%02s', $bits['s']); $timestamp = "$year-$month-$day $hour:$minute:$second"; } echo $timestamp.PHP_EOL; echo $phone.PHP_EOL; ?>
Output for git.master, git.master_jit, rfc.property-hooks
2014-10-16 12:16:02 9567567208

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
40.94 ms | 401 KiB | 8 Q