3v4l.org

run code in 300+ PHP versions simultaneously
<?php function callback($s) { var_dump($s); return substr_replace($s[0], str_repeat('*', strlen($s[0]) - 4), 0, -4); } $values = array( '65746244234383238', '5746244234383238', '746244234383238', '46244234383238', '6244234383238', '244234383238', '44234383238', ); foreach ($values as $value) var_dump(preg_replace_callback('/\d{12,16}/', 'callback', $value));
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { [0]=> string(16) "6574624423438323" } string(17) "************83238" array(1) { [0]=> string(16) "5746244234383238" } string(16) "************3238" array(1) { [0]=> string(15) "746244234383238" } string(15) "***********3238" array(1) { [0]=> string(14) "46244234383238" } string(14) "**********3238" array(1) { [0]=> string(13) "6244234383238" } string(13) "*********3238" array(1) { [0]=> string(12) "244234383238" } string(12) "********3238" string(11) "44234383238"

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