3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $pattern = '/SKU-[^)]*/i'; $license_name = "sing user license(SKU-123456) "; $pos = preg_match($pattern, $license_name, $matches, PREG_OFFSET_CAPTURE, 3); var_dump($matches);
Output for 4.3.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(1) { [0]=> array(2) { [0]=> string(10) "SKU-123456" [1]=> int(18) } }
Output for 4.3.0 - 4.3.2
Warning: Wrong parameter count for preg_match() in /in/iaSKc on line 5 NULL