3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = '$str = "<p>V 站的程序员都好牛 b</p>,<img src="/uploads/allimg/170427/10330HO4-0.jpg"> 巴拉巴拉 <img src="/uploads/allimg/170427/10330HO5-1.png"> <div>你们最帅了</div>"; '; function test($content) { $re = '/src=".+?"/m'; preg_match_all($re, $str, $srcs); var_dump($srcs); } test($str);
Output for 5.6.30, hhvm-3.21.3, 7.0.30 - 7.3.0alpha1
Notice: Undefined variable: str in /in/EsAkD on line 11 array(1) { [0]=> array(0) { } }
Output for hhvm-3.22.0
Notice: Undefined variable: str in /in/EsAkD on line -1 array(1) { [0]=> array(0) { } }
Output for hhvm-3.18.5
Notice: Undefined variable: str in /in/EsAkD on line 11 Warning: preg_match_all() expects parameter 2 to be string, null given in /in/EsAkD on line 11 NULL