Re: [PHP-DEV] [RFC] Exceptions in the engine

2015-02-19 Thread Alexey Zakhlestin
code that caught Exception is going to be unaffected. > New code may decide to catch engine exception in separate catch block > (using EngineException) or in single block (using BaseException) If I remember it correctly, BaseException was used by some real code out there. But we can use _BaseE

Re: [PHP-DEV] static constructor

2015-03-12 Thread Alexey Zakhlestin
class A { protected static function __class_construct() { echo get_called_class().” class is defined\n"; } } class B extends A { } output A class is defined B class is defined -- Alexey Zakhlestin https://github.com/indeyets PGP key: http://indeyets.ru/a

Re: [PHP-DEV] static constructor

2015-03-12 Thread Alexey Zakhlestin
s just an approximation, anyway. Real class-objects probably would never happen in PHP. -- Alexey Zakhlestin https://github.com/indeyets PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] JSON float number as string

2015-04-13 Thread Alexey Zakhlestin
N\String JSON\Number JSON\False JSON\True JSON\Null then, it would be possible to introduce any number of experimental userland implementations like the one proposed here -- Alexey Zakhlestin https://github.com/indeyets PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] JSON float number as string

2015-04-13 Thread Alexey Zakhlestin
> On 14 Apr 2015, at 07:31, Alexey Zakhlestin wrote: > > Feels a bit hackish > I think it is possible to introduce an overall better solution > > We can expose result of json-tokenizing as a tree of objects: > > JSON\Object > JSON\Array > JSON\String > JSO

Re: [PHP-DEV] PR 1217: Add support for upload files from buffer string in curl extenion

2015-04-23 Thread Alexey Zakhlestin
> On 23 Apr 2015, at 11:59, Michael Wallner wrote: > > Why not a ctor as in: > > function __construct ($filename, $buffer = null) { >if (isset ($ buffer)) { >// use $ buffer >} else { >// use file contents >} > } > > The file name parameter can be of use anyway for

Re: [PHP-DEV] PR 1217: Add support for upload files from buffer string in curl extenion

2015-04-24 Thread Alexey Zakhlestin
> On 23 Apr 2015, at 14:26, Alexander Moskalev wrote: > > Because currently CURLFile have this constructor: > public __construct ( > string $filename [, string $mimetype [, string $postname ]] ) > > And we cannot replace this arguments to avoid

Re: [PHP-DEV] [RFC] JSON number to string

2015-05-25 Thread Alexey Zakhlestin
> 24 мая 2015 г., в 19:02, Jakub Zelenka написал(а): > > Hi, > > I would like to introduce my and Pasindu's RFC that proposes adding of new > JSON options for converting number values to string when decoding and/or > encoding: > > https://wiki.php.net/rfc/json_numeric_as_string > > Personally

Re: [PHP-DEV] [RFC] JSON number to string

2015-05-25 Thread Alexey Zakhlestin
> On 25 May 2015, at 18:40, Jakub Zelenka wrote: > >> Anyway, as I told in a previous thread, while approach of this rfc solves >> immediate problem, it is not future-proof flexible and exposing low-level >> type based parsing is a better idea >> > IIRC your initial proposal was about convert

Re: [PHP-DEV] Adding a simple API for secure password hashing?

2012-06-17 Thread Alexey Zakhlestin
On 14.06.2012, at 1:31, Nikita Popov wrote: > So, wouldn't it be better if PHP provided an easy to use API for > secure password hashes natively? So you just have to call a single > function, which magically handles everything for you (like salt > generation). > > A simple sample API could be tw

Re: [PHP-DEV] Adding a simple API for secure password hashing?

2012-06-18 Thread Alexey Zakhlestin
On 18.06.2012, at 1:54, Pierre Joye wrote: >> I guess SCrypt binding could be implemented. >> http://www.tarsnap.com/scrypt.html > > Using yet another dependency for that? Not good. That's easier and safer than implementing this on our own. > >> That's the best available option at the moment.

Re: [PHP-DEV] Adding a simple API for secure password hashing?

2012-06-18 Thread Alexey Zakhlestin
On 18.06.2012, at 19:42, Pierre Joye wrote: It is BSD-licensed, so we can easily bundle it with PHP >>> >>> Maybe nice to have in pecl.' >> >> Sure, that's an option, but pecl won't help php to have default >> "state-of-art" password hashing toolset ;) > > There is sadly only state-of-ar

Re: [PHP-DEV] MYSQL_OPT_RECONNECT

2012-07-09 Thread Alexey Zakhlestin
On 09.07.2012, at 14:17, Johannes Schlüter wrote: > an example like this: > >$pdo = new PDO("mysql:..."); >$select = $pdo->prepare("SELECT * FROM t WHERE id = ?"); >/* do something ... connection break in between */ >$delete = $pdo->prepare("DELETE FROM t WHERE id = ?"); >$se

Re: [PHP-DEV] Pseudo-objects (methods on arrays, strings, etc.)

2012-07-17 Thread Alexey Zakhlestin
On 17.07.2012, at 21:03, Stas Malyshev wrote: > Hi! > >> This idea has been proposed many times in the past and it is actually >> a very good proposal, for array, string or other types. > > If we have "$array->foo()", we should also have "class foo extends > array" which allows to override foo(

Re: [PHP-DEV] Pseudo-objects (methods on arrays, strings, etc.)

2012-07-17 Thread Alexey Zakhlestin
On 17.07.2012, at 21:50, Stas Malyshev wrote: > Hi! > >> I am for making array a proper class with methods. >> >> "Legacy" functions can be implemented as wrappers around it: >> >>function array_push(&$array, $value) >>{ >>$array->push($value); >>} > > The problem there is

Re: [PHP-DEV] Pseudo-objects (methods on arrays, strings, etc.)

2012-07-17 Thread Alexey Zakhlestin
On 17.07.2012, at 23:01, Stas Malyshev wrote: > Hi! > >> Options are: * "5-to-6" tool, similar to python's "2-to-3" converter, >> which will fix code. > > Do you know any practical way of how such tool could work? That would be: tokenizer + static analysis (with type inference) + replacing so

Re: [PHP-DEV] Pseudo-objects (methods on arrays, strings, etc.)

2012-07-17 Thread Alexey Zakhlestin
On 17.07.2012, at 23:20, Stas Malyshev wrote: > Hi! > >> That would be: tokenizer + static analysis (with type inference) + replacing >> some of the tokens. >> Not a trivial task, but definitely doable. > > So what would this tool do with this code? > > $a = getFirstArrayName(); > $b = getSec

[PHP-DEV] Regarding PHP6, string/array APIs

2012-07-19 Thread Alexey Zakhlestin
Stas made a good point about need to start with new API, which then can be followed by syntactic sugar. So, we need some ideas to start with: 1. A lot of people told, that it would be a good idea to come with a written standard regarding arguments order. I don't care what it will be, as long as

Re: [PHP-DEV] Make try/catch brackets optinal

2012-07-19 Thread Alexey Zakhlestin
On 19.07.2012, at 13:49, Paul Dragoonis wrote: > 2) Try with only one line in it to throw an exception doesn't seem > like a realistic situation. It could be something like this: try $object->method(); catch (\Exception $e) return false; and ->method(), obviously, can have quite a long and co

Re: [PHP-DEV] Regarding PHP6, string/array APIs

2012-07-20 Thread Alexey Zakhlestin
On 20.07.2012, at 4:09, Stas Malyshev wrote: > Hi! > >> 2. It would be really useful to have 2 versions of each function: one >> which mutates the variable and one which returns the new variable. >> >> Example: >> >> > 'source', $src == 'SoUrCe' $result = lower($srd); // $result == >> true,

Re: [PHP-DEV] Regarding PHP6, string/array APIs

2012-07-20 Thread Alexey Zakhlestin
Anthony, the whole concept is interesting. Can you probably write that as RFC. I believe that will make it easier to read/understand it. Right now, I have only one question: On 20.07.2012, at 4:33, Anthony Ferrara wrote: > The benefit here, is that user types can implement the same "core" inter

Re: [PHP-DEV] Make try/catch brackets optinal

2012-07-20 Thread Alexey Zakhlestin
On 20.07.2012, at 12:33, Ivan Enderlin @ Hoa wrote: > Making braces optional for try/catch does: > + not break backward compatibility; > + add consistency in the PHP syntax; > ± offer a new way to write buggy programs but no more than with other control > structures (think about goto ;-)). > >

Re: [PHP-DEV] [RFC] Supports 'finally' keyword for PHP exceptions

2012-07-24 Thread Alexey Zakhlestin
On 24.07.2012, at 15:20, Laruence wrote: > Hi: >As the previous threads disscussed, I make a implemention. > >here is the RFC: https://wiki.php.net/rfc/finally > >any suggestions? Will it work without "catch" in your implementation? try { doSomethingDangerous(); } finally {

Re: [PHP-DEV] removing an item from an array

2012-08-17 Thread Alexey Zakhlestin
On 16.08.2012, at 0:18, Rasmus Schultz wrote: > How come there is no straight-foward obvious way to simply remove a given > value from an array? Well, this sounds like a reason for creating SplSet class -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www

Re: [PHP-DEV] PHP 5.3 Suggested Feature List (Summary)

2007-09-24 Thread Alexey Zakhlestin
team to check over > the ext/mysql and ext/mysqli docs. I will poke the relevant people at > regular intervals, that any MySQL specific features in PDO will make it > into the docs. Thanks, Lukas! That's a great news! -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PH

[PHP-DEV] substr/array_slice in []

2007-10-01 Thread Alexey Zakhlestin
Here http://www.php.net/~derick/meeting-notes.html#cleanup-for-vs is a phrase "For both strings and arrays, the [] operator will support substr()/array_slice() functionality" will it appear in php5.x (php 5.3)? -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - P

Re: [PHP-DEV] substr/array_slice in []

2007-10-02 Thread Alexey Zakhlestin
ombine those in array) But adding another interface can solve the problem. Ranges can be passed exactly the way they are passed to [] operator public function rangeGet($start, $length); public function rangeSet($start, $length, array $data); -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ --

Re: [PHP-DEV] substr/array_slice in []

2007-10-04 Thread Alexey Zakhlestin
implementing it > on normal arrays and strings becomes just a matter of consistent syntax. currently, array_slice doesn't work with ArrayAccess -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] snaps.php.net, 5.3

2007-10-05 Thread Alexey Zakhlestin
snaps.php.net doesn't have 5.3 yet. will it appear there? -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: RE : [PHP-DEV] [PATCH] in_class_exists() for detecting __autoload() called by class_exists() and interface_exists()

2007-10-06 Thread Alexey Zakhlestin
pace basis? I think that can be done by extending spl_autoload_* family of functions and leaving autoload_register() as low-levelish as it is now -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] substr/array_slice in []

2007-10-06 Thread Alexey Zakhlestin
believe it should be pretty clear that "too perlish" means "too cryptic > and makes no sense because it duplicates already implemented functionality > (more than one way to do it, yeah)". > > But "too perlish" is much shorter. > > --

Re: [PHP-DEV] Reference cycle collector patch

2007-10-08 Thread Alexey Zakhlestin
cription for 33487 would be: "there is no mechanism in zend_object_storage to free unused memory during script execution" -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] substr/array_slice in []

