[PHP-BUG] Bug #64617 [NEW]: --with-pcre-regex doesn't scan subdirectories

2013-04-09 Thread php at paulisageek dot com
From: php at paulisageek dot com
Operating system: unix
PHP version:  5.4.13
Package:  PCRE related
Bug Type: Bug
Bug description:--with-pcre-regex doesn't scan subdirectories

Description:

on my machine (CentOS) the libpcre.a is in /usr/lib64/ and the pcre.h is in

/usr/include

If I try --with-pcre-regex=/usr then it can't find the library.


Test script:
---
./compile --with-pcre-regex=/usr

Expected result:

It compiles.

Actual result:
--
checking for PCRE library location... configure: error: Could not find
libpcre.
(a|so) in /usr


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



[PHP-BUG] Bug #64572 [NEW]: Tests leave junk around

2013-04-02 Thread php at paulisageek dot com
From: php at paulisageek dot com
Operating system: all
PHP version:  5.5.0beta1
Package:  Testing related
Bug Type: Bug
Bug description:Tests leave junk around

Description:

Tests should clean up after themselves. Most of them do, but many don't.

I'll be attaching many diffs to this task cleaning them up as I import them
to 
HHVM.


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



[PHP-BUG] Req #64176 [NEW]: functions calls should accept trailing ,

2013-02-08 Thread php at paulisageek dot com
From: php at paulisageek dot com
Operating system: All
PHP version:  5.4Git-2013-02-08 (Git)
Package:  Unknown/Other Function
Bug Type: Feature/Change Request
Bug description:functions calls should accept trailing ,

Description:

In our code we require everyone to put a trailing , in array declarations
so that 
blame stays clean. Like when:

$foo = array(
  1,
)

becomes

$foo = array(
  1,
  2,
)

Then only 1 line has changed. But for function calls, when

$foo = foo(
  1
)

becomes

$foo = foo(
  1,
  2
)

now 2 lines blame to you.

Allowing the same syntax for function calls as array creation would be
great.

Test script:
---
?php
function id($x) { return $x; }

id(1,);

Expected result:

It runs.

Actual result:
--
Fatal error: syntax error, unexpected ')'

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



[PHP-BUG] Bug #51998 [NEW]: call_user_func_array can't use private methods on the $this pointer

2010-06-05 Thread php at paulisageek dot com
From: 
Operating system: All
PHP version:  5.2.13
Package:  *General Issues
Bug Type: Bug
Bug description:call_user_func_array can't use private methods on the $this 
pointer

Description:

I'd like to make a helper library that can use call_user_func outside of
the 

object context, but still use private methods (obviously only when called
from 

inside the object).



Example attached:

Test script:
---
?php



class A { 

  private function test1() {

print 'side effect 1';

return false;

  }

  private function test2() {

print 'side effect 2';

return 'yay';

  }

  private function test3() {

print 'side effect 3';

return 'nope';

  }

  public function first() {

return nonempty_lazy(

  array(array($this, 'test1')),

  array(array($this, 'test2')),

  array(array($this, 'test3')));

  }

}



function nonempty_lazy() {

  $args = func_get_args();

  foreach ($args as $arg) {

$cb = array_shift($arg);

$val = call_user_func_array($cb, $arg);

if (!empty($val))

  return $val;

  }

}



$a = new A;

print $a-first();



Expected result:

side effect 1side effect 2yay

Actual result:
--
Warning: call_user_func_array() expects parameter 1 to be a valid callback,
cannot 

access private method A::test1() in /Users/ptarjan/tmp/cufa.php on line 28



Warning: call_user_func_array() expects parameter 1 to be a valid callback,
cannot 

access private method A::test2() in /Users/ptarjan/tmp/cufa.php on line 28



Warning: call_user_func_array() expects parameter 1 to be a valid callback,
cannot 

access private method A::test3() in /Users/ptarjan/tmp/cufa.php on line 28



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



Bug #51998 [Bgs]: call_user_func_array can't use private methods on the $this pointer

2010-06-05 Thread php at paulisageek dot com
Edit report at http://bugs.php.net/bug.php?id=51998edit=1

 ID:   51998
 User updated by:  php at paulisageek dot com
 Reported by:  php at paulisageek dot com
 Summary:  call_user_func_array can't use private methods on the
   $this pointer
 Status:   Bogus
 Type: Bug
 Package:  *General Issues
 Operating System: All
 PHP Version:  5.2.13

 New Comment:

But the originating request came from inside the object. With first
class 

functions, you could just pass those around once you were inside the
object (think 

python or javascipt). We should emulate the same in PHP.


Previous Comments:

[2010-06-05 10:32:40] degeb...@php.net

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Of course you cannot call private instance methods outside of the
object. That's the entire point of private methods.


[2010-06-05 09:05:27] php at paulisageek dot com

Description:

I'd like to make a helper library that can use call_user_func outside of
the 

object context, but still use private methods (obviously only when
called from 

inside the object).



Example attached:

Test script:
---
?php



class A { 

  private function test1() {

print 'side effect 1';

return false;

  }

  private function test2() {

print 'side effect 2';

return 'yay';

  }

  private function test3() {

print 'side effect 3';

return 'nope';

  }

  public function first() {

return nonempty_lazy(

  array(array($this, 'test1')),

  array(array($this, 'test2')),

  array(array($this, 'test3')));

  }

}



function nonempty_lazy() {

  $args = func_get_args();

  foreach ($args as $arg) {

$cb = array_shift($arg);

$val = call_user_func_array($cb, $arg);

if (!empty($val))

  return $val;

  }

}



$a = new A;

print $a-first();



Expected result:

side effect 1side effect 2yay

Actual result:
--
Warning: call_user_func_array() expects parameter 1 to be a valid
callback, cannot 

access private method A::test1() in /Users/ptarjan/tmp/cufa.php on line
28



Warning: call_user_func_array() expects parameter 1 to be a valid
callback, cannot 

access private method A::test2() in /Users/ptarjan/tmp/cufa.php on line
28



Warning: call_user_func_array() expects parameter 1 to be a valid
callback, cannot 

access private method A::test3() in /Users/ptarjan/tmp/cufa.php on line
28








-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51998edit=1