breaks encapsulation. Also, PHP model is not
message passing (as in eg. Erlang), we have just plain function/method calls.
Also, what would be the sender/caller when executed from non-method (eg top-
level script or plain function)?
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Developm
Liskov's principle...
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
;s why it's usually
better to store datetimes as either UTC datetime or plain unix timestamp. I
usually go with the former - using database datetime type.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
they're request for code execution, not for value
(remember, not all functions return values as they most important effect -
it's not Haskell).
Calling non-existing function returns in fatal error in PHP; it's the same
for:
$object->iHaveNoSuchMethod();
$null->method();
n
on, others might find it less
readable (or indifferent). And for b - speed difference between ' and "
should be negligable (esp. with opcode caches).
I only worry it could break BC - people might have used "{SOMETEXT}" in
strings and not expect it to be interpolated (I've done so myself).
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
operator for static class access (static methods and
properties), while :> or ::: is just namespace access operator, so we can
always assume that anything on the left side of ::: or :> is a namespace. In
Ryan's version :: is sometimes static class access operator, sometimes
namespace segmen
But we'd love annotations for situations such as the one I presented before,
as well as WSDL generation etc.
Instead of using annotations we use something like that:
class X {
public static myMethod_methods = array('POST', 'GET');
public static myMethod_access =
as functions can have arbitrary attribute
set:
def a():
pass
a.x = 5
It also has very powerful mechanism of decorators, which are basically
higher-order functions applied to functions on their definition, but I don't
think Volodymyr asks for so much.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
bstr($path, -strlen($extension)) == $extension)
Readability would also increase.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
uests, then curl or HTTP extension should be sufficient.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
can express all characters in the Unicode. Do you mean that unicode
still lacks some characters for asian languages used today?
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
you are sure you know what
you're doing. This is the same workaround that is needed if someone used
if (! is_integer($bar)) {die()}
inside of the foo method.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
d. And if you know that
you have either an int or string representing an integer in $bar, then
foo((integer)$bar) would work just well.
The only problem with the cast is that (integer)'abc' is 0, but it has been so
for a long time and there is no need to change it. is_numeric check s
here:
string(3) "foo"
ALERT - canary mismatch on efree() - heap overflow detected
(attacker 'REMOTE_ADDR not set', file 'unknown')
So I confirm your problem (var_dump should report object, not string).
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
would be "no".
All right, seems it was fixed in the meantime -
http://bugs.php.net/bug.php?id=39003
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
HING - a constant
Something - a class
ISomething - an interface (although distinguishing between classes and
interfaces is not strictly necessary as those are quite similar).
So if such distinction is necessary, it can be coded for specific project,
using such rules as a hint or as strict rule, depending on needs.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
ing (Service s) {...}
PHP tries to autoload type Service, but it can't know if it's looking for
interface or class. Both are possible.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
W liście David Wang z dnia wtorek, 4 września 2007 16:24:
> http://zoo.cs.yale.edu/~yw226/macros.diff.txt
>
> Comments?
+#define always_inline inlinue
Shouldn't that be
+#define always_inline inline
?
(in zend.h)
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development M
paces even in small
scripts - just because I'll be using those libs.
If using a bunch of imports is the only way that is accepted - then at least a
shortcut like python's "from x import a,b,c,d,e,f,g,h" would be a nice.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
.
All other languages I know that have namespaces (Java, python, C++) allow
programmers to import other namespaces locally - usually for a single file.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
pace
without using
import SQLAlchemy::Column
import SQLAlchemy::Table
import SQLAlchemy::Join
import SQLAlchemy::ForeignKey
import SQLAlchemy::Session
import SQLAlchemy::Transaction
and tens of other classes? I know your patch makes it possible to use fully
qualified names everywhere.
--
Paweł S
returns true iff the variables refer to the same
instance) instead of == (deep comparision - member-by-member).
AFAIK this behaviour was introduced in 5.2 or 5.1 - well, just another BC
break.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
, which is a result of
substituion rule already mentioned by Stanislav.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
y and
I think it should not happen in any case - no matter if the PHP script
running is buggy or not. I makes debugging difficult and brings unpredicatble
results.
Besides - it is not documented at all.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
quot; class if you use one,
but that should be a one place - if you kept your code clean.
I think this solution is better, as you don't have to rely on internal
refcounts, which can be implemented in another way (or dropped altogether) in
future releases.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
ease your internal refcount by
one, destructor would decrease it.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
W liście Andi Gutmans z dnia czwartek, 11 stycznia 2007 21:48:
> How familiar are you with Java in shared hosting environments?
Been hacking one mayor Java app to make it work with JSM. Not much, but I
believe Sun took much care to make sure JSM works as advertised.
--
Paweł Stradomski
--
or Java, the answer is yes. You
can declare privileges for the code based on where it is located (in the
filesystem tree). That should be sufficient, if used properly.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
28 matches
Mail list logo