3v4l.org

run code in 500+ PHP versions simultaneously
<?php $zip_codes = array( '12556', '765547', '234*', '987*', '237' ); $target_zip = '2347890'; foreach($zip_codes as $zip ) { $digitsOnly = preg_replace("~^(\d+)\**$~", "$1", $zip); if (strpos($target_zip, $digitsOnly) === 0) { echo "$zip matched $target_zip" . PHP_EOL; break; } else { echo "$zip not matched $target_zip" . PHP_EOL; } }
Output for rfc.property-hooks, git.master, git.master_jit
12556 not matched 2347890 765547 not matched 2347890 234* matched 2347890

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.01 ms | 1513 KiB | 4 Q