mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

Provides the last PCRE error as a human-readable message, similar to functionality existing in other extensions, such as json_last_error_msg(). Closes GH-5185.
15 lines
313 B
PHP
15 lines
313 B
PHP
--TEST--
|
|
Test preg_split() function : error conditions - Recursion limit exhausted
|
|
--INI--
|
|
pcre.recursion_limit=1
|
|
--FILE--
|
|
<?php
|
|
|
|
var_dump(preg_last_error_msg() === 'No error');
|
|
preg_split('/(\d*)/', 'ab2c3u');
|
|
var_dump(preg_last_error_msg() === 'Recursion limit exhausted');
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(true)
|