3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('1 ½ cups','¼ cup','2 tablespoons', '½ cup', '1/3 cup', '2 large', '1 ½ teaspoons', '2 tablespoons', 'Large egg', '1 teaspoon', '¼ teaspoon'); foreach($array as $arr){ preg_match_all("/^(?:[\p{Pd}.\/\s-]*[\d↉½⅓⅔¼¾⅕⅖⅗⅘⅙⅚⅐⅛⅜⅝⅞⅑⅒⅟]|)+/um", $arr, $output); foreach($output[0] as $data){ $try[] = $data; } } var_dump($try);
Output for git.master, git.master_jit, rfc.property-hooks
array(11) { [0]=> string(4) "1 ½" [1]=> string(2) "¼" [2]=> string(1) "2" [3]=> string(2) "½" [4]=> string(3) "1/3" [5]=> string(1) "2" [6]=> string(4) "1 ½" [7]=> string(1) "2" [8]=> string(0) "" [9]=> string(1) "1" [10]=> string(2) "¼" }

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