bobthecow/psysh

return value not set on warning

Closed this issue · 0 comments

php

<?php

$return = preg_match('/(\d+/', '');
var_dump($return);

php output

» php regex.php
PHP Warning:  preg_match(): Compilation failed: missing closing parenthesis at offset 4 in /home/flip111/regex.php on line 3
bool(false)

psysh

>>> $return = preg_match('/(\d+/', '');
PHP Warning:  preg_match(): Compilation failed: missing closing parenthesis at offset 4 in /home/flip111/.configeval()'d code on line 1
>>> $return
PHP Notice:  Undefined variable: return in /home/flip111/.configeval()'d code on line 1