Timm Friebe wrote:
I've been playing around with the (not new) idea of introducing threads
into PHP userland (maybe something to think about havin in PHP6?). What
came out of it is available at [1], offering an object oriented API (in
comparison to PECL/threads [2]).
-one of the reasons to not
Pete James wrote:
I hope that this is not the wrong venue for this.
I've seen references to questions about this before, but is there any
tool similar to yacc, written in php?
It's not written in PHP - but it generates PHP code
have a look at http://php-sharp.sourceforge.net
In CVS is
phpLex a
I'm having fun with it :)
/usr/src/php/php5/ext/sockets/php_sockets.h:89: conflicting types for
`SOCKET'
/usr/include/mono/io-layer/uglify.h:38: previous declaration of `SOCKET'
also had a bit of trouble with mono's exception.h including config.h
(which wasnt installed into the bulid stuff)
Apart from tidying up the include stuff.. - for this specific case, is
it worth cosidering precompiling all the files into a single bytecode
file?, thats what bcompiler ends up doing for classes.. etc. then
manually indicate that you want to recompile the bundle, I'm guessing
the actual PHP
It would be usefull to have a direction on this, - It's come up a number
of times in bug reports.
It has a number of uses (primarily breaking large classes up, into
smaller components..), and a clearer way to write code than using a huge
inheritance tree.. - It may not be correct OO code, by
I've just put up a short description of the current state of the
research on the feasibility on PHP#, developing a .net CIL bytecode
compiler for PHP. If anyone wants to add 'constructive comments' to it,
please fire away..
http://www.akbkhome.com/Projects/PHP_Sharp
(you'll have to click
Brad LaFountain wrote:
I know I'm going to piss people off by asking this but how do I create a new
pecl package? I think I want going to put php_opengl in there. See if gets
anymore use.
upload it to pear/PECL/opengl.. (You should have karma for that already)
you nead a pear account re: the
Andi fixed it in CVS, try checking out downloading tokenizer.c again.
Magnus Määttä wrote:
From 4.3 branch with ZE2 i get this compile error:
/bin/sh /opt/DEV/php/php430/php4/libtool --mode=compile gcc -Iext/tokenizer/ -I/opt/DEV/php/php430/php4/ext/tokenizer/ -DPHP_ATOM_INC
Actually looking at this in more detail, the solution PHP has infers
that using $object-XXX='somevar' is heavily prefered over
getXXX()/setXXX(), kind of against the grain for a classic OOP language
(from the impressions have read), As refactoring (which is often the
logic cited for
have a look at the validate package in pear.
Regards
Alan
|-Original Message-
|From: [EMAIL PROTECTED] [mailto:nicos;php.net]
|Sent: Wednesday, November 13, 2002 9:46 PM
|To: [EMAIL PROTECTED]
|Subject: [PHP-DEV] is_*
|
|
|Hello,
|
|After having helped many users, I just thought
Thanks to a little chat (and a few beers) with Zak at the conference, I
got wondering if this syntax would be a sensible addition...
The principle is to enable rapid prototyping of getter and setter
methods.
class something {
var getBanana setBanana $banana = 12;
var getOrange
Shane Caraveo wrote:
Anyway before I get carried away and actually test this :) - anybody got
any thoughts.
Regards
Alan
What's wrong with how overload does this?
it has a slight downside in clarity of code - eg. where is that method..
SHane
--
PHP Development Mailing List
variables)...
John
|-Original Message-
|From: Shane Caraveo [mailto:shane;caraveo.com]
|Sent: Tuesday, November 12, 2002 10:04 PM
|To: Alan Knowles
|Cc: [EMAIL PROTECTED]
|Subject: Re: [PHP-DEV] prototypes for getters and setters.
|
|
|Alan Knowles wrote:
|
| Shane Caraveo wrote
fixes I want to have karma to help fix some bugs/improvements into php and
into bcompiler for win32 that is my speciallity.
I've already did a compile with windows but now I need to add some more
functionalities.
Alan Knowles already said to me to keep in touch.
Thanks,
Ernani
--
PHP
Im +1 for reverting the patch - (for what it's worth)
Why?
Well - most 'average' (and below) PHP programmers when attempting to do
CLI programming, will get a serious WTF reaction from wondering why when
they 'echo' stuff, it doesnt appear. The more advanced Users can
manually turn off
To try and clarify...
(B
(B#!/usr/bin/php -q
(B?
(B
(Becho "please enter a word";
(B$fh = fopen('php://stdin')
(B$s = fgets($fh,100);
(Becho "you entered $s" ;
(B
(B?
(B
(BWould this be affected by the change? - eg. would you need to flush();
(Bbefore the prompt appeared?
(B
Non blocking connections would be nice...
- On the generating stuff - why do you want to generate the code on the
users system? -
all the re2c stuff in CVS is 'pre-genereated'
It would be nice to have extension generator that could be built upon,
that didnt involve re-reading all those
Edin Kadribasic wrote:
Any objections to exporting another function from zend_compile.h by
applying this patch? I need this in order to compile
pear/PECL/bcompiler on Windows.
Edin
actually it's not needed 'at present' cause the compiled bytecodes do
not use inheritance (as the compiled
used) = however it will need including eventually...
zce-parent always evaluates to NULL...
Edin
- Original Message -
From: Alan Knowles [EMAIL PROTECTED]
To: Edin Kadribasic [EMAIL PROTECTED]
Cc: Zeev Suraski [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, October 16, 2002 4:03 PM
attached fixes should enable the zip extension to a) build, b) build as
a module
want to give me Karma (or patch it in)
Regards
Alan
? .libs
? Makefile
? Makefile.fragments
? Makefile.global
? Makefile.objects
? acinclude.m4
? aclocal.m4
? autom4te.cache
? build
? config.cache
? config.guess
Jan Lehnardt wrote:
Hi,
On Wed, Oct 09, 2002 at 09:38:46AM -0500, Gunes Koru wrote:
Hello PHP contributors,
didn't we agree not to do that again?
Well he did shorten his signature - so we are getting somewhere - slowly :)
Jan
--
PHP Development Mailing List
Yasuo Ohgaki wrote:
Sebastian Bergmann wrote:
Yasuo Ohgaki wrote:
yohgaki Mon Sep 30 22:43:33 2002 EDT
Modified files:
/php4/main output.c
Log:
Fixed implicit flush.
This commit broke my script, that I mentioned before, again. It now
dumps the contents of a
Going on a 'semi-consistant' naming structure on unix, would
libphp.so.4.3.0 (softlinked to libphp.so) be an idea.
this should be really good when working with bcompiler_load_exe() :)
Regards
Alan
Edin Kadribasic wrote:
On Sunday 29 September 2002 11:45, [EMAIL PROTECTED] wrote:
On Sun,
Are you dl('')'ing and modules, - I think Zeev pointed me to a known
bug with this if you have a memory leak from a dl'ed module it will
crash on this type of debugging code (I think the filename gets freed
when you unload the module at shutdown, and hence filename points to an
out of bounds
knight wrote:
I was wondering if one(not all) of you could tell me how to view the source
code for a particular php function.
maybe there is somewhere I should look to find this information... I just
don't know where to start.
http://www.php.net/manual/en/zend.php
lxr.php.net
grep for
I know it's a bit of a radical suggestion, but would depreciating
highlight_string in favour of a pear package using the tokenizer not be
a better approach.
is there any reason to keep this in C?
Anyway, just throwing a few stones into the water
Regards
Alan
Devon O'Dell wrote:
Hey,
DJ Anubis wrote:
This is a very interesting function which could help in some developments.
But sounds dio_tcsetattr diseappeared from php-4.2.2. I browsed the source but
couldn't find it. in the source tree.
it was added in 4.3 about 3 weeks ago. - If somebody wants to tell me
how to add
it was added in 4.3 about 3 weeks ago. - If somebody wants to tell me
how to add the 'since 4.3-dev' note to the manual, it might help...
Hmm .. there's not '-dev' .. you either write CVS or 4.3.0 as
the release it is available in.
I added a note about it being
Experminatal 10 to 16 months:
---
dio, w32api, xml rpc, ncurses, pcntl, xslt
dio - appears mostly stable = hell it's going in an embedded box here:)
its a straight map direct unix io stuff to php, so the api will
probably not change, just grow slightly??
Sounds
eminent wrote:
Hi everyone,
i have to manipulate include function inside php source code to
satisfy my needs. it has to be configured, i think, with something
like PHP_FE(include .)
my problem is that i can't find where it is inside the php source
tree. i mean that i don't know in
Please use the php-general for questions like this.
- see http://www.php.net/fread
Regards
Alan
Terence Lee wrote:
hello
i've tried to read a line from a text file by fgets($fp,8192). it work
fine. however, there is a line over 8192 char and i tried to increase
the 2nd parameter (e.g. 8193,
Sounds like a job for srm... http://www.vl-srm.net/
Obviously other options include SOAP servers.. etc.
or just using shm and storing a serialized object in there.
or use a ramdisk.
Something like this is difficult since php normally is not run threaded
(eg. apache/cgi...) at the moment,
I forgot msession extension. http://www.mohawksoft.com/phoenix/msession.html
the rpc extension may also be of interest - (not know the code that
well, I'm guessing it may be able to provide a more efficient object
serialization), although I doubt that the current string method is
really that
[EMAIL PROTECTED] wrote:
hi everybody,
does anyone know if there is any opensource tool for compiling or
bytecoding a php script? i know there is zend compiler but it costs
too much. thanks
Massimo
pear.php.net - look for bcompiler (very experimental)
based on the compiler in apc (have a
[EMAIL PROTECTED] wrote:
Hi,
i have tried bcompiler and read the installing instructions. i unpack,
run phpize, run buildconf and configure (using --with-bcompiler) but i
get a sitax error on line 11094 in configure and the execution aborts.
have you any suggest?
It's probably better
Johan Jordaan wrote:
Hi,
I'm new to this list, so hi to everybody out there :)
I think this msg would be reaching the intended audience, but if I'm
wrong let me know :)
It's probably not a bad audience :)
I've been playing around with flex/bison a little the last couple of
days. I've
Wez Furlong wrote:
class C {
delegatee $foo = new IFoo(); // implements IFoo by delegation
delegatee $bar = new IBar(); // implements IBar by delegation
}
I didnt see anyone suggest this as an alternative to the delegatee
syntax, - it just a bit clearer to read (to me anyway..)
class C
From my reading of delegation, it's really overloading, worded slightly
differently.. - but not that related to interfaces...
In the example below, which is a php'ized version of a C# demo, the
advantages of using interfaces (as far as I know) are primarly useful
for COM or CORBA, where it
One another suggestion a change in ZE1 that would ease transition to ZE2.
making
$object-__clone() work on ZE1 (eg. parse equivalant to $object) ,
(without having to add it to all classes that are likely to need it)..
would at least enable code written for ZE1 work with ZE2.. and visa
can somebody give me karma to add this..
and probably karma for phpdoc/en/reference/dio/functions (or similar)
regards
alan
regards
alan
Sterling Hughes wrote:
attached is a patch to add tcsetattr() to the dio extension
any objections/suggestions for it..
for some reason if I do O_ASYNC on
have a look at xdebug, or similar which does backtraces
I think PHP5 will do this as well..
regards
alan
Richard Thomas wrote:
I have a set of universal DB wrappers that I use for most of my
projects. The great thing about these wrappers, they auto manage your
connection so connecting to 2
Can we not document the real issues about this in the manual, and just
say something like
There are security issues in using any type of sessions with HTTP,
please read the manual at
http://www.php.net/en/manual/security.sessions.html
for a more detail discussion on this subject..
regards
connect the signals after forking.
regards
alan
-Jason
On Thu, 2002-08-08 at 02:49, Alan Knowles wrote:
this efree needs removing..
+
+efree(*call_name);
+DEBUG_OUT(done call_user function\n
Ok, had a play with this
updated copy on
http://docs.akbkhome.com/threads.tgz
added a few of pthreads calls to TSRM.c
did most of the testing without this abstraction layer - just to see if
I could get it to work.
used php_exectute_script, rather than getting clever and copying the
Ok, had a slight play with it again..
I did eventually find the perl code for threading although without an
lxr server it's pretty much impossible to decipher all the macros they
use..
The reality is I'm waving in the dark a bit - I've got a bit of spare
time to play with it, but not really
It's not about looking at the perl code, that will tell you nothing
unless you know perl internals. It's about the way the interpreter
works, some of the architecture, that is simular to PHP. In PHP,
threads are isolated, kind of like seperate processes, but in threads.
From my
Im looking at adding threading to php, (for the cgi/cli stuff)..
The story so far:
I've created an extension which diverts all zend_execute calls into the
extension - phpthreads_execute.
this function is a copy of zend_execute with a few modifications
- to copy restore things like
Shane Caraveo wrote:
Alan Knowles wrote:
Im looking at adding threading to php, (for the cgi/cli stuff)..
The story so far:
I've created an extension which diverts all zend_execute calls into
the extension - phpthreads_execute.
this function is a copy of zend_execute with a few
Marco Glatz wrote:
hi there,
i have an extension with a funtion that should return an array, but my array
is empty ?.
-- snip --
ZEND_FUNCTION(foo)
{
zval *tmp_array;
MAKE_STD_ZVAL(tmp_array);
array_init(tmp_array);
array_init(return_value);
//
This would be nice to get into 4.2.3 - at least the tokenizer would be
usable in a release version :)
http://cvs.php.net/diff.php/php4/ext/tokenizer/tokenizer.c?r1=1.8r2=1.9ty=hnum=10
for bug : http://bugs.php.net/bug.php?id=16939
regards
alan
Attached hopefully is a patch to allow method names called delete .-
not functions though..
Speedwise it should not affect performance as its a very small compile
time issue..
this would save me an a few others a bit of pain :)
thoughts
regards
alan
Index: zend_language_parser.y
Yeah, one of the main reasons for requesting it was that like shanes
sybase class midgard also uses delete as the row deletor, - this doesnt
really affect midgard as the method is defined in the php extension, not
the php, however when I wrote DB_DataObject, and midgard lite, to take
I've just been playing building a php bytecode compiler - based off of
the apc serialize code. - made it thread safe and made it as a php
extension that reads/writes streams - so it only works with 4.3-dev..
the tarball is at
http://docs.akbkhome.com/bcompiler-0.1.tgz
source files are here:
this is a good starting place
http://www.php.net/manual/en/zend.php
although it doesnt cover the class stuff that well (which can be done :
ming, domxml, gtk, xmms - to name a few that do it )
- for a nice example have a look at the xmms extension
http://cvs.php.net/cvs.php/pear/PECL/xmms
Stig S. Bakken wrote:
Good idea. I assume you want this for WidgetHTML.php? ;-)
Yeah, I hopefully it would remove the need for preg_matching in there..
Will get back to this in a few days - want to clear off some other stuff...
regards
alan
- Stig
On Wed, 2002-06-12 at 14:26, Alan
http://www.php.net/manual/en/zend.variables.resource.php
- Im sure thats improved alot since I first read it :)
regards
alan
fabwash wrote:
Something went wrong in the format of my message!
It should read:
ZEND_FETCH_RESOURCE(resource_ptr, resource_struct *, resource_id, -1,
resource,
Attached hopefully is the re2c source for a html tokenizer - I added it
to tokenizer.c - any thoughts on inclusion?
regards
alan
enum {
STATE_PLAIN = 0,
STATE_TAG,
STATE_NEXT_ARG,
STATE_ARG,
STATE_BEFORE_VAL,
STATE_VAL
};
/*!re2c
any =
__LINE__ , __FILE__ (and now __FUNCTION__ __CLASS__) are converted at
compile time into a string - have a look at zend/zend_language_scanner.l
for more details.
regards
alan
Michael Virnstein wrote:
A short question on this:
how about __LINE__?
doesn't this also require runtime context or
I know this is going nowhere :) but anyway - its late here and I've got
a few secs to kill
Ask your boss, how often has he done a project using microsoft tools,
and its been seriously delayed because they found a serious bug in the
microsoft tools, that had to be worked around.- if he
sounds really nice..
would it be possible to accept objects as well as arrays?
how does it know if the update column should be an integer or string -
eg. '12' or 12 ? - is that what the meta data is for?
regards
alan
Markus Fischer wrote:
Can you elaborate more on the mystic 'metadata'
Any chance of sneeking this one in :) - patch attached
usage:
?
class testclass2 extends testclass { }
class testclass {
function test() {
echo __CLASS__;
}
}
testclass2::test();
$t = new testclass2();
$t-test();
?
prints
testclass2
testclass2
extremely usefull for building
Zeev Suraski wrote:
This should really be implemented 100% in compile time, if you touch
zend_execute.c, BUZZ :)
Anyway, incidentally, Jani implemented this very patch a few days
ago. We'll probably import it within a couple of days after we verify
that it doesn't cause any gotcha's...
This is what I was trying to do,
class master {
function static_test($var) {
$class = get_class() - this wont work obviously :)
$ret = new $class();
$ret-get($var);
if (!$ret-N) return;
return $ret;
}
}
class slave extends master {
function
patch attached
regards
alan
[EMAIL PROTECTED] wrote:
ID: 16232
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Feedback
Bug Type: cURL related
Operating System: linux
PHP Version:
to cache in the opcode for the function call the
result of the last hashtable lookup, then check if that lookup was valid
first rather than doing a hashtable lookup on each call?
(or am I talking out my ass :)
regards
alan
Tomas V.V.Cox wrote:
Alan Knowles wrote:
Thomas - does it make any
I presume that the old
PHP_EXENTSION() still works in V5
so modules outside the php tree can keep using it? ... and put in
dnl PHP_EXENTSION_NEW.
so it's V5 ready...
regards
alan
On Thu, 7 Mar 2002, Sascha Schumann wrote:
I'd like to get some input on the new build system. If
based on something nasty i did with cookies a while back
Session id
[][bb]
eg. first 32? chars are the standard md5, the remainder is a variable
length key.
aaa - the standard session id. (eg. the filename)
bbb - an simple key overlay
say the session file contains
Jerrett Taylor wrote:
I agree.. Also if you have a way of distributing binarys, you can
release the source with it.. Much like a lot of people do already with
binaries for *nix ..
That way you have a binary, that people can use/run without hacking it
apart, and coming back to you with I broke
Well, after half a dozen bug reports that didnt actually work... - this
one should, could somebody comment/commit etc.
The patch includes a number of changes... -
pcntl_zend_extension_active does not appear to be getting set when using
modules
this little magic trick to get the zval stored in
Looks like mozilla buggered up the attachment.
Alan Knowles wrote:
Well, after half a dozen bug reports that didnt actually work... -
this one should, could somebody comment/commit etc.
The patch includes a number of changes... -
pcntl_zend_extension_active does not appear to be getting
After spending yesterday looking at the pcntl library, I did at one
point attempt to get create_thread going, It didnt get very far, (it
segfaulted on emalloc - perhaps because thread_init had not been called)
but I did start wondering about the feasibilty..
Has anybody ever attempted it?
Just a little suggestion :)
GETTING MORE INFO
General documents are located under source root/docs/ directory.
Develper's documents are located source root/docs/developer/.
For more information, refer to following URLs.
PHP: http://www.php.net/
PHP Manual: http://www.php.net/docs.php
This kind of bytes at a nerve when you are hunting for work and almost
nobody mentions PHP here
Anyway, A quick few ideas to throw in the pot.. - Press releases, for
PHP5 pre-alpha, PHP-GTK's, (Derick - srm?) upcomming release etc. which
could be made available - Then a PHP press team??,
interesting things that can be done with stdclass
$t = new stdClass();// eg. use it as a dummy class - for use in
sessions???- guarenteed to work..
$b = (object) array(aa=bb); // creates $b as a class - type stdClass
not sure where/how to use *OverloadedTestClass
regards
alan
*
Jan
Ok, this may seem totaly crazy :)
I was having a look at the issue of the php compiler (really
distributing a single executable) of php code. - we are starting to
develop php-gtk apps and it seemed usefull - it appears that the
previous effort at doing this has dissappeared of the face of
Andi Gutmans wrote:
As I mentioned on the ZE2 mailing list there general rule of thumb is:
a) Objects should be passed by reference.
b) Everything else including arrays should be used by value whenever
possible semantically.
In the ZE2 objects will join b).
Is there a proposed sytnax to
Could you post current new bug database status and
new(?) lead developer?
Eh? Could you be more specific and explain what you mean
by these?
Who is closing the bug reports?
sniper 3188
rasmus 922
sas 824
derick 585
thats an amazing contribution
best regards (and many thanks)
alan
--Jani
The whole file needs a bit of an overhall for that :)
Markus Fischer wrote:
On Mon, Dec 17, 2001 at 10:28:36AM -, [EMAIL PROTECTED] wrote :
return NULL;
}
+if (strcmp(mode, r) strcmp(mode, w)) {
+ php_error(E_WARNING, Invalid mode : ftp can
got a bit bored - and started testing some of these bugs - If anyone
wants to make suggestions on 'ettiquete' of modifying the bug reports -
please shout at me :)
regards
alan
[EMAIL PROTECTED] wrote:
ID: 10996
Updated by: alan_k
Reported By: [EMAIL PROTECTED]
Old Status: Analyzed
Status:
Have a look through the mailing list archives (php-dev) - somebody has
done this.
GRI wrote:
Hi
I wonder if anyone have managed to compile PHP with cygwin. I get
several errors when doing this.
I also wonder if I intend to make a dll to extend PHP for windows,
should I then compile PHP with
This may sound a bit self interested, but the curl extension has a
serious (well to me :) bug that prevents https working - If somebody
wants to patch/test this - it would be one less bug in 4.1.0RC2 :)
-- I have done quite a but if testing here - (with and without openssl
libraries)
This was
Can someone help me out with this one, - I'm sure that I've not acheived what I was
aiming at - adding the Resource, myresource to the array prior to calling the callback
function
the code below is from the url_request callback wrapper for gtkhtml - if this works -
you can build a working
- Original Message -
From: Markus Fischer [EMAIL PROTECTED]
To: Alan Knowles [EMAIL PROTECTED]
Sent: Thu, 18 Oct 2001 18:30:57 +0200
Subject: [PHP-DEV] Re: [PHP-GTK-DEV] Help - Merging Resource into a call_function
array
Is gs really a newly allocated resource so you have to register
the page's - it adds a
level of security, reducing or removing the dependance of file system
write access.
Regards
Alan Knowles
P.S. Anybody fancy looking at the chinese htmlcharacters bug + patch :)
If so, I'm not too sure it would be a good idea to include the midguard
extension in P
hi,
Just tryed adding chinese parsing ability to html specialchars,
If you do any webdev in php in chinese, it is one of the annoying 'missing
features'
Can somebody help finish this off, There are 2 issues,
- I get compile time saying
html.c:76: warning: comparison is always false due to
85 matches
Mail list logo