2007-10-08 Thread Alexey Zakhlestin
probably wouldn't have SimpleXML and similar things. > > Mistakes done in the past do not mean we should continue to do them in the > future. simplexml is a mistake? :-/ then DOM is, probably, a mistake too… (it can be implemented in userland using SAX functions) I always thought, that s

Re: [PHP-DEV] Method overloading by method signature

2007-10-13 Thread Alexey Zakhlestin
> > public integer function test(string $string, integer $int) { > > return $int; > } > } > > ?> > > > > I think this would be a very big advantage and would help developers to > write better code. > > -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Method overloading by method signature

2007-10-13 Thread Alexey Zakhlestin
pes of parameters because it is MUCH more expressive > and intuitive. > > It wouldn't even break backward compatibility beause it is just "syntactical > sugar" to checking the variable types manually and then dispatching to the > right behaviour. > > -Ur

Re: [PHP-DEV] Method overloading by method signature

2007-10-14 Thread Alexey Zakhlestin
$remainingParameters ...) { > /* >* string(1) "a" >*/ > var_dump($firstParam); > > /* >* array(3) { > * [0] => string(1) "b" >* [1] => string(2) "c" >* } >*/ > var_dump($remainingParam

Re: [PHP-DEV] Object arithmetic

2007-10-17 Thread Alexey Zakhlestin
on is to force SimpleXML to cast values to strings, because, after all, XML has nothing but strings. Then engine would be able to cast the value further to float (as the last example in bug shows) -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] T_IMPORT vs. T_USE

2007-10-17 Thread Alexey Zakhlestin
still relies on regular expressions, but it is context-aware I am definitely on "less keywords is better" side -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Undefined Constants behavior in PHP6

2007-10-19 Thread Alexey Zakhlestin
echo "{$array[foo]}" is not good and > "{$array['foo']}" is > > 131 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Alexey Zakhlestin http://blog.milkfarmsoft.com/

Re: [PHP-DEV] Undefined Constants behavior in PHP6

2007-10-21 Thread Alexey Zakhlestin
rsekit & runkit ... use of undefined constants produces a E_NOTICE you can catch these in error-handler while debugging and fix the structure of code accordingly. -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [Patch] http_fopen_wrapper.c and allowing any response code w/o warning

2007-11-02 Thread Alexey Zakhlestin
ght be valuable too). Streams have a nice api for notifications — that should be enough for error handling. No need to return false and give a warning (at least, when notifications are handled). -- Alexey Zakhlestin http://blog.milkfarmsoft.com/

