3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $relatedproduct =' Belkin Cat6 Snagless UTP Patch Cable (Black) 0.5m </a>\n'; $relatedproduct .=' <span title="B-Tech BT604 - AtlasTM Sound Isolating Loudspeaker Floor Stands 40cm (15.8&quot;) - Finished in Black">B-Tech BT604 - AtlasTM Sound Isolating Loudspeaker Floor Stands 40cm (15.8") - Finished &#133;</span> </a>\n'; $relatedproduct .=' <span title="jntworld 4m length table edge Guard baby toddler protector +4 corner (black) extra thick (13 mm) soft Non-toxic and environmentally friendly">jntworld 4m length table edge Guard baby toddler protector +4 corner (black) extra thick (13 mm) soft &#133;</span> </a>\n'; preg_match_all('/\s*(.*) <\/a>/', $relatedproduct, $relatedtit); var_dump($relatedtit[1]);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(1) { [0]=> string(590) "Belkin Cat6 Snagless UTP Patch Cable (Black) 0.5m </a>\n <span title="B-Tech BT604 - AtlasTM Sound Isolating Loudspeaker Floor Stands 40cm (15.8&quot;) - Finished in Black">B-Tech BT604 - AtlasTM Sound Isolating Loudspeaker Floor Stands 40cm (15.8") - Finished &#133;</span> </a>\n <span title="jntworld 4m length table edge Guard baby toddler protector +4 corner (black) extra thick (13 mm) soft Non-toxic and environmentally friendly">jntworld 4m length table edge Guard baby toddler protector +4 corner (black) extra thick (13 mm) soft &#133;</span>" }