[PHP-BUG] Req #52432 [NEW]: {} with Return Value

2010-07-24 Thread halloanjedendenichkenne at gmail dot com
From: 
Operating system: Irrelevant
PHP version:  Irrelevant
Package:  Scripting Engine problem
Bug Type: Feature/Change Request
Bug description:{} with Return Value

Description:

It would be pretty cool if you were able to use { CodeHere; } as
Statement.

The Basic Idea behind this is like if the Code was a Function that had a
Return 

Statement. Its only a little inefficient because the Function might only be
used 

one Time, which means it would be useful to have such a Feature.



Examples are given in the TestScript

Test script:
---
?php



  //1.

  if({

$a = false;

$b = true;

return (time() % 2)  $b || $a;

  }) echo 'It equals to True';



  //2.

  mysql_connect(...) or {

$file = fopen('ErrorLog', 'a+');

...;

return die();

  };



  //3.

  $a = 12 + {

return 2 * 2;

  };



?

Expected result:

1. Depending on the Time echoing 'It equals to True';

2. When mysql_connect returns false that it evaluates the {}-Code

3. $a = 16;

Actual result:
--
Parse Error of course

-- 
Edit bug report at http://bugs.php.net/bug.php?id=52432edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=52432r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=52432r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=52432r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=52432r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52432r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=52432r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=52432r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=52432r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=52432r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=52432r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=52432r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=52432r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=52432r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=52432r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=52432r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=52432r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=52432r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=52432r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=52432r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=52432r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=52432r=mysqlcfg



[PHP-BUG] Req #52268 [NEW]: explode with an Array as Delimiter

2010-07-06 Thread halloanjedendenichkenne at gmail dot com
From: 
Operating system: Irrelevant
PHP version:  Irrelevant
Package:  Unknown/Other Function
Bug Type: Feature/Change Request
Bug description:explode with an Array as Delimiter

Description:

It would be useful if you were able to pass an Array as Delimiter to
explode.

The Test Script contains an Example.

Test script:
---
?php



  var_dump(explode(array(',', '.', '!', ' '), 'Hello, World! This is a
Test!'));

  /*



Should output something like:

  array(8) {

[0]=

string(5) Hello

[1]=

string(0) 

[2]=

string(5) World

[3]=

string(0) 

[4]=

string(4) This

[5]=

string(2) is

[6]=

string(1) a

[7]=

string(4) Test

  }



  */



?

Expected result:

Included in the Test Script

Actual result:
--
Warning: explode() expects parameter 1 to be string, array given in php
shell code 

on line 1

NULL

-- 
Edit bug report at http://bugs.php.net/bug.php?id=52268edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=52268r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=52268r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=52268r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=52268r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52268r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=52268r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=52268r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=52268r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=52268r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=52268r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=52268r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=52268r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=52268r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=52268r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=52268r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=52268r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=52268r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=52268r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=52268r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=52268r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=52268r=mysqlcfg



[PHP-BUG] Req #52236 [NEW]: Function Call Request

2010-07-02 Thread halloanjedendenichkenne at gmail dot com
From: 
Operating system: Mac OS X 10.6.4
PHP version:  5.3.2
Package:  Scripting Engine problem
Bug Type: Feature/Change Request
Bug description:Function Call Request

Description:

It would be useful if you could leave out optional Parameters when calling


Functions, but specify others that come after that certain Parameter. I
suppose 

the Script will explain it a little better.

Test script:
---
?php



  abc(..., , 123);

  abc(..., 2, , chr(10));



  //Like in list, where you can leave out certain Elements

  list($a, $b, , $d) = explode(,, a,b,c,d);



  function abc($d, $e = false, $f = 123, $g = PHP_EOF) {

return something;

  }



?

Expected result:

.

Actual result:
--
.

-- 
Edit bug report at http://bugs.php.net/bug.php?id=52236edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=52236r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=52236r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=52236r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=52236r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52236r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=52236r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=52236r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=52236r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=52236r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=52236r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=52236r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=52236r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=52236r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=52236r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=52236r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=52236r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=52236r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=52236r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=52236r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=52236r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=52236r=mysqlcfg