PHP Classes

File: htdocs/xoops_lib/vendor/smarty/smarty/libs/plugins/modifier.explode.php

Recommend this page to a friend!
  Packages of Michael Beck   Xoops 2.5   htdocs/xoops_lib/vendor/smarty/smarty/libs/plugins/modifier.explode.php   Download  
File: htdocs/xoops_lib/vendor/smarty/smarty/libs/plugins/modifier.explode.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: Xoops 2.5
Modular content management publication system
Author: By
Last change:
Date: 2 months ago
Size: 541 bytes
 

Contents

Class file image Download
<?php
/**
 * Smarty plugin
 *
 * @package Smarty
 * @subpackage PluginsModifier
 */

/**
 * Smarty explode modifier plugin
 * Type: modifier
 * Name: explode
 * Purpose: split a string by a string
 *
 * @param string $separator
 * @param string $string
 * @param int|null $limit
 *
 * @return array
 */
function smarty_modifier_explode($separator, $string, ?int $limit = null)
{
   
// provide $string default to prevent deprecation errors in PHP >=8.1
   
return explode($separator, $string ?? '', $limit ?? PHP_INT_MAX);
}