3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "2007 Chevy Silverado Pickup new body style models 2008-2013 Chevy Silverado All Models 2014 Chevy Silverado 2500HD 3500HD 2007 GMC Sierra Pickup new body style models 2008 - 2013 GMC Sierra All Models 2014 GMC Sierra 2500HD 3500HD 2007-2013 Chevy Tahoe 2007-2013 Chevy Suburban 2007 - 2013 Chevy Avalanche 2007-2013 GMC Yukon Yukon XL Yukon Denali"; echo preg_replace_callback('~(\s*)(19[5-9]\d|20[0-4]\d)(?:\s*-\s*(19[5-9]\d|20[0-4]\d))?(?=\s)~', function($m) { //var_export($m); // un-comment if you want to see each $m array //echo "\n---\n"; return (strlen($m[1]) ? "\n" : "") . "<strong>*{$m[2]}" . (isset($m[3]) ? " - {$m[3]}" : "") . "</strong>"; }, $string);
Output for git.master, git.master_jit, rfc.property-hooks
<strong>*2007</strong> Chevy Silverado Pickup new body style models <strong>*2008 - 2013</strong> Chevy Silverado All Models <strong>*2014</strong> Chevy Silverado 2500HD 3500HD <strong>*2007</strong> GMC Sierra Pickup new body style models <strong>*2008 - 2013</strong> GMC Sierra All Models <strong>*2014</strong> GMC Sierra 2500HD 3500HD <strong>*2007 - 2013</strong> Chevy Tahoe <strong>*2007 - 2013</strong> Chevy Suburban <strong>*2007 - 2013</strong> Chevy Avalanche <strong>*2007 - 2013</strong> GMC Yukon Yukon XL Yukon Denali

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:
131.35 ms | 407 KiB | 5 Q