3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $offer = 'some text offer with checkboxes '; $offer.= '<input type="checkbox" name="offer100500_1_chk" id = "offer100500_1_chk" value = "1" checked = "checked"/> first chkBox'; $offer.= '<input type="checkbox" name="offer100500_2_chk" id = "offer100500_2_chk" value = "1" checked = "checked"/> second chkBox'; $offer.= '<input type="checkbox" name="offer100500_4_chk" id = "offer100500_4_chk" value = "1" checked = "checked"/> third chkBox'; $offer.= '<input type="checkbox" name="offer100500_9_chk" id = "offer100500_9_chk" value = "1" checked = "checked"/> fours chkBox'; preg_match_all('/type="checkbox".*name="([\w]+)"/', $offer, $matches, PREG_SET_ORDER); var_dump($matches);
based on iCRVp
Output for 5.6.0 - 7.0.1, 7.0.3 - 7.3.0beta1
array(1) { [0]=> array(2) { [0]=> string(398) "type="checkbox" name="offer100500_1_chk" id = "offer100500_1_chk" value = "1" checked = "checked"/> first chkBox<input type="checkbox" name="offer100500_2_chk" id = "offer100500_2_chk" value = "1" checked = "checked"/> second chkBox<input type="checkbox" name="offer100500_4_chk" id = "offer100500_4_chk" value = "1" checked = "checked"/> third chkBox<input type="checkbox" name="offer100500_9_chk"" [1]=> string(17) "offer100500_9_chk" } }
Output for 7.0.2

Process exited with code 137.