note 120706 added to function.preg-last-error

From: Date: Fri, 24 Feb 2017 23:03:25 +0000
Subject: note 120706 added to function.preg-last-error
Groups: php.notes 
Request: Send a blank email to php-notes+get-208835@lists.php.net to get a copy of this message
Take it into account before use this function. My php --version PHP 5.6.29 (cli) (built: Dec 8 2016 09:19:46) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies On Linux Fedora 23 4.8.13-100.fc23.x86_64 #1 SMP Fri Dec 9 14:51:40 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux <?php // @see http://stackoverflow.com/questions/4440626/how-can-i-validate-regex // returns true because there is no opening "(" for the closing ")" var_dump(preg_match('~InvalidRegular)Expression~', null) === false); // this SHOULD be something different from 0, but... var_dump(preg_last_error()); ?> ---- Server IP: 72.52.91.14 Probable Submitter: 177.40.15.188 ---- Manual Page -- http://php.net/manual/en/function.preg-last-error.php Edit -- https://master.php.net/note/edit/120706 Del: integrated -- https://master.php.net/note/delete/120706/integrated Del: useless -- https://master.php.net/note/delete/120706/useless Del: bad code -- https://master.php.net/note/delete/120706/bad+code Del: spam -- https://master.php.net/note/delete/120706/spam Del: non-english -- https://master.php.net/note/delete/120706/non-english Del: in docs -- https://master.php.net/note/delete/120706/in+docs Del: other reasons-- https://master.php.net/note/delete/120706 Reject -- https://master.php.net/note/reject/120706 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#208835) next »