3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ 'file_name_here1.txt', 'some_other-file10.txt', 'file_name_1__123.txt', 'this_file_name_2__456.txt', ]; foreach ($tests as $test) { preg_match('/(.+?)(\d+)\.\w+$/', $test, $m); var_dump(array_slice($m, 1)); }
Output for git.master_jit, git.master, rfc.property-hooks
array(2) { [0]=> string(14) "file_name_here" [1]=> string(1) "1" } array(2) { [0]=> string(15) "some_other-file" [1]=> string(2) "10" } array(2) { [0]=> string(13) "file_name_1__" [1]=> string(3) "123" } array(2) { [0]=> string(18) "this_file_name_2__" [1]=> string(3) "456" }

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:
63.73 ms | 406 KiB | 5 Q