Raphael Geissert wrote:
Rasmus Lerdorf wrote:
But why do you want them to change? Short tags are convenient and if
the app doesn't have to worry about ?xml or ?xsl type stuff, it can
run happily with short tags enabled.
Because it is just not about the application but the whole
On 13/07/12 12:28, Ryan McCue wrote:
Somewhat off-topic, but is there a reason why not? It seems to me that
introducing a new API without using PHP's best method of error handling
(IMHO) is a little silly.
I don't really trust exception throwing near password-managing functions.
Consider the
On 15/07/12 22:07, Alex Aulbach wrote:
2012/7/14 Andrew Faulds ajf...@googlemail.com:
Well... if people have poorly configured servers spitting out debug
info in production mode, I don't think it is our problem. It is
theirs.
Do you want to make it secure or do you want to discuss?
Seems
On 16/07/12 08:04, Galen Wright-Watson wrote:
What about an approach like PDO, where the password functions would
generate errors by default, but could be configured to throw exceptions?
The ugliest aspects of this idea are the requirement for another function
(password_set_option?) and hidden
On 16/07/12 16:21, Anthony Ferrara wrote:
If this is something that's desired, I can update the password
implementation to include this change (since it depends on a function like
this internally)...
Anthony
Looks good.
--
PHP Internals - PHP Runtime Development Mailing List
To
On 16/07/12 17:32, Alex Aulbach wrote:
I like it. I've looked in some code and found about 8
password-generation-functions. 4 of them have more or less the same
idea behind.
The rest generates more complicated password. E.g. minimum one
digit, First letter must be alphabetic. This is easy to
On 17/07/12 13:34, Alex Aulbach wrote:
That's more or less what I have thought.
If it's a string surrounded by square brackets, it's a character class,
else
treat as a literal list of characters.
] and - can be provided with the old trick of provide ] as first
character,
make - the first or
On 21/07/12 11:32, Pierre Joye wrote:
hi,
No, I mean version with 1.0 and not 1.0.0 are not. They are just not
correct and confusing, as you noticed.
Then Linux 2.6.39 shouldn't have been followed by Linux 3.0
For me, 1.0 and 1.0.0 are the same thing.
It's fine if x.y is not a valid
On 22/07/12 04:08, Kris Craig wrote:
On Sat, Jul 21, 2012 at 3:09 AM, Andrew Faulds ajf...@googlemail.comwrote:
If you think 1.1 =/= 1.01 you're sure using some weird version numbers.
Only 1.0.1 would be smaller.
Has anyone seen these weird version ordering schemes in practise? On any
major
On 31/07/12 18:21, Anthony Ferrara wrote:
Jonathan,
On Tue, Jul 31, 2012 at 12:01 PM, Jonathan Bond-Caron
jbo...@openmv.comwrote:
Sure managing keys properly can be hard, simple cases:
$secret = MY_KEY;
$secret = file_get_contents('/security/key.pem');
Actually, that's not properly
On 31/07/12 22:20, Peter Lind wrote:
On 31 July 2012 22:02, Anthony Ferrara ircmax...@gmail.com wrote:
Peter,
On Tue, Jul 31, 2012 at 3:46 PM, Peter Lind peter.e.l...@gmail.com wrote:
On 31 July 2012 18:21, Anthony Ferrara ircmax...@gmail.com wrote:
*snip*
Also, be aware that BCrypt only
On 01/08/12 20:02, Kris Craig wrote:
On Wed, Aug 1, 2012 at 6:13 AM, hakre hanskren...@yahoo.de wrote:
I have some simple questions about PHP 5.x End Of Life (EOL) dates:
PHP 5.0 - Is there some official news-item or changelog entry on php.netthat
says at which date PHP 5.0 went End Of
On 03/08/12 01:22, Sara Golemon wrote:
In all seriousness, I'd love to hear how you'd do Sandboxing without
using the tsrm context hack I used in runkit. That approach had
nothing to do with being in PECL, it had to do with that being the
only mechanism available to swap globals in and out at
On 17/08/12 23:41, Sebastian Krebs wrote:
Hi,
Don't know, how complicated this is (and also someone (not me) must
implement it, because I can't :X), but to be in sync with the
operators the short ternary operator should be usable in conjunction
with the assignment like the other binary
On 20/08/12 02:01, Rasmus Lerdorf wrote:
I would still like to understand what this generator keyword would
actually do. I don't see how it would work. Would a function marked
generator somehow not be allowed to return normally or to finish and not
return anything? How could this be enforced?
On 20/08/12 15:12, Nikita Popov wrote:
You could not decorate it and rely instead on the presence of the yield
keyword, but parsers will thank knowing about it from the start rather
than realising at mid-parsing that the function is a completely
different beast.
No, parsers don't care about
El 23/08/12 18:06, Rasmus Lerdorf escribió:
htmlspecialchars(), htmlentities(), html_entity_decode() and
get_html_translation_table() all take an encoding parameter that used to
default to iso-8859-1. We changed the default in PHP 5.4 to UTF-8. This
is a much more sensible default and in the
On 25/08/12 00:50, Rasmus Lerdorf wrote:
In 8859-1 no chars are invalid so anything that doesn't get encoded will
get passed through as-is. For example the byte 0xE0 is a perfectly valid
8859-1 character (à), but if the page is actually UTF-8 then this
becomes the first byte of a 3-byte UTF-8
El 18/09/12 13:30, Pádraic Brady escribió:
Hi all,
I've written an RFC for PHP over at: https://wiki.php.net/rfc/escaper.
The RFC is a proposal to implement a standardised means of escaping
data which is being output into XML/HTML.
Cross-Site Scripting remains one of the most common
On 18/09/12 21:06, Pádraic Brady wrote:
Hi Ángel,
The methods all refer to literal strings, values or digits. We can't
reasonably escape data while allowing valid markup for the current
context since that's a contradiction by its very nature. If you needed
to let user values drive CSS names,
On 17/10/12 11:43, Pierre Joye wrote:
It is about hi jacking discussions with totally irrelevant topics,
repetitive, nonconstructive posts in rows, in all possible ways.
The issue is that the proposed solution (a forum) does not solve
irrelevant topics being mixed into a discussion about a
I see several problems with deprecating ext/mysql:
- The extension is not broken. The problem is the bad usage.
It can be used safely, and good developers have been doing
so for ages, by creating php wrappers.
In magic quotes, the work has been the opposite. The developers
had been detecting the
Am 14/11/12 03:26, schrieb Michael Kliewe:
Am 14.11.2012 00:23, schrieb Ángel González:
So the problem really moves onto the CMS providers, do they support
new php versions and drop customers in shared hosting, do they delay
supporting the new php versions, or do they reimplement mysql_
On 16/11/12 17:03, Rasmus Lerdorf wrote:
So, I am curious, why are you waiting on us for this? Is it because
ext/mysql does everything you need and you simply have no need for any
of the new and obviously better features in mysqli? I would have thought
you would have switched to mysqli years
On 17/11/12 17:24, Rasmus Lerdorf wrote:
Right, that is what I meant by focusing more on the carrot than the
stick. Many people, yourself included, don't realize the things they
would gain switching to mysqli. We need to do a better job with that and
perhaps even consider if there are other
I see it as simple to show E_DEPRECATED but not when installed from PECL.
1) Add a
int mysql_extension_triggers_deprecated_warning = 1;
And use it as a conditional for triggering the warning.
2) Copy the extension code to PECL
3) Add these changes in PECL
- If the mysql functions are not
On 26/11/12 22:21, Sara Golemon wrote:
https://wiki.php.net/rfc/request-tempnam
Just a bit of hand-holding for those who don't remember to clean up
their messes.
I like it.
Also note that it's not always that people “don't
remember to clean up their messes” since there are
several tricky
David Muir wrote:
On 29/11/12 05:09, Ángel González wrote:
I see it as simple to show E_DEPRECATED but not when installed from
PECL.
1) Add a
int mysql_extension_triggers_deprecated_warning = 1;
And use it as a conditional for triggering the warning.
2) Copy the extension code to PECL
On 29/11/12 18:17, Anthony Ferrara wrote:
Just pointing this out: that's NOT what this RFC recommends, and is
NOT what's being voted on. This RFC is talking about ONLY adding
E_DEPRECATED to core. And the way it's proposed to be done, the
moves-to-PECL couldn't happen, since it's hard-coded
On 06/12/12 09:49, Pierre Joye wrote:
hi!
While looking at the bug #63073, I was wondering if we could simply do
not pass open handles to the newly created child process.
Looking at proc_open, where there is an explicit CreateProcess (we seem
to be using the library popen for the exec()...)
On 06/12/12 13:52, Pierre Joye wrote:
hi,
On Thu, Dec 6, 2012 at 12:40 PM, Ángel González keis...@gmail.com wrote:
On 06/12/12 09:49, Pierre Joye wrote:
hi!
While looking at the bug #63073, I was wondering if we could simply do
not pass open handles to the newly created child process
On 10/12/12 16:18, Nikita Nefedov wrote:
So there had been at least two or three messages (subjects) about
DateTime object and everytime there was this problem - people tend to
take DateTime object as mutable object and it really is.
As long as we know, it's not so good - date is immutable by
On 10/12/12 13:35, Christian Stoller wrote:
Hm... I know '$date-add(new DateInterval('P15D'));' is possible, but it has
the same problem.
I have to write:
$date = new DateTime()
$date-add(new DateInterval('P' . getDaysToAddMethod() . 'D'));
I think it is very hard to read. Or is it just
On 12/12/12 17:29, Amir wrote:
Hi
I searched in php.net and did not find any link that contain php none
thread safe source code for windows.
I have a php source that encoded with Zend Guard 5.5 and have to decode
with Zend Guard Loader.
note: Zend Guard Loader is NTS and didn't read TS code.
On 18/12/12 15:43, Victor Berchet wrote:
Dear all:
I would like to get your feedback on implementing some more data
structure in the PHP core.
(...)
I think this could be summarised as allow objects as keys for arrays.
Which would give the Map behavior.
Implementing Set from that is
On 14/01/13 05:10, Paulo Henrique Torrens wrote:
Hi,
I'm currently interested in two features I'd like to see in PHP; how do I
proceed to request/propose them? I'd be glad to help implementing them as
well, if necessary.
You should propose it here and then create a rfc about it in the php
On 29/01/13 15:21, Pierre Joye wrote:
On Tue, Jan 29, 2013 at 3:16 PM, Zeev Suraski z...@zend.com wrote:
On Windows with impersonation you're actually in a better situation than
you are in Linux. You could hold a small pool of processes and handle as
many different users as you'd like.
Works
On 03/02/13 16:27, Hans-Juergen Petrich wrote:
The only different in the second example is the fixed body length of
the eval()-created anoymous function.
I wondering why the memory in the second code-example will be freed at
some point while in the first example not.
I don't think it's a
Hans-Jürgen Petrich wrote:
Hi Terry and all
thank you very much for your response.
The only thing that confused me about what you say that the second
*doesn't* grow
Yes, about that i was [and am still :-)] also confused... why the 2nd
one won't grow *non-stop*
so I checked and it does --
On 05/02/13 21:16, Karoly Negyesi wrote:
new keywords is an interesting discussion to have -- it's actually the
first real thing to discuss as far as I can see. For example that is
something that version strings would tremendously help. You do not
need to maintain the whole lot of behaviors
On 15/02/13 10:25, Paul Dragoonis wrote:
On Fri, Feb 15, 2013 at 9:23 AM, Damien Tournoud d...@damz.org wrote:
On Fri, Feb 15, 2013 at 9:54 AM, Pierre Joye pierre@gmail.com wrote:
no, MediaWiki caching modules only support APC or Wincache so far.
As far as I understand, O+ doesn't have
On 11/03/13 12:19, Eric James Michael Ritz wrote:
Hello everyone,
I have a question about the internals of PHP, but this is not about
advancing the development of the language, so I apologize if this is
on the wrong list. I am choosing to post to this list because I
believe the people here
On 11/03/13 12:36, Christian Stoller wrote:
Hi Stas.
I'm afraid it is not a good idea. allow_url_fopen is meant to protect
file functions (fopen and friends) from being injected with
user-controlled data - i.e. if you control the filesystem and you do
fopen() under allow_url_fopen then it is
On 12/03/13 17:30, Derick Rethans wrote:
On Tue, 12 Mar 2013, Jonathan Sundquist wrote:
Why would the result not preserve the time?
Because tomorrow starts at midnight. You want +1 day.
cheers,
Derick
Alternatively, $d-add(new DateInterval('P1D'));
--
PHP Internals - PHP Runtime
On 15/03/13 15:19, Steve Clay wrote:
I'm sure this question has been discussed before, so if anyone can
point to me to links or briefly recap I'd appreciate it.
Why can't we make $someCallable() always work? E.g. http://3v4l.org/FLpAq
I understand the problem of $obj-foo() where -foo is a
On 18/03/13 14:04, Julien Pauli wrote:
Also, AFAIR, call_user_func() doesn't work with functions using
references in args. Julien.Pauli
AFAIK it does.
Do you have an example where it doesn't?
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:
On 31/03/13 23:18, ALeX wrote:
JSON and serialize() are (inherently) different serialization formats with
different use-cases [...]
Yes, and json requires that all strings (including the keys) has to be
valid utf-8, and I'm sure that's not always the case (serialize can
use binary data in
On 07/08/13 13:00, Leigh wrote:
On 7 August 2013 11:18, Yasuo Ohgakiyohg...@ohgaki.net wrote:
A user requested that crypt() should raise error without 2nd(slat)
parameter.
https://bugs.php.net/bug.php?id=55036
crypt() without salt generates extremely weak password hash.
The docs seem to
On 08/08/13 20:56, Michael Wallner wrote:
As I have no Zend karma, is anybody kind enough to merge the bison
blacklist patch?
https://github.com/php/php-src/pull/402
Maybe it should be bison_version_exclude=none so that the error
message is nicer?
--
PHP Internals - PHP Runtime Development
Laruence wrote:
Hi:
strn(case)cmp dosen't support a negative length as its third
paramter, while substr dose.
here is the rfc: https://wiki.php.net/rfc/strncmpnegativelen
any question? plz worte me back.
thanks
What do you exactly mean by in the reverse order in
if the abs of
Flavius Aspra wrote:
Hi
I think I've found a bug in the engine, and I think it occures only
with the latest gcc (gcc version 4.6.1 20110819 (prerelease)), since
it used to work with earlier versions.
For example line 867
http://lxr.php.net/opengrok/xref/PHP_5_3/Zend/zend_execute_API.c#867
Richard Quadling wrote:
Hi.
Sometimes I remove Release prior to nmake to make sure everything builds clean.
2 directories fail to get build
Release\win32
Release\devel
The attached patch fixes that.
- @for %D in ($(BUILD_DIRS_SUB)) do @if not exist %D @mkdir %D NUL
+ @for %D in
Reindl Harald wrote:
below a correct open_basedir restriction
but why can fopen() create this file outside the
basedir and after that the restriction is active?
this means in other words: fopen() can empty files outside the basedir
if their permissions are open enough
Sep 27 10:53:26
Reindl Harald schrieb:
[root@arrakis:~]$ stat /tmp/rhcsvz8QeBL
File: „/tmp/rhcsvz8QeBL“
Are you sure it is the fopen() what is making it?
I think that some other function/extension may be creating the temporary file
/tmp/rhcsvz8QeBL for you to open, which then fails due to the open_basedir.
Ferenc Kovacs wrote:
well if there would be used Reply-To-Headers
tell me ONE reason to get every answer twice
I don't get two emails in gmail, I don't know that the list is smart
enough to not send emails those who are to or cc'ed, or maybe it's a
gmail feature.
That's a gmail (mis)feature.
Ferenc Kovacs wrote:
A benefit of being addressed in the email that hasn't been mentioned yet,
johannes mentioned it:
http://www.mail-archive.com/internals@lists.php.net/msg53737.html
Yes, I noticed it /after/ sending. :(
Our emails were alike. We mentioned the same usage pattern and both
On 29/09/11 14:14, Olivier Favre wrote:
Hi everyone,
I've been developing a PHP extension for internal needs.
We're using C++, by using PHP_REQUIRE_CXX() in config.m4.
I'm using debian sid 64bits, with the package php5-dev-5.3.8-2
(against which the patch below has been created).
(...)
My
On 29/09/11 17:42, Olivier Favre wrote:
I checked with a tiny test program, you're right about GCC complaining.
The right fix is to make the field const (I don't know about const keyword).
G++ won't give warnings, no error would be triggered by a broken fix.
By the way, const char* and char
Gustavo Lopes wrote:
const char * and char const * are the same (just like const int and
int const are the same); what's not the same is char *const.
Andrey Hristov wrote:
it's easy, whatever const is closer to is immutable
const char * is a pointer to a const char, because the const is
Ivan Enderlin wrote:
Hi all,
Some days ago, I have filled a bug about an issue with
stream_socket_recvfrom() only (apparently) on Windows7. You will see all
the details here: . This bug is important for my Windows users and I hope
seeing this bug fixed in PHP5.4. I am willing to write a
Am 28.10.11 17:29, Reindl Harald schrieb:
Am 28.10.2011 10:59, schrieb Michael Wallner:
gzencode in PHP-5.4 behaves differently than in previous versions.
I outlined the reasoning in the comment from 2009-03-03 22:11 UTC
at http://bugs.php.net/47178
as long gzdecode() can decode stored data
On 10/12/11 16:30, Clint M Priest wrote:
I've got 122 tests that are failing on a full run, if I write the failed
tests to a file and re-run just those tests, all of them pass. Any ideas
whats up?
A previous test breaking them?
--
PHP Internals - PHP Runtime Development Mailing List
To
On 14/12/11 22:53, Will Fitch wrote:
I believe he's referring to sys/time.h, but this introduces portability
issues. If it were just unix, that would be one thing. But maintaining this
and a Windows alternative, and I have no idea what that is, is not worth it
IMO.
time.h is present in
On 15/12/11 00:10, Oleg Oshmyan wrote:
PHP internally already has php_localtime_r and php_gmtime_r in
main/php_reentrancy.h, implemented in main/reentrancy.c, and they are
already used in various places in the code, including the guessing
algorithm that is being removed in PHP 5.4. So at the
On 19/12/11 21:23, Paul Dragoonis wrote:
Barbu,
This is how constants work in all viable languages such as C/++.
I disagree. In C you can have:
const data foo[] = { { Data1, 2 }, { Data2, 78 } };
It's not unusual in php to have a complex structure that won't change
in a variable. It should be
Your examples only show class methods with visibility qualifyiers, and
looking at the changes to zend_language_parser.y
it seems as if would only be available for methods. Wouldn't return
hints be available for plain functions?
In functional programming, it is common to return nullable types:
On 23/12/11 00:08, Will Fitch wrote:
Sent from my iPad
On Dec 22, 2011, at 5:51 PM, Ángel González keis...@gmail.com wrote:
Your examples only show class methods with visibility qualifyiers, and
looking at the changes to zend_language_parser.y
it seems as if would only be available
On 23/12/11 01:00, Will Fitch wrote:
On Dec 22, 2011, at 6:28 PM, Stas Malyshev smalys...@sugarcrm.com wrote:
In PHP, returning object if everything is OK and false if not is a very
common pattern.
Also, you understand that always allowing null means that this construct:
$foo =
(I'm unsure about the T_DOUBLE_ARROW, although for parsing, I feel there
should be some token there
before the class name, though I'm unconvinced on which)
What about this?
function foo (Class1 $a, Class2 $b) return Class3 {
/* Do something */
return new Class3($a, $b);
}
--
PHP
On 24/12/11 15:55, Lester Caine wrote:
I'm with Derek ... having commits that are just WS corrections can be
irritating when tracking changes ... but it would most definitely
better to get them fixed before moving to git which would lump mass
commits like that together in a change set and make
On 24/12/11 18:22, Anthony Ferrara wrote:
It's really simple, and would likely be optimized away by the compiler
anyway, but I figured it was worth cleaning up...
Yep, it's straightforward.
I'm not sure if it makes a difference or not.
IS_DOUBLE is between IS_LONG and IS_BOOL so the compiler
On 04/01/12 17:18, Keloran wrote:
which can if your doing lots of checking alot of extra code for no reason,
or if you want to use variables, lots of louse variables just for something
that could be pulled from the request
I don't think it would mean 'a lot of code', but if it bothers you in
On 18/01/12 20:35, Pierre Joye wrote:
Actually, no. There are any number of free mechanisms to build 64 bit code.
None of them are part of what we support tho' (we do not support mingw
for example, and won't support it).
Actually, why couldn't mingw be supported one day?
(supposing someone
On 26/01/12 00:22, Robert Eisele wrote:
My specific problem could be tackled in two ways:
- Scan . every time cli is called for a php.ini file or
- Try to make argv interpretation more intelligent and parse/merge shebang
parameters.
There are |.user.ini files, but only for CGI/FastCGI
On 26/01/12 11:35, Kiall Mac Innes wrote:
Surely you can detect which operating system you're running on, and have
PHP act accordingly?
(Note: on my phone, haven't read the link!)
Kiall
It's probably not reliable. Note that a simple and completely reliable
solution
would be instead of having
About Kiyoto's patch:
Some servers would read as new headers if the newlines were just \n or \r
(which would be illegal per HTTP spec). I think the characters to ban
are: \n \r \0
Just replace your call to zend_trim_after_carriage_return with:
+ strtok(new_value, \r\n); // Truncate on \n, \r
On 28/01/12 03:05, Rasmus Lerdorf wrote:
There is a 100k limit, but the error message you are getting indicates
that you aren't actually hitting that limitation. The server config has
a 2M limit, so you should be fitting well within that. I'm not sure how
your 200k patch is hittig that file is
Stefan Esser wrote:
And there are many many good reasons, why Suhosin must be external to PHP.
The most obvious one is that the code is clearly separated, so that not
someone of the hundred PHP commiters accidently breaks a safe guard.
That's not a justification to keep it as a patch.
Safe
On 03/02/12 15:01, Gustavo Lopes wrote:
I've committed a different version that also forbids \0 (since, as
Stefan says, a NUL byte can result in the truncation of the rest of
the header) and that accepts a CRLF:
On 03/02/12 23:00, Stas Malyshev wrote:
Hi!
As it's a security patch and of small scope, I would consider it for
5.4. Stas, David?
Do we have unit tests for this code? The fix involves changes in header
sending so it may have impact on lots of code. Changes like this can be
dangerous.
On 03/02/12 21:44, Ángel González wrote:
On 03/02/12 15:01, Gustavo Lopes wrote:
I've committed a different version that also forbids \0 (since, as
Stefan says, a NUL byte can result in the truncation of the rest of
the header) and that accepts a CRLF:
http://svn.php.net/viewvc/php/php-src
Gustavo Lopes wrote:
On Sat, 04 Feb 2012 00:06:45 +0100, Ángel González wrote:
I've gone ahead and written code for that feature. Comments welcome.
The comparison has a problem: if char is signed (the most common
scenario), you'll be making a signed comparison, so any character over
0x7f
On 02/07/12 14:18, Reindl Harald wrote:
Am 07.02.2012 13:39, schrieb Matti Bickel:
According to
http://hilfe-center.1und1.de/hosting/scripte_datenbanken/php/6.html the
advertised PHP6 is probably PHP5.4RC6...
what has this do do with PHP6?
That page seem to list all php configurations they
On 13/02/12 21:48, Adi Mutu wrote:
Hello,
Perhaps this is a stupid question, but i haven't coded in C in years and i'm
not very familiar with development/debugging tools. If I have a php script
say 20 lines,
How can I see a path of the corresponding C code which is executed? What If i
On 13/02/12 22:11, Jakov Sosic wrote:
On 02/13/2012 06:10 PM, Reindl Harald wrote:
yes, but the more important is the status code so that search
engines do not index you broken page, apache SHOULD NOT provide
his own error-page because you can also send 500 status code
within your script
On 21/02/12 15:54, Bostjan Skufca wrote:
Hi all,
we've bumped into a possible bug where file_get_contents() returns empty
string if we try to get contents from HTTPS source. This error only occurs
if PHP is compiled with --with-curlwrappers.
Funny thing is this only happens on slackware
On 21/02/12 17:06, Ralf Lang wrote:
Am 21.02.2012 16:55, schrieb Martin Amps:
Could you not implement such functionality within your class as follows:
class Family {
public function getMother() {
if ($this-hasMother())
return $someObj;
else
On 21/02/12 19:03, Ralf Lang wrote:
I see no reason why it would be not desirable to have PHP raise the
exception rather than putting more or less repeating code snippets all
around the place. That is why I am asking.
You must be returning false/null somewhere. It's the same effort to
On 22/02/12 09:37, Sebastian Krebs wrote:
class MyEnum {
const FOO = 'foo';
const BAR = 'bar';
private $value;
public function __construct ($value) {
if (!in_array($value, array(self::FOO, self::BAR)) throw new
UnexpectedValueException;
$this-value = $value;
On 22/02/12 15:57, Michael Morris wrote:
Before writing up a full RFC I want to put out a feeler on something.
Currently we have several input parameter objects, chief among them
$_GET, $_POST, $_REQUEST, $_SERVER (for the client HTTP headers). All
of them are arrays and legacy code sometimes
Am 22.02.2012 22:30, schrieb Sebastian Krebs:
Am 22.02.2012 22:22, schrieb Ángel González:
I want to call it doSomething(FOO) or doSomething(MyEnum::FOO),
not doSomething(new MyEnum(MyEnum::FOO));
// The class file
class MyEnum {
public static $FOO;
public static $BAR
On 22/02/12 23:13, Kris Craig wrote:
While I'm a huge fan of Github, why did you decide to host your RFC there
instead of on the PHP wiki? (...)
Samuel doesn't have a wiki accout.
I agree he should get one and continue the proposal there.
--
PHP Internals - PHP Runtime Development Mailing
On 23/02/12 00:09, Stas Malyshev wrote:
Hi!
Sidenote, according your examples above on how you want call
functions: Considered using normal constants?
How can I do type hinting with them?
You should not. PHP is not a strictly typed language, so if you want
strictly typed function you'll
I don't see your point, Sebastian.
And
| $studipNamedVariable = Databases::Mysql;
| // ... much code
| database_select($stupidNamedVariable, $sql);
is better? The problem here seems to be more the developer, that
avoids the use of constants, then less the missing enums.
You can obviously
On 23/02/12 22:59, Kris Craig wrote:
Could you elaborate on this? So long as that setting cannot be changed
midway through a script or its includes (i.e. the stack must be all
strict or all dynamic), I can't think of any reason why that would not
be feasible.
--Kris
I'm afraid that would
On 23/02/12 23:49, Kris Craig wrote:
Yeah I agree, that was one of the things I listed under
disadvantages lol.
I guess my question is: Does this constitute a prohibitive problem,
or is it something that we can stomach?
I mean, if you think about it, that's really what we're talking about
On 24/02/12 00:36, Kris Craig wrote:
Hmm that's a fascinating idea! So, and please correct me if I'm
wrong, you're saying that it might be a better approach to determine
strict vs. dynamic typing on a per file or function basis instead of
on a per stack basis? In other words, blah.php could
On 24/02/12 17:46, Dmitri Snytkine wrote:
In order to intoduce the enum into php, 'enum' will have to be a keyword like
'class', 'interface', etc.
Just a thought, but could there be a problem with using the new keyword
'enum' in php. I don't think it's currently a reserved word, so it
On 24/02/12 19:35, Kris Craig wrote:
Could you elaborate on that a little? I.e. as an interface for the
call. I'm not sure what you mean by that. If you could provide a
quick example, that would be awesome! =)
--Kris
Hi Kris,
You're right it wasn't clearly expresseded. Lets see if I can
On 26/02/12 15:57, Anthony Ferrara wrote:
I've gone back and re-read a bunch of the old posts on Type Hinting,
and have come to the conclusion that it won't be done any time soon.
Not because it doesn't have merit, but because there are at least a
few fundamental difficulties that are
1 - 100 of 197 matches
Mail list logo