3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '~[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?|\d+|(?>\p{L}\p{M}*+)+~u'; $text = "The example number 2 is a bad example it will not \ncount numbers and punctuations !! X is 2.5674."; if (preg_match_all($re, $text, $matches)) { echo count($matches[0]) . PHP_EOL; print_r($matches[0]); }
Output for git.master, git.master_jit, rfc.property-hooks
18 Array ( [0] => The [1] => example [2] => number [3] => 2 [4] => is [5] => a [6] => bad [7] => example [8] => it [9] => will [10] => not [11] => count [12] => numbers [13] => and [14] => punctuations [15] => X [16] => is [17] => 2.5674 )

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:
164.01 ms | 406 KiB | 5 Q