Re: [PHP-DEV] PHP 5.2.5RC2 Released for Testing

2007-11-02 Thread Alexey Zakhlestin
nals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Safe mode being removed in PHP6?

2007-11-05 Thread Alexey Zakhlestin
of > Apache? That seems unreasonable. Run php using fastcgi/suexec (every user will have his own PHP running using his uid). That's how textdrive/joyent do this and they are more than happy with this approach. -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Ru

Re: [PHP-DEV] Safe mode being removed in PHP6?

2007-11-05 Thread Alexey Zakhlestin
Did you just ignore the part about fastcgi? On 11/5/07, Mark Krenz <[EMAIL PROTECTED]> wrote: > On Mon, Nov 05, 2007 at 06:35:50PM GMT, Alexey Zakhlestin [EMAIL PROTECTED] > said the following: > > > > That's how textdrive/joyent do this and they are more than

Re: [PHP-DEV] Making parallel database queries from PHP

2007-11-10 Thread Alexey Zakhlestin
to the connection made from PHP. > > Can someone give me some advise about advantages of using one approach or > another? Please keep in mind that I'm hoping for a solution which will be > both stable and minimizes overhead. > > Thanks, > Arend. > > -- > Arend van

Re: [PHP-DEV] PDO performance

2007-11-14 Thread Alexey Zakhlestin
sure how accurate my > benchmarks were =) > > Just looking for some feedback. > > many thanks > Andrew > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Alexey Zakhlestin http://blog.mi

