joungkyun/ereg-extension-wrapper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

joungkyun/ereg-extension-wrapper

Composer 安装命令:

composer require joungkyun/ereg-extension-wrapper

包简介

pure PHP EREG extension wrapper

README 文档

README

GitHub license

The ereg-wrapper api support ereg extension api, and was designed to work best as with ereg extension. If you have PHP7 environment and must need removed ereg extension api, this is good choise.

This APIs have been implemented using PHP PCRE (Perl compatible regular expression, preg_*) internally.

License

BSD 2-clause

Requirements

  1. PHP 7.0.0 and after

SYNOPSIS

ereg : http://php.net/manual/en/function.ereg.php

int ereg ( string $pattern , string $string [, array &$regs ] )

eregi : http://php.net/manual/en/function.eregi.php

int eregi ( string $pattern , string $string [, array &$regs ] )

ereg_replace : http://php.net/manual/en/function.ereg-replace.php

string ereg_replace ( string $pattern , string $replacement , string $string )

eregi_replace : http://php.net/manual/en/function.eregi-replace.php

string eregi_replace ( string $pattern , string $replacement , string $string )

split : http://php.net/manual/en/function.split.php

array split ( string $pattern , string $string [, int $limit = -1 ] )

spliti : http://php.net/manual/en/function.spliti.php

array spliti ( string $pattern , string $string [, int $limit = -1 ] )

sql_regcase : http://php.net/manual/en/function.sql-regcase.php

string sql_regcase ( string $string )

Example

<?php
# even if loaded ereg extension, well done.
require_once 'ereg-wrapper.php';

if ( ! ereg ('a', 'aaa') )
    echo 'not ';
echo "matched\n";

if ( ! eregi ('A', 'aaa') )
    echo 'not ';
echo "matched\n";
?>

Composer

first, make composer.json as follow:

{
    "require": {
        "joungkyun/ereg-extension-wrapper": "1.0.*"
    }
}

and, install ereg-extension-wrapper

[user@host project]$ php composer.phpt install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing joungkyun/ereg-extension-wrapper (1.0.1): Downloading (100%)
Writing lock file
Generating autoload files
[user@host project]$

and, write code as follow:

<?php
require_once 'vendor/autoload.php';

echo 'eregi_replace is supported ';
if ( function_exists('eregi_replace') )
    echo 'YES';
else
    echo 'NO';

echo "\n";
?>

Credits

JoungKyun.Kim

统计信息

  • 总下载量: 2.78k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 3
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2016-08-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固