教程集 www.jiaochengji.com
教程集 >  脚本编程  >  php  >  正文 PHP不支持的修饰符

PHP不支持的修饰符

发布时间:2020-08-23   编辑:jiaochengji.com
教程集为您提供PHP不支持的修饰符等资源,欢迎您收藏本站,我们将为您提供最新的PHP不支持的修饰符资源

PHP不支持的修饰符是/e修饰符。

8173cf38b9c8ad7813d07932d2658f8.png

具体修饰符参考以下地址:

正则表达式模式中可用 模式修饰符:

http://php.net/manual/zh/reference.pcre.pattern.modifiers.php

例子:

$_smarty="ok";
$_smarty_results = preg_replace('!(\{/?nocache\:[0-9a-f]{32}#\d \})!s','date("Y-m-d H:i:s")',$_smarty);

更改为preg_replace_callback后:

$_smarty_results = preg_replace_callback('!(\{/?nocache\:[0-9a-f]{32}#\d \})!s',function($match){return date("Y-m-d H:i:s");},$_smarty_results);

更多PHP相关知识,请访问教程集!

以上就是PHP不支持的修饰符的详细内容,更多请关注教程集其它相关文章!

  • 本文原创发布教程集,转载请注明出处,感谢您的尊重!
  • 您可能感兴趣的文章:
    PHP不支持的修饰符
    php构造方法如何理解
    C#访问权限修饰符浅析
    c# 类与成员的修饰详解
    有关php的oop中的访问修饰符
    封装机制封装的概念
    Python中使用装饰器的三个技巧
    php静态变量的作用是什么?
    php5支持哪些数据类型
    .net 泛型 局部类型、属性访问器保护级别、命名空间别名限定符

    [关闭]
    ~ ~