3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = function ($name) { var_dump($name); $result = preg_match('/^(get)([a-zA-Z\d]+)(List)$/', $name, $matches); var_dump($result); var_dump($matches); }; $names = [ 'getOshList', 'getList', 'OshList', 'getOsh', 'getOshlist', ]; foreach ($names as $name) { $test($name); }
Output for git.master, git.master_jit, rfc.property-hooks
string(10) "getOshList" int(1) array(4) { [0]=> string(10) "getOshList" [1]=> string(3) "get" [2]=> string(3) "Osh" [3]=> string(4) "List" } string(7) "getList" int(0) array(0) { } string(7) "OshList" int(0) array(0) { } string(6) "getOsh" int(0) array(0) { } string(10) "getOshlist" int(0) array(0) { }

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:
53.19 ms | 402 KiB | 8 Q