Quick actions

cmd+k|ctrl+k

Navigation

Languages

test_preg_match

Snippet info

Language

Php

Visibility

public

Author

fenghestudio

Created

2019-09-19T04:10:05Z

Updated

2019-09-19T04:10:05Z

<?php

//模式分隔符后的"i"标记这是一个大小写不敏感的搜索
if (preg_match("/php/i", "PHP is the web scripting language of choice.")) {
    echo "A match was found.";

} else {
    echo "A match was not found.";

}
?>
INFO