Re: [PHP-DEV] RFC Making compiler info accessible

2007-11-16 Thread Alexey Zakhlestin
would make this a bad idea all round? > > - Steph > > [*] The build system currently appears to be using that info for BC > workarounds, among other things. Elizabeth, if you're reading this please be > aware that it needs a little investigation. > > -- > PHP Inter

Re: [PHP-DEV] Restore output buffer in case of exceptions

2007-11-17 Thread Alexey Zakhlestin
t; > > Following this logic, we would also need to "unwind" all file descriptors, > database transactions, network connections etc. etc. > This makes no sense. This makes sense, but it's almost impossible to implement it this way :) On the other hand, implementing outpu

Re: [PHP-DEV] [PATCH] Optional scalar type hinting

2007-11-19 Thread Alexey Zakhlestin
ith my var names I suppose!), so the type hinting would > help me enforce this and reduce errors in the long run (code goes from > me to other developers who only glance at the dox) I like this idea but E_STRICT seems to fit better :) -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- P

Re: [PHP-DEV] late static binding php6

2007-11-19 Thread Alexey Zakhlestin
On 11/19/07, Lukas Kahwe Smith <[EMAIL PROTECTED]> wrote: > I think the point of Stas reply was to use self:: instead of parent::. how would self help? that would mean calling this exact method, not the method of parent-class -- Alexey Zakhlestin http://blog.milkfarmsoft.com/

