3v4l.org

run code in 300+ PHP versions simultaneously
<?php // //ru_RU.iso88595 setlocale(LC_ALL, 'ru_RU.cp1251'); $str = '<p>Тут новая статья вышла. Вот картинка к ней</p><img src="/vdf.png"> и вот <img src="/vdf.png"><div>Обязательно нужно почитать</div> '; $img_stripped = preg_replace('/<img[^>]*>/u', ' __IMG__', $str, 1); $img_stripped = preg_replace('/<[^>]+>/u', '', $img_stripped); var_dump(str_word_count($img_stripped, 2,'_'), $img_stripped);
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { [77]=> string(7) "__IMG__" } string(146) "Тут новая статья вышла. Вот картинка к ней __IMG__ и вот Обязательно нужно почитать "

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:
56.4 ms | 401 KiB | 8 Q