From: mazzarelli at gmail dot com
Operating system: Ubuntu 8.04
PHP version: 5.2.6
PHP Bug Type: Scripting Engine problem
Bug description: interactive mode hangs on simple input
Description:
------------
when running a bit of code from the command line, it works. Running the
same code interactively causes it to hang.
Reproduce code:
---------------
<?php
// example1.php
if (false) {
try {} catch (Exception $e) {}
}
?>
<?php
// example2.php
function stop_the_madness () {
static $i;
if (++$i > 1) exit("WTF?!\n");
}
stop_the_madness();
if (false) {
try {} catch (Exception $e) {}
}
exit("A-OK\n");
?>
Expected result:
----------------
In the first snippet, nothing should happen. But when that is in a file,
and require_once'ed from the interactive shell, it hangs.
In the second example, when ran from CLI, it says A-OK. But when ran
interactively, it says "WTF?!"
--
Edit bug report at http://bugs.php.net/?id=45749&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=45749&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=45749&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=45749&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45749&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=45749&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45749&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45749&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45749&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45749&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45749&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=45749&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=45749&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45749&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45749&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45749&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45749&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45749&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45749&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45749&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45749&r=mysqlcfg