From: ivan1986 at list dot ru Operating system: Linux PHP version: 5.3.0 PHP Bug Type: Feature/Change Request Bug description: Pleace no generate Notice on ?:
Description: ------------ When using undefined variable in ?: php generate notice in php 5.2.x very often use this code $inp = isset($_POST['inp']) ? $_POST['inp'] : 'def_inp'; in php 5.3 want use a shorter code $inp = $_POST['inp'] ?: 'def_inp'; Reproduce code: --------------- <?php $inp = $_POST['inp'] ?: 'def_inp'; echo $inp; ?> Expected result: ---------------- def_inp Actual result: -------------- Notice: Undefined index: inp in /path/to/to/index.php on line 3 def_inp -- Edit bug report at http://bugs.php.net/?id=49016&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49016&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49016&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49016&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49016&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49016&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49016&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49016&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49016&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49016&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49016&r=support Expected behavior: http://bugs.php.net/fix.php?id=49016&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49016&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49016&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49016&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49016&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49016&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49016&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49016&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49016&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49016&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49016&r=mysqlcfg
