$pattern
, string $string
[, int $limit
= -1
] )
Splits a string
into array by regular expression.
Anonymous user / 18.191.240.171 Log In Register |
?
Wallet:
3.00
Daily Credits:
1.20 / 1.20
|
This is your credit balance. Even if you are an anonymous user, you are given some credits to spend. Every IP address has its own account and it is provided with free credits that can be used to pay for Online Domain Tools services. Moreover, credit balance is reset every day. This is why we call them Daily Credits. Registered users have higher Daily Credits amounts and can even increase them by purchasing subscriptions.
Besides Daily Credits, all accounts, including IP address accounts of anonymous users, have their credit Wallet. Wallet credits are not reset on a daily basis, but they are only spent when a user has not enough Daily Credits. Registered users can buy credits to their wallets. All IP address accounts are created with an initial Wallet balance of 3.00. Once IP address account spends credits from its Wallet, it can not be charged again. This should allow new users to try most of Online Domain Tools services without registration.
$pattern
, string $string
[, int $limit
= -1
] )
Splits a string
into array by regular expression.
Case sensitive regular expression.
If you want to split on any of the characters which are considered special by regular expressions, you'll need to escape them first. If you think split() (or any other regex function, for that matter) is doing something weird, please read the file regex.7, included in the regex/ subdirectory of the PHP distribution. It's in manpage format, so you'll want to do something along the lines of man /usr/local/src/regex/regex.7 in order to read it.
The input string.
If limit
is set, the returned array will
contain a maximum of limit
elements with the
last element containing the whole rest of
string
.
Returns an array of strings, each of which is a substring of
string
formed by splitting it on boundaries formed
by the case-sensitive regular expression pattern
.
Example #1 split() example
To split off the first four fields from a line from /etc/passwd:
<?php
list($user, $pass, $uid, $gid, $extra) =
split(":", $passwd_line, 5);
?>
Note:
As of PHP 5.3.0, the regex extension is deprecated in favor of the PCRE extension. Calling this function will issue an
E_DEPRECATED
notice. See the list of differences for help on converting to PCRE.
split() is deprecated as of PHP 5.3.0. preg_split() is the suggested alternative to this function. If you don't require the power of regular expressions, it is faster to use explode(), which doesn't incur the overhead of the regular expression engine.
For users looking for a way to emulate Perl's @chars = split('', $str) behaviour, please see the examples for preg_split() or str_split().