Re: [PHP-DEV] late static binding php6

2007-11-19 Thread Alexey Zakhlestin
On 11/19/07, Lukas Kahwe Smith <[EMAIL PROTECTED]> wrote: > > On 19.11.2007, at 14:05, Alexey Zakhlestin wrote: > > > On 11/19/07, Lukas Kahwe Smith <[EMAIL PROTECTED]> wrote: > > > >> I think the point of Stas reply was to use self:: instead of > &

Re: [PHP-DEV] Bug 42773 - WSDL error causes HTTP 500 Response

2007-11-19 Thread Alexey Zakhlestin
ers > > -- > Nick Loeve > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Alexey Zakhlestin http://blog.milkfarmsoft.com/

Re: [PHP-DEV] web applications architectures comparison

2007-11-21 Thread Alexey Zakhlestin
th, so > performance isn't an issue, hence my lack of experience in scaling PHP > apps..) > > > Thanks, > Nuno > > P.S.: Sorry for the off-topic, but I didn't find a better place to ask this. > > -- > PHP Internals - PHP Runtime Development Mailing Lis

Re: [PHP-DEV] Quick question before submitting a feature request...

2007-11-21 Thread Alexey Zakhlestin
st > append my request to it, or create a new one that is worded more clearly. > Please advise. > > -- > It looked like something resembling white marble, which was > probably what it was: something resembling white marble. >-- Douglas Adams, "The Hitchhikers Guid

Re: [PHP-DEV] Re: Quick question before submitting a feature request...

2007-11-23 Thread Alexey Zakhlestin
On 11/23/07, Edward Z. Yang <[EMAIL PROTECTED]> wrote: > I understand this solution won't work if application > Exceptions don't have a common parent class, but this is already > recommended as a good practice. In PHP all exceptions have "Exception" as a paren

Re: [PHP-DEV] [PATCH] late binding for parent (and other options) - Was Re: [PHP-DEV] late static binding php6

2007-11-26 Thread Alexey Zakhlestin
; ?> > will output: > A > B > > It should be noticed that with this patch parent:: will always resolve > to the parent of the current scope, it will just not make any changes to > the called_scope (effectively) I believe this first patch is the proper way to go. It feels "

Re: [PHP-DEV] [PATCH] late binding for parent (and other options) - Was Re: [PHP-DEV] late static binding php6

2007-11-26 Thread Alexey Zakhlestin
"natural" or "intuitive". A::foo() doesn't mean any inheritance at all. "A" can be completely unrelated class parent::foo() means inheritance and inheritance means "extending" and "keeping context". So, "parent::foo()" means

Re: [PHP-DEV] [PATCH] Clean up struct initalizations

2007-11-27 Thread Alexey Zakhlestin
gt; -- > > Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > Ilia Alshanetsky > > -- >

Re: [PHP-DEV] [PATCH] Clean up struct initalizations

2007-11-27 Thread Alexey Zakhlestin
n wiht no initialization at all, of course. > -- > Stanislav Malyshev, Zend Software Architect > [EMAIL PROTECTED] http://www.zend.com/ > (408)253-8829 MSN: [EMAIL PROTECTED] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Alexey Zakhlestin http://blog.milkfarmsoft.com/

Re: [PHP-DEV] Reliable header sending mechanism in php 6

2007-11-27 Thread Alexey Zakhlestin
pecific way of coding to use library is incorrect, anyway. But, you can correctly handle the situation (i.e. provide a meaningful error to the user) by making a simple check: http://docs.php.net/headers-sent -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Dev

Re: [PHP-DEV] Proposed feature for json_encode()

