branches.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
();
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
, and
fix flaws to prepare for the next 10 years. And that's having two
implementations.
The original one will gradually be deprecated and eventually removed.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
update, code hinting for named parameters could be introduced in
IDEs in order not to end up slower than the current syntax.
It also solves other issues and doesn't suffer from the scope resolution
problems with() {} suffers from.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime
update, code hinting for named parameters could be introduced in
IDEs in order not to end up slower than the current syntax.
It also solves other issues and doesn't suffer from the scope resolution
problems with() {} suffers from.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime
sufficient on a pristine condition unused
server, but when your server is loaded, a spike in load may cause a number
of shutdown handlers to take more than 1 second, and stop middway running,
causing a lot of unpredictability and trouble for those who rely on this
feature.
Regards,
Stan
for
Unicode strings while being fast, and use Latin-1 when what I need is
Latin-1.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On 03/01/2010 11:35 PM, Stan Vassilev wrote:
Hi,
The gettype() documentation warns people that the returned string is
subject to change.
Why is there a function that's subject to change in the API?
Because life is complicated.
Because gettype(test) returns string in 5.x and unicode in 6.0
and a solution no longer is a BC or
performance issue. It's also insulting to the submitter, who took from his
time to file an actual problem and was basically dismissed as uninformed on
the issue.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http
() is when we do not test
for a certain type (as in, we test for any type), which is less optimal when
executed as 5-6 is_*() calls.
Regards,
Stan Vassilev
The gc code when combined with apc is still a bit shaky in 5.3. I
haven't figured out why yet. And my motivation for figuring it out is
pretty low as code that relies on gc is slow.
-Rasmus
Motivation for relying on GC in 5.3 is pretty low because 5.3 is still a bit
shaky...
--
PHP
as is behaviour is certainly better in the
long run - issues like OpenID should be taken into account.
Hi,
PHP6 *is* the long run.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
compatibility if changed.
I hope PHP6 will remove this processing as register_globals will be
completely removed at that point.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
. Such symbols could be simply
referred to with the intended syntax: ${'a.b.c.d'}.
By the way, extract now seems to just ignore those vars when given an array:
extract(array('foo.bar' = 'baz'));
echo ${'foo.bar'}; // notice, no such variable
echo $foo_bar; // notice, no such variable
Regards,
Stan
who use the underscore filter with register_globals have already lost
backwards compatibility.
For those who want to *emulate* register_globals with extract(), they can
easily emulate the underscore filter as well (it's 3 lines of code).
Regards,
Stan Vassilev
--
PHP Internals - PHP
.
They are just arbitrarily imposed because of an irrational fear that
suddenly everyone will be jumping on the new feature for his entire
codebase. Even most poor coders are smarter than this.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe
one in 5.3).
Regards,
Stan Vassilev
- Original Message -
From: Rack-Soft security
To: internals@lists.php.net
Sent: Friday, October 16, 2009 5:32 PM
Subject: [PHP-DEV] Autofunc patch (automatically loading functions like
autoload)
Hello,
I am submitting quite
{
...
private $flags;
function __construct()
{
$this-flags = self::FLAG_1 | self::FLAG_3;
}
}
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
(instance of Closure)... or alternatively: array(object
$instance of Closure, string __invoke__)
// global scope
null
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
somewhere. The only solutions today
for properly capsulating such code are ugly slow hacks (including
debug_backtrace).
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
them out of necessity
(or use handlers). I'd rather fix the API-s instead of pretend it doesn't
happen by masking the errors.
All of the above would be a job for 6.0 IMHO, 5.x has pulled enough changes
under our feet and it's really not fun anymore :P
Regards,
Stan Vassilev
--
PHP
which you want first:
A) Stable 5.3 with namespaces, closures, late static binding, phar, SPL
additions and more (essential brand new functionality, feature complete,
only needs bug fixes).
B) Strict type casts/hints (shortcut for existing is_*() / cast
functionality).
Regards,
Stan Vassilev
and putting it in a minor release in the course
of a week.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
as is_scalar(), but also allows null as a
passed value to be consistent with the other check types.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
overnight. Any volunteers :)?
Regards,
Stan Vassilev
: Leave short tags alone - never
talk about it again (http://wiki.php.net/summits/pdmnotesmay09).
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
(NAN)
var_dump($realNaN == $realNaN); // true, should be false, NaN should never
match NaN
Regards,
Stan Vassilev
on Windows today? Go with the RC of 5.3?
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
) Extending classes can override the property/method, unless it's a final
method, just like as if they override normal parent class property/method.
3) There's a single space for a class property and its trait properties, so
access works as if it was all class properties.
Feedback?
Regards,
Stan
,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
to keep it optimized for that.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Try this:
use PDO;
Regards,
Stan Vassilev
-
Hello,
I've been writing in the last days a web application on PHP 5.3 (beta1
although RC was released) cause of all the goodies it brings,
specially
to the function.
In PHP you can have constant/function/class of the same name and the only
way to tell them apart is context.
It needs to be either a magic constant or a language construct.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit
with tons
of manually written out explicit references.
One problem with your proposal / my second proposal is, it works for
classes, but doesn't address namespaced 1) functions 2) constants.
A new keyword would address this, but then, who wants a new keyword,
right...
Regards,
Stan Vassilev
is to preserve compatibility with
spl_object_hash, so it can replace it, instead of introducing a new similar
function.
I've had no time to look further into this, but Marcus seems to like the
basic idea, so feel welcome...
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime
throw. I leave up to you how appropriate that is.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Kuba,
For the moment some unexpected behaviour caused by use of undefined
constant may be hard to fix with low error reporting level.
So don't use a low error reporting level.
Moreover,
treating an undefined constant as a string does not make sense. I know
that PHP is intended to be a
1. Document the fact that if you want to strictly conform to the JSON
spec and be sure your json_encode output will work in various JSON
parsers, you have to pass it a PHP array or object.
+1
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe
'var foo = '.json_encode(hello world);
...to this:
echo 'var foo = '.substr(json_encode(array(hi world)), 1, -1);
A flag that defaults to false would be just as explicit and educational, and
more efficient, than forcing hacks on us like the above one.
Regards,
Stan Vassilev
--
PHP
existing workflows.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
some WTF-s in the old behaviour.
Full rethinking of this and consistently respecting the Array/Iterator
interfaces would be great and needed for 6.0, though.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Code Search shows 0 hits on PHP
code).
3) It's intuitive as it follows the conventions established by the other magic
constants, and serves a very similar purpose.
Regards,
Stan Vassilev
of this BC break, I guess we wouldn't be
having this discussion.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Zend_Acl == Zend_Acl_Resource_Interface, Zend_Acl_Role_Interface,
Zend_Acl_Role_Registry, Zend_Acl_Assert_Registry...
Regard, Stan Vassilev
Stan, ZF doesn't use namespaces yet. This is not namespaced code.
Namespaced code requires different convention
(http://framework.zend.com/wiki
assignment assign the class
name, but then we clash with constants which have the same name as the
class. So that's not doable either.
But it's definitely in-your-face issue while using namespaced code.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe
callbacks, factories, strategies, drivers, adapters, proxies and so
on which typically may and do pass class/function names around. I don't
know.
I'd rather endure the pain and write the string in full every single time
than cause extra confusion in my source code :)
Regards, Stan Vassilev
.
Regard, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, Nov 12, 2008 at 03:57, Stan Vassilev | FM [EMAIL PROTECTED]
wrote:
I don't see it would work with something like
import_request_variables() unless thats removed or extract(), which is
some of the reasons for this replacement feature afair.
There was never a need for the replacement
it, it can do it there only for that
import. I.e.
$_GET['foo.bar'] is just fine, and importing 'foo.bar' with the above
function could still produce $foo_bar only for that specific edge case.
It's just a premature replacement too early the stack.
Regards, Stan Vassilev.
--
PHP Internals - PHP
for this as use specifically only imports
symbol names, not actual code, into the environment. It doesn't have the
knowledge of whether something is a namespace, or a class, or a category, so
to know how to trigger autoload.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development
:
use \bar\baz; // parse error
So it has to be decided which way the system goes to avoid confusion and
bugs IMO.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
in the first place
- String literal id-s are unique integers and have no conflicts, so no need
to do conflict resolution.
That would help with objects as well.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
,
etc.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
,
but also for arrays, so this should have significant impact.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
patches if I arrive
at anything. Then we can test how it impacts real world code.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
,
constant, not just classes.
Naturally this is not for 5.3 as we all want 5.3 stable and out as soon as
possible. But it has the potential to simplify drastically some workflows,
especially in large complex frameworks, so if it picks up, maybe 5.4, or 6
or who knows.
Regards,
Stan Vassilev
not funny. The idea of OSS
forums like this list, isn't to generate easy entertainment for bored
programmers.
A valid point elsewhere is lost everytime a thread heads this way.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http
, which are more static in nature than
the application code utilising them.
As for the extension, I'll check it out, thanks.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
?php
use blah\blah;
$f = new blah;
namespace one {
use foo\bar as blah;
$a = new blah;
}
// what is this?
blah::hi();
?
Technically, you could argue that blah::hi() should resolve to
blah\blah::hi(), but it is very difficult to track and figure out what
blah means by eye. Thus, in the patch
, and most locally in a function/method),
and is supported by most modern languages that handle namespaces.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
.
However Greg's proposal is in fact a strict subset of scopes, which could be
extended in the future in a backcompat nature.
It also covers all use cases by the community, so I'm +1, if anyone is
counting that is. Sorry for the noise :)
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime
doesn't know what's there to import at runtime. So we can't
easily avoid the redundancy, unless we manually import the classes we want
to use, one by one.
So that's one more hassle which make redundant names a pain.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing
a short PHP script which can automatically fix the case of
internal classes and keywords like array() in most source code out there.
We can test such automated porting scripts on samples collected from PEAR,
Google Code and projects like Drupal, Joomla etc. to reduce side effects.
Regards, Stan
,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
array with the
array functions.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
. With the magical fallbacks, all this goes to hell.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
.
Namespaces won't change any of this, since I still can't autoload my
function library.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
and
autoload mysteries.
I suggest we all clear our minds a little and give a serious thought to all
this again. If you just say no fallbacks, some people will bitch 2-3 days,
then try it, and see that it was not all that bad after all.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime
,
Stan Vassilev
to people, who especially use
fallbacks to transparently implement missing PECL extensions or
functionality, or augment the internal functions of PHP with other, for ex.
user implemented ifsetor(), array_*() or str*() functions.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development
to the following
code:
use Foo\Bar as B;
F::loadFunc(nameof B\Baz); -- will send 'Foo\Bar\Baz' as the argument
echo B\Baz();
NOTE: As a side effect this means less direct writing of string function/class
names, and less complaints about \ being the escape characters.
Regards,
Stan Vassilev
change is: not to make difference between internal and user global
functions, just fall back to global ones, so that there's no additional
confusion among drop-in replacements, user resources, and internal
resources.
Send feedback. Thanks.
Stan Vassilev
--
PHP Internals - PHP Runtime
I've not seen plenty of Class::singleton() myself, getInstance is an
accepted standard in all languages, including the PHP code I wrote, and I've
had experience with.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net
of :: in the first place.
When you're cornered by your ill past decisions, you either break BC (which
we don't want to do), or add more WTF-s to the language as it evolves.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net
is the
ultimate PHP configuration ...
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
traversable objects to our
views, mixed with real arrays, is already common (I do it too).
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
a directory you need to prefix
your path with / (eg \) to refer to the root, but you don't need to do that
when you're in the root directory.
Regards,
Stan Vassilev
.
Is this negligible performance hit? Actually (re)scanning my full library
takes few seconds of heavy disk grinding. Make your own conclusions.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
of it as a plan B in case people cause a big fuss about it (which I
think they won't: think about escaping of windows file paths and escaping in
regex pattern, we're doing just fine there).
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http
destructor you just need to sort the collection by
priority and call the real destructor.
Now, this will work fine, but has this downside that all objects will be
held in the memory until script shutdown, so it's naturally not good for
long running processes.
Regards,
Stan Vassilev
--
PHP
Hi,
Naturally this line:
$this-addObject($this, $priority);
was meant to be:
$destructManager-addObject($this, $priority); ...
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
('*') or simply header_remove() /no param/ removes
all headers (including the one PHP sets by default), so we can start with a
clear state.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
the damn namespace operator to just about *anything* but ::.
I wish the people who have a clear opinion of the above voice their opinion.
For those who aren't quite sure what the issues in point 4 are, please just
stay low and follow the list until you do.
Regards,
Stan Vassilev
--
PHP Internals
not distinguishable in a lot of code,
so if that's to go, pick another syntax. : is fine, \ is fine, .. is
fine.
Regards, Stan Vassilev.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
but in another form.
Regards, Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I think we need string concatenation here and there ;)
Regards,
Stan Vassilev
- Original Message -
From: Arvids Godjuks
To: Stan Vassilev | FM
Cc: PHP Internals List
Sent: Monday, September 29, 2008 9:19 AM
Subject: Re: [PHP-DEV] solving the namespace conflict
forgetting constants:
define('MyNameSpace', 'Hi ');
class SomeClass { function world() { return 'world'; }}
MyNameSpace.SomeClass::world(); // Hi world
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
The second highest vote was :::, but there was strong objection to this
as well from some. The problem, I still believe, is that we are focused
on having the same:::stupid:::operator:::between:::everything.
The truth is that in source files, there is a clear boundary between
namespace
the use ::foo or ::foo() when in a
namespace, and leave namespaced functions in.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On Sun, Sep 14, 2008 at 5:33 PM, Rustam Abdullaev [EMAIL PROTECTED]
wrote:
Hi,
Is anyone working on a suspendable request support in PHP when used as a
module in Apache?
Suspendable requests are great for supporting Server Push technology, but
are currently only supported in Jetty and Tomcat.
{} will possibly be confusing. But, it'll work fine enough.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
) is perfectly natural in that setup.
In fact, I'd argue that we need a way to break out to global namespace
*after* a namespace too.
Something that would be naturally solved by {} but since this is
discarded... (but you see how it's not purely phylosophical issues either).
Regards,
Stan
with namespaces in them.
Regards,
Stan Vassilev
Hi,
This is a simple patch that allows files like this:
main.php:
html
head
titletemplate example/title
/head
/html
body
?php
namespace my::template;
// stuff
?
/body
to work without parse error.
Greg
P.S. this is the last outstanding
curly bracket ones don't need to be converted), example:
namespace X {
use Y as Z {
...
}
}
namespace Y {
use X as Z {
...
}
}
Waiting for your feedback...
Regards,
Stan Vassilev
Stan Vassilev | FM wrote:
Hi,
Multiple namespaces per file were introduced to allow certain
workflows in PEAR and frameworks like Symphony which can combine
multiple classes and namespaces in a single package.
They work like this:
namespace X;
...
namespace Y;
...
The problem is, no one
to put autoload last is equally bad as it means an
internal class would override one of mine, which I autoload, making the
autoloader useless.
So I'd say, make it explicit and remove the vague moment.
Regards,
Stan Vassilev
1) those that tend to always spice up their API's by wrapping pretty
Hi!
So I'd say, make it explicit and remove the vague moment.
Do I understand right that you advocate having to use ::Exception each
time you need the internal class?
As I said:
I heard lots of objections how ugly it is to prepend everything with ::
(not
that this is the only possibly
As you said before - how is it any different from just being able to
call escape(foo) or display(foo); It's a matter of taste. To me
that is not anymore of a meaningful name - just a different syntax and
not one your average wordpress user would know how to handle.
Well, if it's just a matter
1 - 100 of 122 matches
Mail list logo