3v4l.org

run code in 500+ PHP versions simultaneously
<?php $regex = '#[\-\d]$#'; $regex2 = '#[\\-\d]$#'; $regex3 = '#[\\\-\d]$#'; $value = '12-4'; preg_match($regex, $value, $matches); var_dump($matches); preg_match($regex2, $value, $matches); var_dump($matches); preg_match($regex3, $value, $matches); var_dump($matches);
Output for rfc.property-hooks, git.master, git.master_jit
array(1) { [0]=> string(1) "4" } array(1) { [0]=> string(1) "4" } Warning: preg_match(): Compilation failed: invalid range in character class at offset 6 in /in/HOedn on line 15 array(1) { [0]=> string(1) "4" }

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:
38.74 ms | 1548 KiB | 4 Q