For a better readability of the gd functions I would like to rename them
so that they contain underscores to separate the words. The only
exception is image2wbmp which is renamed to image_to_wbmp. The order of
the parameters of all functions whould be unchanged.
Due to the unchanged parameters
Hi,
Something like:
function match($x) {
switch(true) {
case $x === 1:
return 'Tiny';
case is_numeric($x) && $x <= 10:
return 'Small';
case is_numeric($x) && $x <= 20:
return 'Medium';
case is_numeric($x) && $x <= 30:
I always assumed that this is the reason why we do this in the first place.
I think the main reason was that old versions of ie go into quirksmode
if the doctype is not in the first line of the output e.g.:
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http
Hi,
Is the first entry in the return value of
http://php.net/manual/en/datetimezone.gettransitions.php with the
timestamp PHP_INT_MIN / ZEND_LONG_MIN intended?
The difference with no arguments is over 100 times slower on 64 bit systems:
DateTimeZone::getTransitions()
Duration: 0.075577
Date
You can merge the result with default values like this:
[$foo, $bar, $foobar] = explode(':', 'foo:bar') + [23, 42, 1337];
var_dump($foo, $bar, $foobar);
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
So I propose to make the gc_disable function accept one zval reference as
parameter. And if gc_disable get that zval, gc_disable just drop the zval’s
GC_COLLECTABLE flag, which will hint the PHP gc not to trace that zval.
i dont know if this is a good idea or not. But for the "s" in solid,
Hi Andrey,
1. The wording here implies that these are the *only* attributes
allowed. In the interest of forward-compatibility, I'd allow arbitrary
attributes as well.
I just try to implement something like this, to allow arbitrary
attributes. Is this what you prefer?
http_cookie_set('foobar
Hello Andrey,
That's what I was afraid of, and what I suggested be changed.
If we had a similar, array-of-attributes API that did NOT ignore or
trigger warnings for unknown attributes, everybody using PHP would've
been able to use SameSite already.
I think it is necessary to trigger a notice
Hi Michał,
As an average developer, I see providing new functions with http_ prefix
more meaningful and their API more simple because of fewer parameters I
need to pass.
Although however, I see the naming convention you've used is rarely used.
Looking in the docs, there are few other HTTP sap
Hi,
I registered my wiki account "Blar" and need some karma for my first RFC
for new cookie functions. I already posted some infos about
"http_cookie_set and http_cookie_remove" on the mailinglist.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.n
On 18.7.2017 21:37, Nikita Popov wrote:
What is the minimum MySQL version we support? can I drop checks for MySQL
3.x and 4.x?
The "oldoldstable" Debian Wheezy from 2013 supports MySQL 5.5. The
unsupported Debian Lenny has MySQL 5.0 since 2009. In my opinion the
next release of PHP no longer
Hello Andrey,
$options are equal to the optional parameters of setcookie and setrawcookie.
$options may contain:
expires: int
path: string
domain: string
secure: bool
httponly: bool
1. The wording here implies that these are the *only* attributes
allowed. In the interest of forward-compatibi
Hi,
i want some feedback, about the following idea before i write a rfc.
Problem:
The functions setcookie and setrawcookie has many parameters. Most of
them are optional and extensions (e.g. same-site) make it even more messy.
The functions setcookie and setrawcookie has 8 parameters.
bool s
Hi Michael,
Allow else blocks to follow iteration blocks. The else block is executed
if no iteration occurs for any reason.
I also thought it would been a good idea, but most of the time i need a
wrapper in the output like this:
if($items) {
echo '';
foreach($items as $it
> PHP already exhibits the skipping behaviour (it only emits a warning
> for the wrong type used in `foreach`, skips the loop, and then
> continues with remaining code).
Yes, a warning is not an error. If someone dont care about warnings from
error prone code, set the error_reporting accordingly
Hello,
One thing though that I thought about: Chapter 4 of RFC 3062 explicitly
> states that this function should only be available with confidentially
> support like TLS. So perhaps we should check whether the data will be
> transfered via a secure connection and - if not - raise an error?
H
Hey Côme, hey Andreas.
> string|FALSE ldap_exop_whoami(resource $link) - The returned string is
> the DN of the currently bound user.
In my opinion the code is really ease to read with exceptions.
try {
$user = ldap_exop_whoami($link);
}
catch(Throwable $e) {
}
string|FALSE ldap_exop_pass
With any exception from PascalCase you cannot e.g. generate class names
from strings without a explicit mapping table:
documentElement->tagName;
$className = ucfirst($tagName) . 'Parser';
if (!class_exists($className)) {
throw new RuntimeException('Parser not found for '.$tagName
Hello,
please change the signature form
bool ldap_exop_whoami(resource $link, string &$result)
to
string ldap_whoami(resource $link);
i dont see the benefit to return a single value with a reference.
Without a reference the function can used as an argument:
doSomethingWithTheUserName(ldap_wh
19 matches
Mail list logo