2007-11-29 Thread Alexey Zakhlestin
case IS_STRING: > case IS_UNICODE: > - json_escape_string(buf, Z_UNIVAL_P(val), > Z_UNILEN_P(val), > Z_TYPE_P(val)); > + json_escape_string(buf, Z_UNIVAL_P(val), > Z_UNILEN_P(val), > Z_TYPE_P(val), options); > break; > case IS_ARRAY: > case IS_OBJECT: > - json_encode_array(buf, &val TSRMLS_CC); > + json_encode_array(buf, &val, options TSRMLS_CC); > break; > default: > zend_error(E_WARNING, "[json] (json_encode_r) type is > unsupported, > encoded as null."); > @@ -396,12 +448,13 @@ PHP_FUNCTION(json_encode) > { > zval *parameter; > smart_str buf = {0}; > + long options = 0; > > - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", ¶meter) > == FAILURE) { > + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|l", > ¶meter, &options) == FAILURE) { > return; > } > > - json_encode_r(&buf, parameter TSRMLS_CC); > + json_encode_r(&buf, parameter, options TSRMLS_CC); > > /* > * Return as binary string, since the result is 99% likely to be just > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Alexey Zakhlestin http://blog.milkfarmsoft.com/

Re: [PHP-DEV] Proposed feature for json_encode()

2007-12-01 Thread Alexey Zakhlestin
s and quotes might be inconvenient. Instead of applying a filter on > top of it, having a version of json that doesn't have these is quite useful. > > -Rasmus > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Proposed feature for json_encode()

2007-12-02 Thread Alexey Zakhlestin
eful [1] - http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Unicode#Unicode_escape_sequences -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Proposed feature for json_encode()

2007-12-04 Thread Alexey Zakhlestin
I think I understand what the use-case is… If the browser doesn't know anything about

Re: [PHP-DEV] Garbage collector patch

2007-12-04 Thread Alexey Zakhlestin
- > Wbr, > Antony Dovgal > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] array functions next, current, prev applied to objects in php 5.3.

2007-12-04 Thread Alexey Zakhlestin
your application in order to move to 5.3" and should this be added? > -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] constant folding optimization

2007-12-06 Thread Alexey Zakhlestin
e don't support that syntax at this moment. If you are saying > >> that we could add support for such syntax.. it does seem a > >> good idea, > >> but in that case we would need to modify a few rules of the grammar > >> (like adding a const_expr production, and allo

Re: [PHP-DEV] Thoughts on Feature Request - Arithmetic

2007-12-07 Thread Alexey Zakhlestin
;t there.. currently the only way I > can see to do it would be to eval.. which isn't the most secure method > for such a basic need. > > Regards > > Nathan > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www

Re: [PHP-DEV] Thoughts on Feature Request - Arithmetic

2007-12-07 Thread Alexey Zakhlestin
to calculate custom > commissions for sales people: > > $commission = ($gross_sales - $gross_pay - $medical_benefits - > $chargebacks) * $employee_commission_bracket In this case, you might find embedding usable… http://pecl.php.net/package/lua http://pecl.php.net/package/pytho

Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-12-16 Thread Alexey Zakhlestin
gt; Stanislav Malyshev, Zend Software Architect > [EMAIL PROTECTED] http://www.zend.com/ > (408)253-8829 MSN: [EMAIL PROTECTED] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Alexey Zakhlestin

Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-12-17 Thread Alexey Zakhlestin
ating functions in run-time see create_function) -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Garbage collector patch

2007-12-18 Thread Alexey Zakhlestin
in CVS will give me a chance -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Garbage collector patch

2007-12-19 Thread Alexey Zakhlestin
atus make: *** [sapi/cli/php] Error 1 OS: MacOS-X 10.4.11, intel -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Garbage collector patch

2007-12-19 Thread Alexey Zakhlestin
On 12/19/07, Dmitry Stogov <[EMAIL PROTECTED]> wrote: > updated patch. Great! I managed to compile it. Works for me. The problem mentioned here is gone: http://blog.milkfarmsoft.com/?p=52 It is now possible to continue my appserver implementation ;) -- Alexey Zakhle

Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-12-19 Thread Alexey Zakhlestin
tion > > to take for PHP. The users, who don't know what a closure is, could > > Direction like what? being able to do the following (and not to worry about runtime compilation) is a good reason on it's own: array_filter($my_data, function($test){ return 3 === ($test % 4) });

Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-12-20 Thread Alexey Zakhlestin
On 12/20/07, Antony Dovgal <[EMAIL PROTECTED]> wrote: > On 20.12.2007 09:57, Alexey Zakhlestin wrote: > > being able to do the following (and not to worry about runtime > > compilation) is a good reason on it's own: > > > > array_filter($my_data, fu

Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-12-20 Thread Alexey Zakhlestin
is perfectly readable for people with modern-languages background (and I don't mean 1 or 2 languages, I mean majority) > 2) Yet another incompatible syntax you cannot use if you need to support > older PHP versions > (and you can't check for it in runtime, since th

Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-12-20 Thread Alexey Zakhlestin
On 12/20/07, Antony Dovgal <[EMAIL PROTECTED]> wrote: > On 20.12.2007 12:41, Alexey Zakhlestin wrote: > > it doesn't make sense to put some of these functions in libraries, > > because they are really once-used. > > It makes perfect sense to keep all your f

Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-12-20 Thread Alexey Zakhlestin
s time there is a patch -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-12-20 Thread Alexey Zakhlestin
unctions 2) inline-function is a good candidate for automatic optimization (in case of array_filter, array_map and similiar the construction can be converted to the loop) 3) as the result of (1) and (2) it can be used for fast "currying" of other functions -- Alexey Zakhlestin h

Re: [PHP-DEV] faster & public domain MD5 implementation

2007-12-21 Thread Alexey Zakhlestin
external > code that's to be included in the php codebase meet these legal formalities > so it doesn't become a liability? > > That's all. > > Best Regards, > > Martin Alterisio > > PS: Does anyone knows if using a nickname for authorship is considered > l

Re: [PHP-DEV] PHP - C++ 6.0 DLL

2007-12-24 Thread Alexey Zakhlestin
d Microsoft Visual C++ > Ahh and very important!!! If build the dll how can to use in php?? if by "dll" you mean custom extension, then you will need to put it in your extensions folder and add a string to php.ini -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP

Re: [PHP-DEV] spl_autoload vs __autoload

2007-12-28 Thread Alexey Zakhlestin
On 12/28/07, Andrew Mason <[EMAIL PROTECTED]> wrote: > Can anyone shed some light on the advantages of the spl_autoload over > the standard __autoload ? is there any ? sure. spl_autoload allows you to have many independent autoloaders -- Alexey Zakhlestin http://blog.milkfarmsoft.c

Re: [PHP-DEV] Question regarding linking PHP Parser library into my private Http server

2007-12-31 Thread Alexey Zakhlestin
ssible? > Does anyone know how to do this - which library to link to, which function to > call, maybe an example. > > Thanks for your help. > > Talya Nevo > [EMAIL PROTECTED] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Alexey Zakhlestin http://blog.milkfarmsoft.com/

Re: [PHP-DEV] RE: Optional scalar type hinting

2008-01-03 Thread Alexey Zakhlestin
od($var1) { if (!is_int($var1)) { throw new UnexpectedValueException(); } // … } it looks too long and (what is even worse) it hides actual "business-logic" behing checks. I prefer the following code: public function someMethod(integer $var1) { // … } -- Alexey Zakhlestin http://blog.milkfarmsoft.com/

Re: [PHP-DEV] Set default namespace

2008-01-10 Thread Alexey Zakhlestin
> > execute.php > const BOOK = 'Two Towers'; > use ProjectA; > print ::BOOK; > > Any thoughts on this? Was this sort of approach considered when the namespaces > were being implemented? > > Tomi Kaistila > PHP Developer > > -- > PHP Internals - PHP Runtim

Re: [PHP-DEV] why we must get rid of unicode.semantics switch ASAP

2008-01-22 Thread Alexey Zakhlestin
ep well today. > > [2] Here is a typical problem: http://bugs.php.net/bug.php?id=42861 > Try to fix it without looking at the solution and you'll see what I mean. > > -- > Wbr, > Antony Dovgal > > -- > PHP Internals - PHP Runtime Development Mailing List > To

Re: [PHP-DEV] Multi-threading

2008-02-21 Thread Alexey Zakhlestin
external daemons like cron. > > So, what's the opinion of the PHP maintainers? > > Regards, > > -- > Felipe Ribeiro > [EMAIL PROTECTED] > http://feliperibeiro.com > 83 9979-3161 > > > -- > PHP Internals - PHP Runtime Development Mailing List >

Re: [PHP-DEV] Multi-threading

2008-02-21 Thread Alexey Zakhlestin
s, dynamically created functions/classes, database connections, etc.) pcntl_fork creates several processes, which can communicate, but still has their own sets of local resources -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Multi-threading

2008-02-21 Thread Alexey Zakhlestin
of parallel tasks with less overhead > If I'm correct in all of the above, then I'd personally think that we > don't need multithreading in PHP, however a neat(er) predefined method > of interprocess communication would be beneficial. -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: 5.3 Release Planning

2008-03-07 Thread Alexey Zakhlestin
t;, but "in official distribution" until there is convenient cross-platform of installing extensions from pecl, important ones should be included in distribution -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] profiling followup on addition of streams to include_path - it's *faster*

2008-03-07 Thread Alexey Zakhlestin
clude_once*. I'm curious how > many of our readers have a PHP setup that includes close to this many > files, because it seems rather unlikely to me that anyone would include > more than a few hundred in a single process. > > The surprising news is that users who are us

Re: [PHP-DEV] Comparison: ('*' == 0) ... True or false

2008-03-11 Thread Alexey Zakhlestin
t behavior or am I missing something? > > Test case: > > > var_dump('*' == 0); > > ?> > > Shows boolean(true). > > I was unable to find any documentation as to why this would be the case. try that should explain the situation ;) -- Alexey Zak

Re: [PHP-DEV] [RFC] Anonymous functions

2008-03-24 Thread Alexey Zakhlestin
t; return; > > } > > $f = get_current_function_key(); > > $f($i); > > }; > > > $f(); > ?>> > > > > And here is a Zend extension for PHP 5.2 which enables > > anonymous functions, closures and square bracket

Re: [PHP-DEV] Inconsistencies when accessing protected members

2008-03-26 Thread Alexey Zakhlestin
On 3/26/08, Richard Quadling <[EMAIL PROTECTED]> wrote: > Shouldn't the instance be the limiting factor? it shouldn't public/protected/private are related to classes, not to objects. -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Devel

Re: [PHP-DEV] Inconsistencies when accessing protected members

2008-03-26 Thread Alexey Zakhlestin
but you do not want to export that inner-functionality. use case for "protected" is similiar, but relates to cases when you have hierarchy of classes, which still have some common functionality, which might be usable for multi-instance operations -- Alexey Zakhlestin http://blog.milkfarmsof

Re: [PHP-DEV] PHP 5.3 the slowest PHP of all times ?!?

2008-03-31 Thread Alexey Zakhlestin
efan > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.8 (Darwin) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkfxABIACgkQSuF5XhWr2niu0QCbBhCZWBW8nPX5G48YxNgM6qr2 > 8CQAn0SeMMKFjV1Hy/uKT4NSCMU5Lj/9 > =lZtJ > -END PGP SIGNATURE-

[PHP-DEV] macos-x, php-5.3, configure.in, problem with sed

2008-03-31 Thread Alexey Zakhlestin
the patch, which forces use of '/usr/bin/sed' on this line, while still allowing gnu sed everywhere else. This line is macos-x specific, so won't hurt other platforms http://filez.indeyets.pp.ru/configure.in.macosx.patch -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- P

Re: [PHP-DEV] The "jump" operator

2008-04-04 Thread Alexey Zakhlestin
> shit. Could you please keep polite language? Details of this construct were known for quite a long time, and it was available in PHP6 for "ages" it is a limited goto, just as advertised. you can get out of blocks with it, but you can't go into blocks -- Alexey Zakhlestin

[PHP-DEV] spl documentation

2008-04-11 Thread Alexey Zakhlestin
I noticed, that http://www.php.net/~helly/php/ext/spl/ was updated almost a year ago. Is the newer version available anywhere? -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   3   4   >