3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filename = '1234_56_78 A_FAIRLY_SHORT_TITLE_D.pdf'; $m = preg_split('~ |_~', pathinfo($filename, PATHINFO_FILENAME)); $revision = array_pop($m); var_export([ 'project_no' => $m[0], 'series_no' => $m[1], 'sheet_no' => $m[2], 'title' => implode(' ', array_slice($m, 3)), 'revision' => $revision, ]);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'project_no' => '1234', 'series_no' => '56', 'sheet_no' => '78', 'title' => 'A FAIRLY SHORT TITLE', 'revision' => 'D', )

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:
125.14 ms | 405 KiB | 5 Q