[PHP] Re: php5 with apache 1.x - white page
Merlin Morgenstern wrote: got it :-) Both are needed! --with-mysql=/usr/local/mysql' '--with-pdo-mysql=/usr/local/mysql/' Merlin Morgenstern schrieb: Hi there, after strugling a while with the installation of php5 on an older suse system with mysql 3.x and apache 1.x I got it compiled and installed. Apache starts and there are processes running, even the access log shows access to it. Response is 500 (internal error). The page itself does not load and it shows only a white page. I can not find any entry inside a log that show unnormal hints. Any idea where I could look for the error? I tried php error log file and var/log/messages. Thank you for any help. Merlin nice to see somebody answering there own questions - you should just email them to yourself :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Opinions / Votes Needed
Afternoon all, I'd love to get some votes from my fellow developers on the following, and indeed some opinions (especially from those who disagree). Recently I've been running in to a lot of frustrations with PHP when dealing with Classes and Objects. Personally I strongly feel that these need added in to PHP 6, for multiple reasons. I don't think the scope of this discussion covers the syntax of any implementation, just if it needs implemented or not. a: Optional Static Typing I'm finding an ever increasingly need to be able to staticly type properties, parameters, return types etc (in classes) I know there is type hinting but it's just not enough to do what one needs. Additionally support for staticly typing primatives. Here's an example: ?php class Example { private ClassName $obj; // class typed property public bool $primativeBool; // primative typed property // typed returns public function getObj() ClassName { return $this-obj; } // already implemented public function setObj(ClassName $obj) { $this-obj = $obj; } // privative type hint (not implemented) public function setPrimativeBool(bool $primativeBool) { $this-primativeBool = $primativeBool; } public function someMethod() { // also for variables VariableType $variable = new VariableType(); } } ? b: Object superclass A base class type which all objects automagically extend, with (if nothing else) a unique id / hashcode for each object (much like the Java Object class). Failing this some form of function to get a unique reference string for any variable. Example ?php $someClassInstance = new SomeClass(); // method on all objects that returns a unique // id for that object $objectId = $someClassInstance-hashCode(); // or by a function $objectId = get_hashcode($someClassInstance); // and for variables $aString = 'some string'; $stringId = get_hashcode($aString); ? c: Method overloading TBH it's something I could live without, whereas a/b aren't, but it would be an ideal addition to php? ?php class Example { public function someMethod(ClassType $arg0) { } public function someMethod(ClassType $arg0, bool $arg1) { } } ? Thoughts, Opinions, Votes? would love to hear from you guys on this Regards! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Opinions / Votes Needed
Tony Marston wrote: Nathan Rixham nrix...@gmail.com wrote in message a: Optional Static Typing I'm finding an ever increasingly need to be able to staticly type properties, parameters, return types etc (in classes) I know there is type hinting but it's just not enough to do what one needs. Additionally support for staticly typing primatives. Here's an example: If you really *need* to used a staticly typed language then don't use PHP, and don't try to change PHP to match your needs. why not? php fills 95% of my needs in most instances, I'm as much a valid user of php as you and php *could* change to fit my needs and others, not without some appreciated work mind you, but it could (and without affecting anybody else in this case) it's a simple need: if I can type that my variable can only contain an int, then I know it's always an int without tonnes of checks to check it actually contains an int / is getting set with an int throughout the rest of the app (especially when multiple dev's are working on it). additionally this functionality would open the door to the creation of a lot more apps and frameworks, not least the ability to create decent ORM's. Further, it would allow people to contribute proper developers classes that can be re-used time and time again (for instance a full set of collections [class, hashmap, map, list, set etc etc]). Once they're made and open source we all benefit, not only that but they could be made by users instead of the internals team ;) b: Object superclass A base class type which all objects automagically extend, with (if nothing else) a unique id / hashcode for each object (much like the Java Object class). Failing this some form of function to get a unique reference string for any variable. Example Why should each class automaticaly extend a base class? For what purpose? For what benefit? I can achieve what I want without this *feature*, so I don't need it. 2 reasons: 1: it would allow all objects to have this uniqueid/hashcode i need 2: it would allow one to type hint Object in methods (you currently can't) - you can method(array $var) but not method(object $var) see: ?php class Example { public function someMethod(object $arg0) { } } $e = new Example(); $e-someMethod( (object)'y' ); ? returns: Catchable fatal error: Argument 1 passed to Example::someMethod() must be an instance of object Why does each object need a unique id/hashcode? I have been using objects for years without this so it is not necessary, and does not provide any additional functionality. for comparison of equality, so you can make indexed arrays quickly using the hashcode (you know like a hash table) so you can quickly tell the difference between two instances of the same object with the same values that are infact different, makes persisting data a 100 times easier... Why do you need a unique reference string for each variable? WTF! well because $a = 's'; $b = 's'; both are unique, internally php must hold a reference of some sort to each variable and where it's stored that is entirely unique; it would simply be a case of exposing this functionality /or/ adding functionality based on this. c: Method overloading TBH it's something I could live without, whereas a/b aren't, but it would be an ideal addition to php? PHP does not need method overloading as is found in other languages as it has optional parameters with defaults. It is also possible to cast each parameter into wahetever type is necessary. It achieves the same result but using a different method. the same functionality can be achieved, however not without a lot of additional code to test variable types using conditional blocks with lots of is_ and instanceof comparisons; adding method overloading is by no means needed but would majorly simplify the code of scripts which need this functionality. Absolute rubbish! You have obviously been used to a different language and have recently moved to PHP, but cannot get used to the fact that it *IS* a different language, therefore it has different syntax and achieves similar things in different ways. If your feeble brain can't handle the differences then I suggest you stick with your previous language and LEAVE PHP ALONE! actually I've been a senior php dev for 5 years and muddled along trying to help people out on this list for a long time too - it is my primary language, PHP always changes and the beauty of the language is that it tries to allow people to program the way they want, hence it being both procedural and object orientated, obviously there's a need for this otherwise Type Hinting would never have been introduced. PHP could easily be a one for all language and AFAIK the only major functionality missing is static typing..? I'm not trying to knock PHP, simply expand it's functionality and scope by having additional *optional* functionality implemented - like namespaces, if you don't like 'em
Re: [PHP] Re: Opinions / Votes Needed
Per Jessen wrote: Tony Marston wrote: If you really *need* to used a staticly typed language then don't use PHP, and don't try to change PHP to match your needs. +1 I do.. mainly Java when I need it (can you tell) point is.. Java let's me easily do 70% of what I need to PHP let's me easily do 95% of what I need to If we could get that 5% added then PHP would be perfect, not only that but me and the rest of the team at work would be able to make our multi-million pound enterprise projects in PHP instead of java; as would so many others (that can't be a bad thing for PHP) Additionally, rather sure you'd see a mass influx of people moving to php, and applications created for it - even down to design tools such as reverse and forward engineering between uml and php. ack.. there's a tonne of amazing tools and frameworks for java, and I'm sure that a vast majority of them are possible because of this static typing (from orms to web service frameworks and all in between) - am I so bad for wanting that for php and my fellow devs? :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Opinions / Votes Needed
Per Jessen wrote: Nathan Rixham wrote: Tony Marston wrote: If you really *need* to used a staticly typed language then don't use PHP, and don't try to change PHP to match your needs. why not? Because your desired functionality is already satisfied by other programming languages. PHP is an interpreted language with all the strengths and weaknesses that come with it. A need for static or compile-time typing is a need for a different language, honestly. /Per Jessen, Zürich why so strongly against having *optional* static typing? type hinting is already there + internal functions and classes are all staticly typed, function params, return types the whole lot. IMHO if it was to classify all the languages (specifically server side languages for web apps), PHP has 95% of the features i need, the rest come no where near, so it's the obvious candidate to get this remaining 5% that'd make it perfect and open it up to a whole set of new users and markets. Unless it's technically impossible why not? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Opinions / Votes Needed
Jochem Maas wrote: Nathan Rixham schreef: Tony Marston wrote: Nathan Rixham nrix...@gmail.com wrote in message a: Optional Static Typing I'm finding an ever increasingly need to be able to staticly type properties, parameters, return types etc (in classes) I know there is type hinting but it's just not enough to do what one needs. Additionally support for staticly typing primatives. Here's an example: If you really *need* to used a staticly typed language then don't use PHP, and don't try to change PHP to match your needs. why not? php fills 95% of my needs in most instances, I'm as much a valid user of php as you and php *could* change to fit my needs and others, not without some appreciated work mind you, but it could (and without affecting anybody else in this case) it's a simple need: if I can type that my variable can only contain an int, then I know it's always an int without tonnes of checks to check it actually contains an int / is getting set with an int throughout the rest of the app (especially when multiple dev's are working on it). there are other ways of tackling this, but the biggest problem is handling the case when such a placeholder has something other than the given type stuffed into it ... typehint currently give a fatal error, not condusive to elegant error handling. a catchable fatal error which is the key here, and thats what you'd want when statically typing; very condusive to elegantly handling using exceptions :) further.. it's only going to be developers who get the error (hopefully) whilst developing, so all you're doing is making sure both yourself and other people use you're code correctly. on something you said earlier about public properties.. currently I'll use getters and setters most of the time (with type hinting) like you occassionally do and see the need for; purely to make sure that my SomeClass property can't be a string(3) or something. Adding in this static typing of class properties would save you miles of code since: class Example { public bool $someflag; } would function identically to the current: class Example { public $someflag; public function getSomeflag() { return $this-someflag; } public function setSomeflag(bool $val) { $this-someflag = $val; } } I know you can't use primatives in a type hint currently but this example perfectly illustrates how it'd both save you code, and let you use public variables properly without worry. (i hope?) additionally this functionality would open the door to the creation of a lot more apps and frameworks, not least the ability to create decent ORM's. Further, it would allow people to contribute proper developers classes that can be re-used time and time again (for instance a full set of collections [class, hashmap, map, list, set etc etc]). Once they're made and open source we all benefit, not only that but they could be made by users instead of the internals team ;) gotta say that I think array() covers hashmap, map and list pretty well :-P agreed (nobodies knocking php here, I'm here on the php lists asking for features as I heart php, not over on the java forums asking for opinions on adding a tonne of php functionality and simplicity they miss ;-)) - now yeah it covers it great, till you want you're array to only contain instances of your User class then you've got to build a lot of code around it to ensure this, likewise if you want you're array to only have max 10 items in it, or only indexed / only associative, more.. but that's enough. b: Object superclass A base class type which all objects automagically extend, with (if nothing else) a unique id / hashcode for each object (much like the Java Object class). Failing this some form of function to get a unique reference string for any variable. Example Why should each class automaticaly extend a base class? For what purpose? For what benefit? I can achieve what I want without this *feature*, so I don't need it. 2 reasons: 1: it would allow all objects to have this uniqueid/hashcode i need okay ... why do you need it. I don't grok the use personally but I'd like to hear your use case. same reason one needs spl_object_hash - however coupled with 2 it seems the ideal implementation + every object is an object so why not make every class with a superclass of Object? it would also give a place for future functionality common to call objects to be added and why not? 2: it would allow one to type hint Object in methods (you currently can't) - you can method(array $var) but not method(object $var) see: try this snippet on for size: function test(stdClass $o) { var_dump($o); } $o = (object)1; test($o); ahh.. you miss the point, request: I want to type hint that my function can accept objects of any type, but not primatives/array ?php class Example { public function someMethod(object $arg0) { } } $e = new Example(); $e-someMethod( (object)'y' ); ? returns: Catchable fatal error
Re: [PHP] Re: Opinions / Votes Needed
Stuart wrote: 2009/1/17 Nathan Rixham nrix...@gmail.com: Tony Marston wrote: Nathan Rixham nrix...@gmail.com wrote in message a: Optional Static Typing I'm finding an ever increasingly need to be able to staticly type properties, parameters, return types etc (in classes) I know there is type hinting but it's just not enough to do what one needs. Additionally support for staticly typing primatives. Here's an example: If you really *need* to used a staticly typed language then don't use PHP, and don't try to change PHP to match your needs. why not? php fills 95% of my needs in most instances, I'm as much a valid user of php as you and php *could* change to fit my needs and others, not without some appreciated work mind you, but it could (and without affecting anybody else in this case) You may think it's a simple need but it has consequences for all users of PHP. You may be able to implement typed variables while still allowing untyped, but it will impact performance at the very least, probably more. hmm.. debatable on this one TBH, as the method signature (infact everywhere you can use static) is already getting tokenized for public static function etc so I'd assume that if a type token wasn't included then the internal code to do with it would be bypassed in any implementation; thus no performance hit at all - this is me assuming though only the internal dev's could say one way or the other for sure. it's a simple need: if I can type that my variable can only contain an int, then I know it's always an int without tonnes of checks to check it actually contains an int / is getting set with an int throughout the rest of the app (especially when multiple dev's are working on it). I would argue that what you have is a want based on your current implementation strategy, rather than a need. I've never come across any situation where static types would make my code more secure. If your code can't control what you're putting into variables then you have bigger problems than the 5% of your needs PHP doesn't meet. won't make code more secure to the outside world, but it will ensure all developers using my code use it correctly; I can currently control it using PHP however it's v complex to do correctly throughout an application compared to having static types. Any data coming from the user would need the same amount of validation regardless of whether you were stuffing it into untyped or typed variables. IMHO the same goes for any uncontrolled inputs to isolated code regardless of whether it's expected to be reused or not. from the user yup.. but this is about development and developers. additionally this functionality would open the door to the creation of a lot more apps and frameworks, not least the ability to create decent ORM's. Further, it would allow people to contribute proper developers classes that can be re-used time and time again (for instance a full set of collections [class, hashmap, map, list, set etc etc]). Once they're made and open source we all benefit, not only that but they could be made by users instead of the internals team ;) I really don't see why typed variables would make implementing anything easier or the result better. And IMHO a data structure class (hashmap, map, list, etc) would be far more useful if it could contain any type of variable rather than having to have a different subclass for each type. Or are you thinking PHP should also support templates?!! nope I'm not suggesting templates/generics (yet lol); nah not at all especially when a type could be passed through the construct; and completely agree it is useful to have classes that contain any kind of variable, and sometimes it's needed to make that subclass which can only accept a certain type. b: Object superclass A base class type which all objects automagically extend, with (if nothing else) a unique id / hashcode for each object (much like the Java Object class). Failing this some form of function to get a unique reference string for any variable. Example Why should each class automaticaly extend a base class? For what purpose? For what benefit? I can achieve what I want without this *feature*, so I don't need it. 2 reasons: 1: it would allow all objects to have this uniqueid/hashcode i need Really don't see why this is necessary. Please elaborate on why you want this? said to jochem before, same reasons spl_object_hash was created etc etc / orms, persitance etc 2: it would allow one to type hint Object in methods (you currently can't) - you can method(array $var) but not method(object $var) see: snip code I mean no offence, but personally I think this is wanted by lazy programmers. It's *you* calling the function so *you* should know what you're giving it. Equally the function should validate what it's been given if it's possible it might not get what it's expecting or it will be used by idiots. or by people working with lazy programmers.. it's *them* calling *my
Re: [PHP] Re: Opinions / Votes Needed
Stuart wrote: 2009/1/17 Nathan Rixham nrix...@gmail.com: Per Jessen wrote: Nathan Rixham wrote: Tony Marston wrote: If you really *need* to used a staticly typed language then don't use PHP, and don't try to change PHP to match your needs. why not? Because your desired functionality is already satisfied by other programming languages. PHP is an interpreted language with all the strengths and weaknesses that come with it. A need for static or compile-time typing is a need for a different language, honestly. /Per Jessen, Zürich why so strongly against having *optional* static typing? If it ain't broke don't fix it. I still fail to get why you're so strongly for them. type hinting is already there + internal functions and classes are all staticly typed, function params, return types the whole lot. Internal functions and classes are not statically typed - they check their inputs and raise errors if they're wrong, which IMHO is what all code should do. erm need to check but gonna take you're word for it - regardless still *need* optional static types sometime please thankyou IMHO if it was to classify all the languages (specifically server side languages for web apps), PHP has 95% of the features i need, the rest come no where near, so it's the obvious candidate to get this remaining 5% that'd make it perfect and open it up to a whole set of new users and markets. Unless it's technically impossible why not? That remaining 5% is the remaining 5% for you but you can't assume that for everyone else, and it's pretty arrogant for you to think you know what everyone wants. aww man, I meant IMHO wasn't trying to be arrogant (but i do think it'd open php up to more users and markets) I do not think it'd cover everybodies needs though. At the end of the day PHP is open source and if there are features you think will be welcomed by the whole community you can either suggest them on the internals list, develop them yourself and submit patches or pay/convince someone else to develop them and have them submit patches. Just don't be surprised when you discover that your simple enhancements have unexpected side effects that make them anything but simple, especially when you need to maintain BC as much as possible. no doublt about it being complicated to implement, and honestly I'm close to learning c and doing it myself - may take a while though :p preference realistically goes to hoping some internals follow what I'm saying (*prays*) Also, ignore Tony... PHP won't get better without people making suggestions, even if they turn out to be impractical or unpopular, so don't ever LEAVE PHP ALONE!! ;-) -Stuart lol the leave php alone comment was my fav yet - and yeah impractical and unpopular sounds like a good description - dunno why I feel it would have such a vast improvement and that php would grab a big share of java's market but I do.. something about php+flex/as3 that seems to be the future to me.. keeping these two languages pretty much inline on the OO side seems like a v wise move.. time will tell :) thanks again stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Opinions / Votes Needed
Stuart wrote: 2009/1/17 Nathan Rixham nrix...@gmail.com: Stuart wrote: 2009/1/17 Nathan Rixham nrix...@gmail.com: Tony Marston wrote: Nathan Rixham nrix...@gmail.com wrote in message a: Optional Static Typing I'm finding an ever increasingly need to be able to staticly type properties, parameters, return types etc (in classes) I know there is type hinting but it's just not enough to do what one needs. Additionally support for staticly typing primatives. Here's an example: If you really *need* to used a staticly typed language then don't use PHP, and don't try to change PHP to match your needs. why not? php fills 95% of my needs in most instances, I'm as much a valid user of php as you and php *could* change to fit my needs and others, not without some appreciated work mind you, but it could (and without affecting anybody else in this case) You may think it's a simple need but it has consequences for all users of PHP. You may be able to implement typed variables while still allowing untyped, but it will impact performance at the very least, probably more. hmm.. debatable on this one TBH, as the method signature (infact everywhere you can use static) is already getting tokenized for public static function etc so I'd assume that if a type token wasn't included then the internal code to do with it would be bypassed in any implementation; thus no performance hit at all - this is me assuming though only the internal dev's could say one way or the other for sure. But you've added an extra piece of information to every zval floating around the system - what type it is, if any. Huge amounts of code would need to be changed to check that value and deal with it in an appropriate way. Not a huge performance hit per variable but repeated across a large CMS or framework the effect could be pretty huge. I don't even pretend to know enough about the internals of PHP to determine stuff like that, but I've been coding long enough to recognise that everything code does takes time so the less you can have it do the better. *dunno* might ask the internals.. it's a simple need: if I can type that my variable can only contain an int, then I know it's always an int without tonnes of checks to check it actually contains an int / is getting set with an int throughout the rest of the app (especially when multiple dev's are working on it). I would argue that what you have is a want based on your current implementation strategy, rather than a need. I've never come across any situation where static types would make my code more secure. If your code can't control what you're putting into variables then you have bigger problems than the 5% of your needs PHP doesn't meet. won't make code more secure to the outside world, but it will ensure all developers using my code use it correctly; I can currently control it using PHP however it's v complex to do correctly throughout an application compared to having static types. Then your functions/methods should be checking their inputs in the same way you check the inputs from users. I recall a function I wrote a while ago which allowed the first line of each function and method did something like this... check_args(func_get_args(), 'error', 'int', 'string:30', 'int:5-100', 'bool'); First argument is the array of arguments. nice, seen similar for validating forms; Second it what the function should do in the case of an incorrect argument - in this case to trigger a user error. Other options here were 'warning', 'notice', 'email:u...@domain.com' and true. Most of those should be self-explanatory, and if true is passed then an error message is returned. The rest of the arguments should be one per function argument stating what's allowed. The options here were numerous and I can't remember them all, but you get the idea. This single function made validating arguments for any function or method a doddle and extremely flexible. Could your static types validate the length of a string or ensure an integer it within a range? yeah to some extent; but also would be more like calling a series of setters each one validating it's input on set so.. ?php class MaybeThisIsSlightlyMoreNameSpaceFriendlyEh { private int $a; private string $b; private string $c; private bool $d; public function __construct(int $a, string $b, string $c, bool $d) { $this-setProperties( $a, $b, $c, $d ); } public function setProperties(int $a, string $b, string $c, bool $d) { setA($a); setB($b); setC($c); setD($d); } ... public function getB() { return $this-b; } public function setB(string $b) { if( strlen($b) !== 30 ) { throw Exception('with some message and code or whatever'); } $this-b = $b; } ... } ? then you're validating at setter level and using the setters in the construct / sure you follow.. incidently, if you can see the benefits of this you'll probably see the how method overloading would be needed
Re: [PHP] Re: Opinions / Votes Needed
Per Jessen wrote: Nathan Rixham wrote: Per Jessen wrote: Nathan Rixham wrote: Tony Marston wrote: If you really *need* to used a staticly typed language then don't use PHP, and don't try to change PHP to match your needs. why not? Because your desired functionality is already satisfied by other programming languages. PHP is an interpreted language with all the strengths and weaknesses that come with it. A need for static or compile-time typing is a need for a different language, honestly. /Per Jessen, Zürich why so strongly against having *optional* static typing? You can't have your cake and eat it. You can't/shouldn't have strong and loose typing in the same language. In my opinion. Instead of providing programmers with a black or white choice between static or dynamic typing, we should instead strive for softer type systems. That is, static typing where possible, dynamic typing when needed. Unfortunately there is a discontinuity between contemporary statically typed and dynamically typed languages as well as a huge technical and cultural gap between the respective language communities. The problems surrounding hybrid statically and dynamically typed languages are largely not understood, and both camps often use arguments that cut no ice. We argue that there is no need to polarize the differences, and instead we should focus on leveraging the strengths of each side. [1] IMHO if it was to classify all the languages (specifically server side languages for web apps), PHP has 95% of the features i need, the rest come no where near, so it's the obvious candidate to get this remaining 5% that'd make it perfect and open it up to a whole set of new users and markets. _If_ the remaining 5% will really open it up to a whole set of new users and markets, all you have to do is sit back and wait. I'm not so sure though. One of the great things about PHP is that it is easy and approachable for beginners, also without formal computer science training. Write some code, bang it in a webserver, and bob's your uncle. If we make PHP more complex, we might well lose that. completely agree; it would all be optional though (much like the already existing type hinting) - so I can't see it having any impact on anybody already using php or anybody learning (any negative imapact that is) By all means create a PHP++, but leave PHP as it is. It has enough feature-bloat already. you do have a good point, I've thought that myself often and indeed it was brought up in the namespace discussions - however if it's optional then why fork? * 1 - http://pico.vub.ac.be/~wdmeuter/RDL04/papers/Meijer.pdf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Opinions / Votes Needed
Per Jessen wrote: Nathan Rixham wrote: point is.. Java let's me easily do 70% of what I need to PHP let's me easily do 95% of what I need to I'm curious - can you list what the 25% are? it lacks dynamic typing, the ability to procedural code and its precompiled not interpreted; all in a hello world in php is 10 seconds, in java it's nigh on 10 minutes. Hence why php is such a good language If we could get that 5% added then PHP would be perfect, not only that but me and the rest of the team at work would be able to make our multi-million pound enterprise projects in PHP instead of java; as would so many others (that can't be a bad thing for PHP) But why? Why not use Java and J2EE and all that good stuff? I'm not much of a java fan myself, but you've got to give credit where credit is due. well I can give two examples: Three other PHP Developers and myself spent the best part of a year creating a large multi-site event management system in PHP; the whole process was deeply frustrating primarily due to the lack of optional static typing and there in the lack of a solid ORM; with this small addition the whole process would have been a 6 month process if that, and a far more pleasurable experience. Currently 7 other Java developers and myself are building a large multisite transportation management and ticketing system in Java, this is a 9 month project with a decent sized and very skilled team; because of the lack of static typing (and thus the lack of development tools and frameworks/orms for PHP) we've had to go with Java; TBH the static typing is only needed on the domain model and the api layer, the bulk of the business logic in between where the majority of the work comes in, would be a great deal easier using a mix of procedural code and dynamic typing. I'd argue that again the development time of this project could be halfed if it was done in PHP AND if in PHP had support for optional static typing coupled with a good ORM. Further the difference between precompilation and interpretation is v noticable when it comes to rolling applications out, often in development you want to run a hlaf built or broken application to see what happens and check if parts x y and z are good + to test your infrastructure; when you can't compile and do this testing becuase the app isn't bug free or completed it's rather limiting. Sometimes unit tests just don't cover what you need. Additionally, rather sure you'd see a mass influx of people moving to php, and applications created for it - even down to design tools such as reverse and forward engineering between uml and php. ack.. there's a tonne of amazing tools and frameworks for java, and I'm sure that a vast majority of them are possible because of this static typing (from orms to web service frameworks and all in between) - am I so bad for wanting that for php and my fellow devs? No, you're not so bad :-) The point is - why not just use Java, when you really need the features? the cases above should show why, fact is (imho) PHP would be a far better language than java for web based applications in 99% of cases if it had this optional static typing and the tools that allows. *IF* it did, then 10 other people and myself wouldn't have wasted a year of there lives on writing what could be unneeded code; I'm sure I'm not the only one in this position. I've already quoted this, but in this context I feel it's appropriate to reiterate: Instead of providing programmers with a black or white choice between static or dynamic typing, we should instead strive for softer type systems. That is, static typing where possible, dynamic typing when needed. Unfortunately there is a discontinuity between contemporary statically typed and dynamically typed languages as well as a huge technical and cultural gap between the respective language communities. The problems surrounding hybrid statically and dynamically typed languages are largely not understood, and both camps often use arguments that cut no ice. We argue that there is no need to polarize the differences, and instead we should focus on leveraging the strengths of each side. Regards! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Opinions / Votes Needed
Per Jessen wrote: Nathan Rixham wrote: You can't have your cake and eat it. You can't/shouldn't have strong and loose typing in the same language. In my opinion. Instead of providing programmers with a black or white choice between static or dynamic typing, we should instead strive for softer type systems. That is, static typing where possible, dynamic typing when needed. Unfortunately there is a discontinuity between contemporary statically typed and dynamically typed languages as well as a huge technical and cultural gap between the respective language communities. I'm not sure whether to take you seriously now - you're quoting from a Microsoft research paper? :-) lol well picked up - for all I'm a linux fan M$ aren't all bad and hell they must have some very good programmers in the various teams, seems a shame to invalidate thier hard work and research just because they work for satan. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Opinions / Votes Needed
Tony Marston wrote: Skip Evans s...@bigskypenguin.com wrote in message news:49723137.2010...@bigskypenguin.com... Wow, Tony, do you think in the future you could try to express yourself with just a bit more civility and in a less condescending tone? Nathan expressed some thoughts he had, politely, and when out of his way to come across in a non-critical and non-confrontational manner. Tony Marston wrote: Absolute rubbish! There's just no need to insult other list members like this. Saying that someone's ideas are absolute rubbish is not an insult. Calling him a moron would be, but I did not. agreed, tone and meaning are so hard to convey using written words alone. (you did say I was feeble brained though..) Frankly, it's this kind of treatment that make these lists less productive than they could be. And you think that his ideas for changing PHP to suit his particular programming style would be productive? I think not. you think not; I know they'd raise my productivity in php somewhat and increase the scope where I can use php. It intimidates less experienced programmers from asking good questions, What makes you think that he is an inexperienced programmer? What makes you think that these are good questions? He is saying that he doesn't like the way that PHP works and wants it changed to suit his personal needs. inexperienced I am not, perfect I am not. all questions are good questions, how can things progress when nobody questions? I love the way currently php works and I'd like (and can see a need in certain circumstances for) a bit of optional functionality which would increase, yes my, productivity. I'm sure though if this can increase my productivity it can increase others as well - I'd like to hear from some of the spl_ and pdo_ devs on this, not to mention those who currently make orm's for php such as the one in symphony. lest they get treated the way Nathan was. And isn't helping out less experienced coders one of the reasons this list exists? And it also makes others less inclined to participate, or drop off the list entirely. If it stops feeble minded people from filling this forum with useless requests then surely that's a good thing? Personally I'm sick and tired from reading posts such as this which say I'm used to language X, and my feeble brain cannot cope with the differences, so why can't PHP be changed to behave like language X? there you go with the feeble minded again tony.. a: this wasn't a useless request, it was a request for opinions and votes. b: I'm used to PHP, it is my one of my current primary languages and has been for a long time; I help others with both simple and complex problems on this list and devote a hell of a lot of my personal time to helping people use php to do what they want. I am definately an advocate of php, contribute to open source projects and release packages which many thousands of people around the world use. I've also used many other languages and can see advantages and disadvantages to all of them; I'm not so niave or feeble minded to think that php is perfect the way it is, it's not - but it's a damn good language. c: nothing I'm suggesting would have any effect on you're php the cobol way approach, I can easily cope with the difference, can you comprehend that it wouldn't be changing any existing functionality only adding new *optional* functionality. PHP has support for objects and classes, right down to type hinting on arguments, exceptions, inheritance, reflection the whole lot - to add in the bits that are missing seems rather logical to me; thats why we've got the OO features that already exist. give me one good reason why optional type hinting / static typing of class properties and normal variables would be a bad thing? and another of how it would have any impact at all on you. It's NOT just so we can blast each other and show off our highly dubiously assumed superiority. With all the frustrations we put up with in our daily lives, I would hope a list like this, especially since we are among colleagues, could be a place we could at least cautiously expect to be treated with respect. Then the OP should respect PHP for what it is, and not request changes that would make it unusable for 99.999% of the millions of programmers who have already written millions of programs with it. PHP is successful because of the way it works, and changing the way it works, as suggested by the OP, would not make it more successful. On the contrary, I think that it would PHuck it up completely. But that's just my opinion. make it unusable for 99.999% of the millions of programmers who have already written millions of programs with it - eh.. read tony; OPTIONAL, this wouldn't have any impact or break any bc if done correctly - just like typehinting on methods didn't.. php would work the same, just add in some *optional* functionality for those who do need it, or
Re: [PHP] Re: Opinions / Votes Needed
Tony Marston wrote: Nathan Rixham nrix...@gmail.com wrote in message news:497354c3.9090...@gmail.com... Per Jessen wrote: Nathan Rixham wrote: point is.. Java let's me easily do 70% of what I need to PHP let's me easily do 95% of what I need to I'm curious - can you list what the 25% are? it lacks dynamic typing, the ability to procedural code and its precompiled not interpreted; all in a hello world in php is 10 seconds, in java it's nigh on 10 minutes. Hence why php is such a good language If we could get that 5% added then PHP would be perfect, not only that but me and the rest of the team at work would be able to make our multi-million pound enterprise projects in PHP instead of java; as would so many others (that can't be a bad thing for PHP) But why? Why not use Java and J2EE and all that good stuff? I'm not much of a java fan myself, but you've got to give credit where credit is due. well I can give two examples: Three other PHP Developers and myself spent the best part of a year creating a large multi-site event management system in PHP; the whole process was deeply frustrating primarily due to the lack of optional static typing and there in the lack of a solid ORM; with this small addition the whole process would have been a 6 month process if that, and a far more pleasurable experience. Really? In 2007 I single-handedly designed and built an ERP system with 130 database tables, 230 relationships and 1000 screens, all with PHP and without an ORM and static typing. This took me 6 months. If you can't equal that then either you are not much of a programmer, or your development style is not as good as you think it is. If other people can write perfectly good applications in PHP without the extra features that you say are indispensible then why can't you? clap clap, would you like to compare dick size? You have no idea of the size or scope of the applications I've developed by myself or as part of team tony, so why even attempt to comment? Why assume that I haven't written perfectly good applications in PHP and that incapable of it when the opposite is true. Again tony, nobody is knocking php simply saying that in some scenarios development time could be speeded up by adding in static typing; perhaps you've not came accross this but I and others have. Currently 7 other Java developers and myself are building a large multisite transportation management and ticketing system in Java, this is a 9 month project with a decent sized and very skilled team; because of the lack of static typing (and thus the lack of development tools and frameworks/orms for PHP) we've had to go with Java; TBH the static typing is only needed on the domain model and the api layer, the bulk of the business logic in between where the majority of the work comes in, would be a great deal easier using a mix of procedural code and dynamic typing. I'd argue that again the development time of this project could be halfed if it was done in PHP AND if in PHP had support for optional static typing coupled with a good ORM. If you want a good ORM then write one yourself, or is that beyond your capabilities? already am tony, and have spotted areas where by adding optional static typing: a: it could be improved b: code could be optimized c: development time could be considerably reduced Personally I wouldn't touch an ORM with a barge pole. I develop applications using the 3 Tier Architecture (no, it's not the same as MVC) with a Data Access layer that I can easily switch between MySQL, PostgreSQL and Oracle. If I can do it then why can't you? likewise, although I would touch an ORM in certain cases (but not with your barge pole), frequently use modified n-tier or the good ol 3 tier architecture with preference going to using a class based oo paradigm rather than a prototype style, and have written many data access and persistance layers which can switch between different RDBMS both pre pdo and post pdo. If I can see the need for this.. why can't you? weg Further the difference between precompilation and interpretation is v noticable when it comes to rolling applications out, often in development you want to run a hlaf built or broken application to see what happens and check if parts x y and z are good + to test your infrastructure; when you can't compile and do this testing becuase the app isn't bug free or completed it's rather limiting. Sometimes unit tests just don't cover what you need. Additionally, rather sure you'd see a mass influx of people moving to php, and applications created for it - even down to design tools such as reverse and forward engineering between uml and php. ack.. there's a tonne of amazing tools and frameworks for java, and I'm sure that a vast majority of them are possible because of this static typing (from orms to web service frameworks and all in between) - am I so bad for wanting that for php and my fellow devs? No, you're not so
Re: [PHP] Re: Opinions / Votes Needed
Tony Marston wrote: Nathan Rixham nrix...@gmail.com wrote in message news:497366f5.2030...@gmail.com... Tony Marston wrote: Skip Evans s...@bigskypenguin.com wrote in message news:49723137.2010...@bigskypenguin.com... Wow, Tony, do you think in the future you could try to express yourself with just a bit more civility and in a less condescending tone? Nathan expressed some thoughts he had, politely, and when out of his way to come across in a non-critical and non-confrontational manner. Tony Marston wrote: Absolute rubbish! There's just no need to insult other list members like this. Saying that someone's ideas are absolute rubbish is not an insult. Calling him a moron would be, but I did not. agreed, tone and meaning are so hard to convey using written words alone. (you did say I was feeble brained though..) Frankly, it's this kind of treatment that make these lists less productive than they could be. And you think that his ideas for changing PHP to suit his particular programming style would be productive? I think not. you think not; I know they'd raise my productivity in php somewhat and increase the scope where I can use php. It intimidates less experienced programmers from asking good questions, What makes you think that he is an inexperienced programmer? What makes you think that these are good questions? He is saying that he doesn't like the way that PHP works and wants it changed to suit his personal needs. inexperienced I am not, perfect I am not. all questions are good questions, how can things progress when nobody questions? I love the way currently php works and I'd like (and can see a need in certain circumstances for) a bit of optional functionality which would increase, yes my, productivity. I'm sure though if this can increase my productivity it can increase others as well - I'd like to hear from some of the spl_ and pdo_ devs on this, not to mention those who currently make orm's for php such as the one in symphony. lest they get treated the way Nathan was. And isn't helping out less experienced coders one of the reasons this list exists? And it also makes others less inclined to participate, or drop off the list entirely. If it stops feeble minded people from filling this forum with useless requests then surely that's a good thing? Personally I'm sick and tired from reading posts such as this which say I'm used to language X, and my feeble brain cannot cope with the differences, so why can't PHP be changed to behave like language X? there you go with the feeble minded again tony.. a: this wasn't a useless request, it was a request for opinions and votes. Yes, I think that any programmer who wants to change PHP so that it looks and feels more like his current language of choice simply because he cannot cope with the differences is feeble minded. but tony.. PHP is my current language of choice.. b: I'm used to PHP, it is my one of my current primary languages and has been for a long time; I help others with both simple and complex problems on this list and devote a hell of a lot of my personal time to helping people use php to do what they want. I am definately an advocate of php, contribute to open source projects and release packages which many thousands of people around the world use. I've also used many other languages and can see advantages and disadvantages to all of them; I'm not so niave or feeble minded to think that php is perfect the way it is, it's not - but it's a damn good language. c: nothing I'm suggesting would have any effect on you're php the cobol way approach, I can easily cope with the difference, can you comprehend that it wouldn't be changing any existing functionality only adding new *optional* functionality. As others have already pointed out it would simply not be feasible to change PHP so that it can be switched between dynamic typing to static typing at the flick of a switch. PHP is dynamicly typed, so either get used to it or switch to a different language. flick of a switch? I'd be suggesting fully implemented optional code. php is dynamically typed WITH type hinting on methods, this would just be type hinting on variables as well. why switch when a: php could have this implemented b: I'm capable of using multiple languages and picking the correct one for each scenario. c: there is a gap between dynamic and statically typed languages that php already addresses in part with typehinting on methods, it could fully address this gap easily and be the best of both world for strict and dynamic typers, just like it pretty much does for procedural and oo coders. ps: already am used to it, will continue to be, but would like to see it implemented. pps: rar rar rar tony, are you tony the tiger from that breakfast cerial? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Opinions / Votes Needed
Jochem Maas wrote: Per Jessen schreef: Nathan Rixham wrote: Per Jessen wrote: Nathan Rixham wrote: You can't have your cake and eat it. You can't/shouldn't have strong and loose typing in the same language. In my opinion. Instead of providing programmers with a black or white choice between static or dynamic typing, we should instead strive for softer type systems. That is, static typing where possible, dynamic typing when needed. Unfortunately there is a discontinuity between contemporary statically typed and dynamically typed languages as well as a huge technical and cultural gap between the respective language communities. I'm not sure whether to take you seriously now - you're quoting from a Microsoft research paper? :-) lol well picked up - for all I'm a linux fan M$ aren't all bad and hell they must have some very good programmers in the various teams, seems a shame to invalidate thier hard work and research just because they work for satan. Completely agree, I just thought I'd score an easy point ... +1 to you both :-) omfg positivety returns to the list :-D cheers guys! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Opinions / Votes Needed
Tony Marston wrote: Nathan Rixham nrix...@gmail.com wrote in message news:49737051.9080...@gmail.com... Tony Marston wrote: Nathan Rixham nrix...@gmail.com wrote in message news:497366f5.2030...@gmail.com... Tony Marston wrote: Skip Evans s...@bigskypenguin.com wrote in message news:49723137.2010...@bigskypenguin.com... Wow, Tony, do you think in the future you could try to express yourself with just a bit more civility and in a less condescending tone? Nathan expressed some thoughts he had, politely, and when out of his way to come across in a non-critical and non-confrontational manner. Tony Marston wrote: Absolute rubbish! There's just no need to insult other list members like this. Saying that someone's ideas are absolute rubbish is not an insult. Calling him a moron would be, but I did not. agreed, tone and meaning are so hard to convey using written words alone. (you did say I was feeble brained though..) Frankly, it's this kind of treatment that make these lists less productive than they could be. And you think that his ideas for changing PHP to suit his particular programming style would be productive? I think not. you think not; I know they'd raise my productivity in php somewhat and increase the scope where I can use php. It intimidates less experienced programmers from asking good questions, What makes you think that he is an inexperienced programmer? What makes you think that these are good questions? He is saying that he doesn't like the way that PHP works and wants it changed to suit his personal needs. inexperienced I am not, perfect I am not. all questions are good questions, how can things progress when nobody questions? I love the way currently php works and I'd like (and can see a need in certain circumstances for) a bit of optional functionality which would increase, yes my, productivity. I'm sure though if this can increase my productivity it can increase others as well - I'd like to hear from some of the spl_ and pdo_ devs on this, not to mention those who currently make orm's for php such as the one in symphony. lest they get treated the way Nathan was. And isn't helping out less experienced coders one of the reasons this list exists? And it also makes others less inclined to participate, or drop off the list entirely. If it stops feeble minded people from filling this forum with useless requests then surely that's a good thing? Personally I'm sick and tired from reading posts such as this which say I'm used to language X, and my feeble brain cannot cope with the differences, so why can't PHP be changed to behave like language X? there you go with the feeble minded again tony.. a: this wasn't a useless request, it was a request for opinions and votes. Yes, I think that any programmer who wants to change PHP so that it looks and feels more like his current language of choice simply because he cannot cope with the differences is feeble minded. but tony.. PHP is my current language of choice.. If it is your language of choice the it must be better than the alernatives. So if it is better then why are you saying that it is virually unusable without the improvements that you have suggested? it's very usable tony and is beter than the alternatives (for developing server side web applications fitting most common specs [imho]); but the improvements I've suggested would make it more usable (ie allow me to use php more efficiently in even more scenarios). Been able to use php to make almost everything needed so far; but sometimes it does feel a bit hacky and sometimes I can see how a specific part of the entire app could be made better in another language). Perhaps this addresses something per jesson said as well actually. There is often a case where php suits 75% of the application while the remaning 25% would be better suited in another language; in this scenario often the two can't be seperated and thus rather than coding around the functionality lacking it would be preferable to have the limitation addressed in the language (if possible). how non confrontational was that :p! b: I'm used to PHP, it is my one of my current primary languages and has been for a long time; I help others with both simple and complex problems on this list and devote a hell of a lot of my personal time to helping people use php to do what they want. I am definately an advocate of php, contribute to open source projects and release packages which many thousands of people around the world use. I've also used many other languages and can see advantages and disadvantages to all of them; I'm not so niave or feeble minded to think that php is perfect the way it is, it's not - but it's a damn good language. c: nothing I'm suggesting would have any effect on you're php the cobol way approach, I can easily cope with the difference, can you comprehend that it wouldn't be changing any existing functionality only adding new *optional
Re: [PHP] Re: Opinions / Votes Needed
Tony Marston wrote: Stuart stut...@gmail.com wrote in message news:a5f019de0901181015g5e2db21fn2782839ab9648...@mail.gmail.com... 2009/1/18 Tony Marston t...@marston-home.demon.co.uk: Nathan Rixham nrix...@gmail.com wrote in message news:497366f5.2030...@gmail.com... Tony Marston wrote: Skip Evans s...@bigskypenguin.com wrote in message news:49723137.2010...@bigskypenguin.com... Wow, Tony, do you think in the future you could try to express yourself with just a bit more civility and in a less condescending tone? Nathan expressed some thoughts he had, politely, and when out of his way to come across in a non-critical and non-confrontational manner. Tony Marston wrote: Absolute rubbish! There's just no need to insult other list members like this. Saying that someone's ideas are absolute rubbish is not an insult. Calling him a moron would be, but I did not. agreed, tone and meaning are so hard to convey using written words alone. (you did say I was feeble brained though..) Frankly, it's this kind of treatment that make these lists less productive than they could be. And you think that his ideas for changing PHP to suit his particular programming style would be productive? I think not. you think not; I know they'd raise my productivity in php somewhat and increase the scope where I can use php. It intimidates less experienced programmers from asking good questions, What makes you think that he is an inexperienced programmer? What makes you think that these are good questions? He is saying that he doesn't like the way that PHP works and wants it changed to suit his personal needs. inexperienced I am not, perfect I am not. all questions are good questions, how can things progress when nobody questions? I love the way currently php works and I'd like (and can see a need in certain circumstances for) a bit of optional functionality which would increase, yes my, productivity. I'm sure though if this can increase my productivity it can increase others as well - I'd like to hear from some of the spl_ and pdo_ devs on this, not to mention those who currently make orm's for php such as the one in symphony. lest they get treated the way Nathan was. And isn't helping out less experienced coders one of the reasons this list exists? And it also makes others less inclined to participate, or drop off the list entirely. If it stops feeble minded people from filling this forum with useless requests then surely that's a good thing? Personally I'm sick and tired from reading posts such as this which say I'm used to language X, and my feeble brain cannot cope with the differences, so why can't PHP be changed to behave like language X? there you go with the feeble minded again tony.. a: this wasn't a useless request, it was a request for opinions and votes. Yes, I think that any programmer who wants to change PHP so that it looks and feels more like his current language of choice simply because he cannot cope with the differences is feeble minded. And I think any participant on this list who cannot reasonably respond to perfectly reasonable suggestions In case you have forgotten what this thread is about, the OP gave a list of suggested improvements to PHP and asked for opinions. I merely gave my opinion that these improvements would be a waste of time as they would add nothing to the language (IMHO, of course). How many in this frum have expressed any support for any of these improvements? you know; other than type hinting of primatives and the ability to type hint that a method argument - no they haven't; which has actually really suprised me tbh - I was just thinking if I compeltely renamed and simplified the post what the outcome would be.. I think it may be suprising, people can be very fickle over terminology (and change). without resorting to child-like name-calling should reconsider their personal brand. Every time I see you contribute to this list you manage to lessen the respect I have for you as a person nevermind as a developer. PHP would not have the OO capabilities it has if developers hadn't compared it to other languages and said yes, that would be a useful addition. Improvements don't happen without inspiration, and definitely won't happen if people feel threatened when they make suggestions. b: I'm used to PHP, it is my one of my current primary languages and has been for a long time; I help others with both simple and complex problems on this list and devote a hell of a lot of my personal time to helping people use php to do what they want. I am definately an advocate of php, contribute to open source projects and release packages which many thousands of people around the world use. I've also used many other languages and can see advantages and disadvantages to all of them; I'm not so niave or feeble minded to think that php is perfect the way it is, it's not - but it's a damn good language. c: nothing I'm suggesting would have any effect
[PHP] optional type hinting enhancements
Hi All, preface: Having discussed at great length previously and probably completely misnaming and thus misleading the conversation here goes again. question: Would anybody else like to see, or feel the need for, *optional* type hinting of variables and class properties in PHP? examples (all optional, and syntax may differ): class Example { private TypeHint $var; } Example $var = new Example(); in addition the ability to type hint primatives/scalars/[type object] in the existing implementation: function(bool $flag) { } function(object $flag) { } This would all be under the assumption and proviso that an implementation would not break bc, have any markable perfomance hit, or in any other way effect existing applications or new applications that did not use the functionality (in the same way the existing type hinting implementation doesn't) Any +1's? Regards. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Project management systems
Skip Evans wrote: Hey all (except Tony), treat others how you want them to treat you *passes all his biscuits* - yet lol. I've been using dotProject for a few years now and have been quite happy with it, and have written my own invoicing module, and a few other mods for the way I track hours for subcontractors, etc. condolences But it has trouble with MySQL 5 and from the Googling I've done it doesn't seem likely it will be fixed soon. Besides, I've hacked my install up quite a bit and if I were to upgrade there'd trouble 'a foot, ya'll. maybe you'd be best fixing it yourself OR not upgrading to mysql 5? I'm considering switching to something else, and the start of a new year would be a good time since my subs have all been given their 10-99s so I can start fresh. really.. good luck and please let me know what you choose Suggestions for a PHP based PM system? I'd like to be able to make mods so PHP is the logical choice since it's the language I know best, and as Tony will tell you, it's perfect and doesn't need no feeble minded Java guys trying to improve it. . Basic requirements are time tracking for multiple coders, generating invoices per project based on start and end date (I bill the 15th and last day of each month). Gee, I guess that's the basics. Thoughts, opinions, corrections to grammar? not every ones cup of tea but rally agile development [http://www.rallydev.com/] if you don't do anything else with this link please watch this: http://www.rallydev.com/5601_Rally_15.html than consider what you want from a project management system. in all honesty though, no I can't - none seem to fit the bill completly and in every place I've ever worked, and personally, picking a good project management system has always been a major stumbling block / problem -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] optional type hinting enhancements
Jochem Maas wrote: Nathan Rixham schreef: Hi All, preface: Having discussed at great length previously and probably completely misnaming and thus misleading the conversation here goes again. question: Would anybody else like to see, or feel the need for, *optional* type hinting of variables and class properties in PHP? examples (all optional, and syntax may differ): class Example { private TypeHint $var; } Example $var = new Example(); in addition the ability to type hint primatives/scalars/[type object] in the existing implementation: function(bool $flag) { } function(object $flag) { } This would all be under the assumption and proviso that an implementation would not break bc, have any markable perfomance hit, or in any other way effect existing applications or new applications that did not use the functionality (in the same way the existing type hinting implementation doesn't) Any +1's? can I give a +1 for you making a request to start a RFC on the matter ... I'm sure LKS will give you perms to set up one on wiki.php.net/rfc. lukas, thoughts? [ini proposals coming in a minute, just diff'ing] some of your ideas have merit, some maybe not, others are likely to be impossible to implement from a performance technical POV. either way, having a work-in-progress RFC for these ideas would give a solid point of reference for discussion. all/any of your ideas have much more chance of making inroads if implementation/BC/performance/syntax details/proposals are properly documented. agreed and thanks for the idea. I think adhoc discussion via the mailing list leads generally nowhere with this type of thing, there is too much noise and it's nigh on impossible to grok where the status quo is at or what current the proposal might be. noticed that one; which is a shame tbh; alas.. some of your points lean purely to making php more consistent, they may even be self-evident (e.g. completion of things your able to typehint) but nonetheless even that needs solid argumentation in order to win the minds of the guys that will/may end up implementing it. RFC is the way to go. I for one would gladly take time to read/review/comment, if nothing else it's interesting. interesting it is; it's a shame the evangalism list died a death [not sure why i see that as related, but i do] actually thinking about it you might consider thinking in terms of a collection of RFC's (your ideas cover quite a lot of ground/scope) in order to maintain tight focus. agreed, probably - enhancing / completing existing type hinting - single superclass which all objects extend - optional type hinting for variables and class parameters - optional type hinting for return types (mind you thats already rfc'd) - additional magic method __cast (needs more thought) - constructor overloading - generics and templates [i jest] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] optional type hinting enhancements
Török Alpár wrote: I see a problem with this. Scalars are automatically casted by PHP based on a set of rules. In case of a scalar type hint, would jo issue an error, or make the automatic type cast? both approaches have there advantages, but the automatic cast, would go better with the actual features of the language, but in this case, object could also cast an array to stdClass, and i am not sure that's how you imagined it. Besides this i am not against it along as it doens't create implementaion nor performance problems, and this problem is solved. I see what you mean with the casts; and a very good point on why scalars aren't already implemented.. On the one hand i see scope for a set of primative wrappers (class String, Integer, Boolean etc) which those who wished could use (with an auto cast). Whilst on the other hand it could be argued that the current is_xxx functionality could be copied so an integer in a string is still a string, likewise 1 is an integer not a boolean true etc etc. defintaly needs some thought and practical examples though.. rfc time one thinks. with the specific array example, this is already implemented so no problems there, what is not implemented though is the ability to function(object $obj) which seems strange. as for the error, same as it is currently E_RECOVERABLE_ERROR and def not automatic type casting; last thing you want when trying to be strict is anything like that :p thanks for the input! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Opinions / Votes Needed
Tony Marston wrote: Stuart stut...@gmail.com wrote in message news:a5f019de0901181322i2a4cbfaam4d36eff843f42...@mail.gmail.com... 2009/1/18 Tony Marston t...@marston-home.demon.co.uk: In case you have forgotten what this thread is about, the OP gave a list of suggested improvements to PHP and asked for opinions. I merely gave my opinion that these improvements would be a waste of time as they would add nothing to the language (IMHO, of course). How many in this frum have expressed any support for any of these improvements? That's not the point. You attacked the suggester not the suggestions. That's all I'm trying to point out. There's a way to disagree in a reasonable manner. Anybody who suggests that PHP be changed from dynamic typing to static typing is feeble minded, one brick short of a full load, one sandwich short of a picnic, off his trolley, talking out of the wrong end of his alimentary canal, etc, etc. In my humble opinion, of course. luckily.. nobody suggested that and the only person who came close was tony himself :D perhaps the phrase optional type hinting of variables and class properties is more appropriate ;) not be feasible covers loss of performance, loss of BC and a whole bunch of other issues. If the cost of implementing your improvements is not worth the dubious benefit then why should they considered? Without adequate investigation or comment from people who actually know about this stuff it's impossible to say whether the costs are too great to make them acceptable against the benefits. OO had a massive negative effect on performance, but it still happened because the benefits greatly outweighed the costs. IMHO all ideas should be properly considered, regardless of my gut reaction to them. Statuic typing is unworthy of consideration in a language whch has made its bones from being dynamically typed. In my humble opinion, of course. luckily.. nobody suggested that and the only person who came close was tony himself :D perhaps the phrase optional type hinting of variables and class properties is more appropriate ;) ground hog day! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] optional type hinting enhancements
question: Would anybody else like to see, or feel the need for, *optional* type hinting of variables and class properties in PHP? This would all be under the assumption and proviso that an implementation would not break bc, have any markable perfomance hit, or in any other way effect existing applications or new applications that did not use the functionality (in the same way the existing type hinting implementation doesn't) scrap that seems like it is impossible; only thing that may be remotely possible is scalar type hinting. not worth the debating convo's were fun though; thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Opinions / Votes Needed
Stuart wrote: Also, PHP is procedural with OO capabilities due to its history never understood this comment more - wish I'd given it more thought when it stuck out the first time. - cheers stut time4work! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Secure redirection?
Zoran Bogdanov wrote: 1.When the user is successfully authenticated the login.php sends the header, but the AJAX XMLHttpRequest call is still in progress waiting for a PHP response. So when PHP using the header function redirects to another page that page is outputed to the login form... you are only redirecting the ajax request not the entire page, you need to send back a command to javascript that tells javascript to redirect the page. there are many ways around this, none of them involve using a server side redirect, it's a client side redirect you need. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How serialize DOMDocument object?
Михаил Гаврилов wrote: How serialize DOMDocument object? describe: serialize — Generates a storable representation of a value note: It is not possible to serialize PHP built-in objects. see: http://uk2.php.net/serialize solve: $s = DOMDocument-saveXML(); // serialized DOMDocument-loadXML($s); // unserialize or if you really want to use serialize function $s = DOMDocument-saveXML(); serialize($s); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] developers life
well just for the hell of it; and because I'm feeling worn.. anybody else find the following true when you're a developer? - frequent bursts of side-tracking onto more interesting subjects - vast amount of inhuman focus, followed by inability to remain focussed - general tendancy to keep taking on projects, often for no good reason - inability to flip out of work mode at 5pm like the rest of the world -- [sub] not feeling normal unless worked you've extra; while other professions demand overtime as little as an extra 15 minutes - constant learning (positive thing) - unlimited skill scope, if its on a computer you'll give it a go - amazing ability to prioritise (the wrong things) - all projects suddenly become uninteresting and all motivation is lost at approx 65-85 percent completion - the code seems more important than the app (even though its not) - lots more but lost interest / focus ps: expectantly installed windows 7 over the weekend, brief moment of excitement coupled with the thought i wonder what it's like; anticlimax + reality check, it was just a taskbar, start menu and desktop.. you'd think I'd know by now. regards :-) i so have more important things to do -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to use SVN + PHP
Edmund Hertle wrote: Hey, I'm thinking about implementing Subversion to an existing php project for obvious reasons. But I have some trouble when thinking about the usage. there are lots of ways of using svn and I'm sure you'll get different opinions.. personally I always create a script to deploy to live.. just a little bash script that prompts me for the version number to use, then it scp's the files over in a second. as for the development process; normally I develop and test locally, then when happy scp from svn to staging site, then when clients happy scp to live site (with scripts, and version tagging in svn). Next problem: While writing new code there are many small bugs like used an array instead of an string or other way round forgotten parameters and so on. Usually there are quite some file transfers until some piece of code works quite well. But with the method above all these versions would end up being in the rep and kind of polluting it. To solve this I thought about just creating a branch with every work cycle (so after updating until committing a working version) and than while committing also merging it back with current trunk/branch... well the idea of svn is that should you find a problem you either rollback the file(s) to the good version (not rollback the whole site) or you commit updated files with the fix, then redeploy. No need to branch or such like. maybe more importantly.. you shouldn't really be getting to production live with these errors (you always will at some point) - perhaps you want to look at unit testing, and even continuous integration/building while you're there. ps: pdt-eclipse is great, you can integrate it right in with svn for handy diff's, commits, updates etc (and svn in with bugzilla, mylyn loads more..) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] developers life
I'm not alone then (didn't think so :p) Ashley Sheridan wrote: On Mon, 2009-01-19 at 21:28 +, Nathan Rixham wrote: well just for the hell of it; and because I'm feeling worn.. anybody else find the following true when you're a developer? - frequent bursts of side-tracking onto more interesting subjects yes, but it tends to be side-tracking to what management thinks is more important; which usually isn't! so true - worse yet, a client with a comittee! - vast amount of inhuman focus, followed by inability to remain focussed yes, and coffee can only go so far! - general tendancy to keep taking on projects, often for no good reason yes, I'm a sucker really, and can't seem to say no to people - inability to flip out of work mode at 5pm like the rest of the world yes, i work a lot on the commute to/from work :-/ -- [sub] not feeling normal unless worked you've extra; while other professions demand overtime as little as an extra 15 minutes - constant learning (positive thing) yep - unlimited skill scope, if its on a computer you'll give it a go not too sure about actual skill scope, but like many a man, i'll give it a go, even if I know I don't know what I'm doing! - amazing ability to prioritise (the wrong things) yes, albeit aided immensely by management! - all projects suddenly become uninteresting and all motivation is lost at approx 65-85 percent completion yeah, funny that! - the code seems more important than the app (even though its not) what's usability again? - lots more but lost interest / focus hehe ps: expectantly installed windows 7 over the weekend, brief moment of excitement coupled with the thought i wonder what it's like; anticlimax + reality check, it was just a taskbar, start menu and desktop.. you'd think I'd know by now. go linux ;) i am at work, but at home virtualbox for all your multi-os needs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] developers life
Robert Cummings wrote: On Mon, 2009-01-19 at 21:28 +, Nathan Rixham wrote: well just for the hell of it; and because I'm feeling worn.. anybody else find the following true when you're a developer? - frequent bursts of side-tracking onto more interesting subjects - vast amount of inhuman focus, followed by inability to remain focussed - general tendancy to keep taking on projects, often for no good reason - inability to flip out of work mode at 5pm like the rest of the world -- [sub] not feeling normal unless worked you've extra; while other professions demand overtime as little as an extra 15 minutes - constant learning (positive thing) - unlimited skill scope, if its on a computer you'll give it a go - amazing ability to prioritise (the wrong things) - all projects suddenly become uninteresting and all motivation is lost at approx 65-85 percent completion - the code seems more important than the app (even though its not) - lots more but lost interest / focus Are you an INTP? http://www.personalitytest.net/cgi-bin/q.pl thanks for that rob, but predicatably I've got to number 26 and stopped - penetrating insight, lol sidenote: wonder what the results would be if we all got our respective other halfs to complete it for us. [for those of you without, you're manager will do] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] developers life
Robert Cummings wrote: On Mon, 2009-01-19 at 21:53 +, Nathan Rixham wrote: Robert Cummings wrote: On Mon, 2009-01-19 at 21:28 +, Nathan Rixham wrote: well just for the hell of it; and because I'm feeling worn.. anybody else find the following true when you're a developer? - frequent bursts of side-tracking onto more interesting subjects - vast amount of inhuman focus, followed by inability to remain focussed - general tendancy to keep taking on projects, often for no good reason - inability to flip out of work mode at 5pm like the rest of the world -- [sub] not feeling normal unless worked you've extra; while other professions demand overtime as little as an extra 15 minutes - constant learning (positive thing) - unlimited skill scope, if its on a computer you'll give it a go - amazing ability to prioritise (the wrong things) - all projects suddenly become uninteresting and all motivation is lost at approx 65-85 percent completion - the code seems more important than the app (even though its not) - lots more but lost interest / focus Are you an INTP? http://www.personalitytest.net/cgi-bin/q.pl thanks for that rob, but predicatably I've got to number 26 and stopped - penetrating insight, lol Then your not INTP enough :) An INTP would want to know. Cheers, Rob. i do.. it's still open in a tab :-) sidetracked -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] developers life
Robert Cummings wrote: On Mon, 2009-01-19 at 21:53 +, Nathan Rixham wrote: Robert Cummings wrote: On Mon, 2009-01-19 at 21:28 +, Nathan Rixham wrote: well just for the hell of it; and because I'm feeling worn.. anybody else find the following true when you're a developer? - frequent bursts of side-tracking onto more interesting subjects - vast amount of inhuman focus, followed by inability to remain focussed - general tendancy to keep taking on projects, often for no good reason - inability to flip out of work mode at 5pm like the rest of the world -- [sub] not feeling normal unless worked you've extra; while other professions demand overtime as little as an extra 15 minutes - constant learning (positive thing) - unlimited skill scope, if its on a computer you'll give it a go - amazing ability to prioritise (the wrong things) - all projects suddenly become uninteresting and all motivation is lost at approx 65-85 percent completion - the code seems more important than the app (even though its not) - lots more but lost interest / focus Are you an INTP? http://www.personalitytest.net/cgi-bin/q.pl thanks for that rob, but predicatably I've got to number 26 and stopped - penetrating insight, lol Then your not INTP enough :) An INTP would want to know. Cheers, Rob. and finished in 3 sessions: Your personality type is INTP shock -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] developers life
Bastien Koert wrote: always, flex php at the moment ahh great to read, flex is amazing, the best product to hit the developers market in years IMHO, coupled with XMPP (say openfire) it's great as well - there's something about flex and xmpp.. say if you were to implement a kind of http over xmpp and use it in flex.. hell you'd have a lightweight stateful persistent client server xml based stream to play with and could kiss byebye to all that crappy dhtml/ajax polling business forever.. anyhow some others i enjoyed learning include apache solr, opencalais, arc2 (rdf and sparql), yahoo api's, (more) uml (but easy to get too side tracked with), exploring all the eclipse plugins, wso2 wsf and lots more -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] developers life
c...@l-i-e.com wrote: ESTJ Apparently, it's time for me to take on a project manager job and quit coding... Oddly enough, I've been thinking I might like to do that, though more of an architect/manager role, really... didn't you already make that change when you became ceo of an intergalactic enterprise company mr lynch? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to use SVN + PHP
Edmund Hertle wrote: 2009/1/19 Nathan Rixham nrix...@gmail.com well the idea of svn is that should you find a problem you either rollback the file(s) to the good version (not rollback the whole site) or you commit updated files with the fix, then redeploy. No need to branch or such like. Well, yes, of course there also will be bugs in good versions but I think it should more be like: Well, there is a bug.. maybe switch 2 or 3 revisions back and than we see and not like Oh, a bug. maybe 100 - 150 revisions back, which were all created yesterday ahh but the whole code base has gone up by say 100 revisions so full site version number is 800, however the current version of faulty file is 589 and the previous version of that file is 453, you only revert that particular file.. not the whole code base, then recommit making the full site version 801, without loosing any other work :) By locally created and tested scripts you will of course not have those probs because you're not comitting everything. But locally developing brings some kind of care-taking like making sure you use everywhere the same version (php, mysql, webserver), installed the same extensions, have the same php.ini, than there the whole database... and php is not my main work ;) but committing to svn is not updating the site, it's just storing changes so you can rollback version control you don't release every version, just the stable one.. so your live code base never changes unless you specifically and manually do it (or make a script to do it that you control) I thought with using maybe another branch all those 100-150 revisions are stored away and the main branch is than again more like, well going back 1-2 revisions is equal to 1-2 days of work. see above, you don't have to roll back a whole sites version, just the specific file in question, the rest of the code base stays the same.. or better yet diff the current faulty version of the file with previous versions of it, find what changed then fix and commit. either aproach works - important thing is each file is independent so you don't loose changes to all files unless you rollback the whole site (think I've made that clear now :p) maybe more importantly.. you shouldn't really be getting to production live with these errors (you always will at some point) - perhaps you want to look at unit testing, and even continuous integration/building while you're there. all those talking was only about the developing server. Unit testing I heard of but not really understand how to use and what excatly unit testing does. perhaps i wasn't clear, svn is a repository system, version control, you don't run a site off it, you use it to keep track fo your files and changes to them, controlling the versions. when you're happy you can just ftp away like normal, or as i mentioned scp the files straight from server to server. ps: pdt-eclipse is great, you can integrate it right in with svn for handy diff's, commits, updates etc (and svn in with bugzilla, mylyn loads more..) yes, I'm already using pdt-eclipse with subclipse. What's mylyn about? (again heard of ;) ) in short, task manager for eclipse which integrates with bug tracking software, very nice features such as remembering what code you where using for each task, so you can switch tasks and the files in view will swap dependant on tasks, probably best checking the site and demo videos around the net for more info. And btw: what is scp? scp - secure copy, command line tool for securely copying files from server to server [http://en.wikipedia.org/wiki/Secure_copy] in short: scp -r /var/sitename/www/* u...@sitename.com/var/www/ will copy all the files in /var/sitename/www over to folder /var/www on server sitename.com; but in a few seconds as it uses server to server transport AND is much faster than ftp.. so instead of ftping a site which can take ages, it just takes seconds to rollout a whole new site, or rollback to a previous version :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Installation problems on Vista
lucson pierre-charles wrote: I am having problems installing the zip package (PHP5) on Windows Vista. The output will not come on the browser upon testing. Only the code is being output to the browser. Apache (Apache 2) was properly installed. Your assistance please. Regards, Lucson check the php.ini setting for short_tags - quite sure it will be off and that you are using short tags in your php scripts ? rather than ?php - either change the ini setting to off or change you're scripts to use ?php instead. should fix it :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to use SVN + PHP
sorry i commented in all the wrong places :| Edmund Hertle wrote: By locally created and tested scripts you will of course not have those probs because you're not comitting everything. But locally developing brings some kind of care-taking like making sure you use everywhere the same version (php, mysql, webserver), installed the same extensions, have the same php.ini, than there the whole database... and php is not my main work ;) you don't have to locally develop, you can develop however you want :) svn is just version controlling all your files to make it easier to team work and to rollback code. you then tag good versions of the code in svn so you have a permanent easy to access good version of the site (which you then copy and do what you want with, download, ftp whatever) keeps you safe :) it's kind of like taking a zip/backing up the site everytime it's error free - but on steriods. all those talking was only about the developing server. Unit testing I heard of but not really understand how to use and what excatly unit testing does. unit testing is where you write tests for each small section of code, say each function or object/method - you write a test so you know the code works, then when you change anything in the code you can run the test again and if it fails.. well you have a bug - way more too it so see: http://en.wikipedia.org/wiki/Unit_testing I'd recommend: http://www.phpunit.de/ however simply writing tests for your code yourself is a good start - something somewhere on the internet says: whenever you feel like writing a print_r or var_dump or echo'ing a variable, don't - write a test instead - not always practical but still good thinking. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] developers life
c...@l-i-e.com wrote: Apparently, it's time for me to take on a project manager job and quit coding... Oddly enough, I've been thinking I might like to do that, though more of an architect/manager role, really... didn't you already make that change when you became ceo of an intergalactic enterprise company mr lynch? I think you're confusing my day job with my real life. tm :-) Note that bottle-washer AT works equally well for the address at my own domain. catch-all? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: 64bit vs. 32bit
dbrooke wrote: Hello, I am interested in hearing opinions about if there are reasons to stay with a 32bit php/apache if there is 64bit options available. What are the pros/cons in running in the different architectures? (Fat Binary apache2, *nix platform) Thanks, Donovan just to add in; I use 64 bit vista and ubuntu at home (on quadcore), php works fine - likewise at work 64 bit on linux with amd processor - all fine. one note though.. maybe I'm missing but there isn't a php 64 bit (official) release? maybe there is and I'm blind. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: developers life
Ross McKay wrote: On Mon, 19 Jan 2009 21:28:05 +, Nathan Rixham wrote: well just for the hell of it; and because I'm feeling worn.. anybody else find the following true when you're a developer? [...] Yes. well.. so its common to developers in uk, usa, canada, australia, everywhere really it seems. there goes my idea of moving to another country, keeping the same line of work and hoping it changes. bahhumbug -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: developers life
Kyle Terry wrote: On Mon, Jan 19, 2009 at 3:22 PM, Nathan Rixham nrix...@gmail.com wrote: Ross McKay wrote: On Mon, 19 Jan 2009 21:28:05 +, Nathan Rixham wrote: well just for the hell of it; and because I'm feeling worn.. anybody else find the following true when you're a developer? [...] Yes. well.. so its common to developers in uk, usa, canada, australia, everywhere really it seems. there goes my idea of moving to another country, keeping the same line of work and hoping it changes. bahhumbug I guess you're just stuck in what ever country you're in! must be the de-veloper thing.. the de is so negative, need to change the world [typo - i mean word - but seemed apt to leave it in] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to use SVN + PHP
Edmund Hertle wrote: 2009/1/20 Nathan Rixham nrix...@gmail.com you don't have to locally develop, you can develop however you want :) svn is just version controlling all your files to make it easier to team work and to rollback code. you then tag good versions of the code in svn so you have a permanent easy to access good version of the site (which you then copy and do what you want with, download, ftp whatever) keeps you safe :) Yeah, I think I mix up (web)server and rep some times... But to point out an example: There is a script on the (develop) webserver, the same locally and of course in the rep. So I start working on the local copy and now want to try it. So what should I do? Copying directly to the webserver, testing and than later after some more work commit to the rep? Or other way: Start working on script, commit to rep, than update (develop)webserver, than testing? how you get the script to testing is up to you; as for svn commit frequently and often, the more versions you have in svn the better, every time you add to svn you have a backup. I commit to branch overy time i hit save, i commit to trunk everytime there is no errors. (thats just me though - how you use is up to you, the question is do you see benefit to using source control/svn, if yes, use it however you want) If way one would work without problems, well I think I would just do it that way, but won't there be some problems when copying files to server, than changing files locally and instead copying again to webserver committing it. So now updating webserver will cause some probs because I think SVN will try to merge both files if possible? But as of my working style the files on the server should not be merged but overwritten with the files of SVN? I hope I explained my prob a bit more... a merge is something you do manually, most of the time you just commit (overwrite) and svn will log the lines of code that changed - sometimes when multiple people work on the site you get a conflict, both changed the same lines - this is when you need to manually review and manually merge, SVN will tell you the files conflict and prompt you to merge (still with the option to overwrite, or to update, take the other persons copy) And with SCP: I'm forced to work on a windows server and there was no ftp at all so I was forced to use windows explorer and those (don't know how it's called on english) networkdevice connection which is 10 times more frustrating than using ftp (funnily it works smoother when using linux to connect to...). So I will look into WinSCP and hope it will work.. thanks for advice if server is a windows server maybe forget scp.. may be more trouble than it is worth. but if server is linux and you develop on windows then yes use winscp or tortoise svn, or both :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] maybe we could all?
Project: PHP Common Objects and Datatypes method: for everybody who wishes to contribute, and for everybody to review, discuss and work on the same classes. what are they: classes we can all use, that have been discussed, reviewed and agreed between many great developers around the world. the classes: all the common ones we can re-use from User to Address Email Article and beyond, also perhaps wrappers for primatives / scalars. expanding: extra abstract classes we can also use, common interfaces for the above; eventually maybe utility classes as well. the idea wouldn't be a framework or another php classes, more of a repo full of common classes to save us all some time, and as a nice project anybody can contribute to and which we can all discuss and debate the finer grained details. additional: these would maybe be best to stick to common usage, so if we have say a User class in our own project with specific needs, we can simply extend the base user class and add our own functionality. thinking of putting this distraction and debate time to good use that we can all benefit from. would also propose sticking to php 5.X [we could decide a version] and obviously OO; but then if the procedural guys wanted they could as well. maybe it's just me, no commitment, no solid work, just bits of contrib and discussion / feedback. follow? thoughts? comments? interest? [everybody, even tony, would need max input and discussion to get the best solutions for us all, and class at a time should mean we get a steady stream of classes to the repo.. think about 6 months down the line] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Kyle Terry wrote: On Mon, Jan 19, 2009 at 4:09 PM, Edmund Hertle edmund.her...@student.kit.edu wrote: 2009/1/20 Nathan Rixham nrix...@gmail.com Project: PHP Common Objects and Datatypes method: for everybody who wishes to contribute, and for everybody to review, discuss and work on the same classes. what are they: classes we can all use, that have been discussed, reviewed and agreed between many great developers around the world. the classes: all the common ones we can re-use from User to Address Email Article and beyond, also perhaps wrappers for primatives / scalars. expanding: extra abstract classes we can also use, common interfaces for the above; eventually maybe utility classes as well. the idea wouldn't be a framework or another php classes, more of a repo full of common classes to save us all some time, and as a nice project anybody can contribute to and which we can all discuss and debate the finer grained details. additional: these would maybe be best to stick to common usage, so if we have say a User class in our own project with specific needs, we can simply extend the base user class and add our own functionality. thinking of putting this distraction and debate time to good use that we can all benefit from. would also propose sticking to php 5.X [we could decide a version] and obviously OO; but then if the procedural guys wanted they could as well. maybe it's just me, no commitment, no solid work, just bits of contrib and discussion / feedback. Sounds good to me, even if there won't be some classes at the end, discussing basic needs for basic classes like those above is appreciated (IMO) Well, isn't beta 5.3 around the corner? Than why not stick to that and maybe improve of some of the new features sounds good; (discussion begins) - but if we're all going to use them in production maybe we'd need to use say php 5.1.6 or the most common accross all os's and servers..? how many servers will have php 5.3 support from the off (think redhat servers!) I'm in. yay! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DEV] maybe we could all?
Daniel Brown wrote: On Mon, Jan 19, 2009 at 19:28, Daniel Brown danbr...@php.net wrote: Maybe you could call it PEAR. ;-P (Sent too quickly. Meant to include this, too:) A good place to start is by showing how this would benefit from things like PEAR and PECL. care to contrib that info / thoughts dan? :-) good idea. or counter: maybe completely out with pear/pecl/php scope; just some devs sharing some work then open sourcing it for anybody who wants. wouldn't want people assuming it was linked to php official/endorsed (like you just noted with phpclasses) Also note that phpclasses.org isn't an official or endorsed PHP project, it's a completely third-party site and project operated by non-PHP-Group folks (in case you meant to insinuate that it was a part of the PHP project). lol noted, tis just master lemos ad filled site of other peoples work ya? (he does have some good classes of his own, no down talking meant lol) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Edmund Hertle wrote: 2009/1/20 Nathan Rixham nrix...@gmail.com sounds good; (discussion begins) - but if we're all going to use them in production maybe we'd need to use say php 5.1.6 or the most common accross all os's and servers..? how many servers will have php 5.3 support from the off (think redhat servers!) Well, what about not discussing about concrete implementation, but more like: By creating a user class you have to consider: this than ..., and methods which should be implemented should do... and maybe creating an abstract class or an interface or concrete class but not exactly defined to the end (because that WOULD be possibly more something like pear) Maybe more an aspect of Design Pattern...? sounds like a starting point. and the starting point imho, interfaces and abstracts, then implementations. [can't wait for a discussion on the implementation of Email lmfao] can i gather that this is a postive response and a few interested parties? if so important things like is this discussed on this list or where, need for server space and svn? etc scope for a user group / list @ php on this? or what..? + all monkeys no organ grinder approach, no release until all happy (negating obvious trouble makers) and maybe a release manager for svn. more thoughts please -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Eric Butera wrote: On Mon, Jan 19, 2009 at 8:00 PM, Kyle Terry k...@kyleterry.com wrote: On Mon, Jan 19, 2009 at 4:58 PM, Edmund Hertle edmund.her...@student.kit.edu wrote: 2009/1/20 Nathan Rixham nrix...@gmail.com sounds like a starting point. and the starting point imho, interfaces and abstracts, then implementations. [can't wait for a discussion on the implementation of Email lmfao] can i gather that this is a postive response and a few interested parties? if so important things like is this discussed on this list or where, need for server space and svn? etc scope for a user group / list @ php on this? or what..? + all monkeys no organ grinder approach, no release until all happy (negating obvious trouble makers) and maybe a release manager for svn. more thoughts please Well, I think we should not go to fast... maybe we are setting up SVN, webspace, domain, mailing-list and in the end this is only used by 4-5 people. Because than this can be discussed on this mailinglist. But if there are quite enough people interested, it would be indeed a good idea to start some other kind of communication... but now I will go to bed (2 am here) and maybe there will be about 50 answers to this tomorrow ;) Well, I use Comcast and they put a 250gig cap per month of their residential customer, so my server can only be used temporarily if we need one. -- Kyle Terry | www.kyleterry.com Guys there's plenty of free open source hosted svn/git servers. Do a google search. lol and sourceforge [doh]; that way if anything takes off natural user base and integrated promotion most active - possibly with aid of tony :D -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Kyle Terry wrote: On Mon, Jan 19, 2009 at 5:12 PM, Nathan Rixham nrix...@gmail.com wrote: Eric Butera wrote: On Mon, Jan 19, 2009 at 8:00 PM, Kyle Terry k...@kyleterry.com wrote: On Mon, Jan 19, 2009 at 4:58 PM, Edmund Hertle edmund.her...@student.kit.edu wrote: 2009/1/20 Nathan Rixham nrix...@gmail.com sounds like a starting point. and the starting point imho, interfaces and abstracts, then implementations. can i gather that this is a postive response and a few interested parties? if so important things like is this discussed on this list or where, need for server space and svn? etc scope for a user group / list @ php on this? or what..? + all monkeys no organ grinder approach, no release until all happy (negating obvious trouble makers) and maybe a release manager for svn. more thoughts please Well, I think we should not go to fast... maybe we are setting up SVN, webspace, domain, mailing-list and in the end this is only used by 4-5 people. Well, I use Comcast and they put a 250gig cap per month of their residential customer, so my server can only be used temporarily if we need one. Guys there's plenty of free open source hosted svn/git servers. Do a google search. lol and sourceforge [doh]; that way if anything takes off natural user base and integrated promotion most active - possibly with aid of tony :D http://gitorious.org/ open to debate; my preference for now goes to sourceforge as it's all there including space with php support; proven you know. However i like new projects as well so open but overall +1 goes to whatever gets us up and running with the least time spent. and on the other side.. to open things up interface Object { } or abstract class Object { } or class Object { } nothing else for now: reason: to address the current and forseable lack of function(object $obj) in php; in addition to allow future scope for any common to all methods (or any implementation of this to have) i guess first is it a good idea to have any of the above and to address this, then next if so which? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Kyle Terry wrote: On Mon, Jan 19, 2009 at 5:42 PM, Eric Butera eric.but...@gmail.com wrote: On Mon, Jan 19, 2009 at 8:35 PM, Nathan Rixham nrix...@gmail.com wrote: and on the other side.. to open things up interface Object { } or abstract class Object { } or class Object { } nothing else for now: reason: to address the current and forseable lack of function(object $obj) in php; in addition to allow future scope for any common to all methods (or any implementation of this to have) i guess first is it a good idea to have any of the above and to address this, then next if so which? That needs to be prefixed. Or maybe namespaces if you're targeting 5.3? It'd suck to have a lot of code using such a thing only to become a reserved word. good point about a reserved word getting implemented and f'ing it all up maybe design to start with no language in mind then implement using both namespace and non namespace, 2 versions a 5.1 and a 5.3 or something? I doubt we are going to use the word Object. haha. alas though, what other word do you use to describe something that is nothing more than an Object? more thought - if it had no method or properies, just interface or abstract class Object then should it become a reservered word we simply remove it.. or in any implementation do a if(!class_exists('Object')) { //definition? } actually.. debating already.. maybe it's wrong to assume that if a superclass that all others inheritted was added to php that it'd be called Object [even though it is in most other langauges] would a theoretical test then be to create a test class, check via reflection if it has a parent, if it does grab the name and then damn.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Eric Butera wrote: On Mon, Jan 19, 2009 at 8:35 PM, Nathan Rixham nrix...@gmail.com wrote: Kyle Terry wrote: and on the other side.. to open things up interface Object { } or abstract class Object { } or class Object { } nothing else for now: reason: to address the current and forseable lack of function(object $obj) in php; in addition to allow future scope for any common to all methods (or any implementation of this to have) i guess first is it a good idea to have any of the above and to address this, then next if so which? That needs to be prefixed. Or maybe namespaces if you're targeting 5.3? It'd suck to have a lot of code using such a thing only to become a reserved word. agreed, prefixed or namespaced (2 versions preference) thought now that should php introduce a superclass all others inherit, then ours should inherit it as well.. so non clashing name for sure. that's if we need one..? [imho +1 to one of the above] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Eric Butera wrote: On Mon, Jan 19, 2009 at 9:13 PM, Kyle Terry k...@kyleterry.com wrote: On Mon, Jan 19, 2009 at 6:07 PM, Daniel Brown danbr...@php.net wrote: On Mon, Jan 19, 2009 at 19:58, Edmund Hertle edmund.her...@student.kit.edu wrote: Well, I think we should not go to fast... maybe we are setting up SVN, webspace, domain, mailing-list and in the end this is only used by 4-5 people. Because than this can be discussed on this mailinglist. But if there are quite enough people interested, it would be indeed a good idea to start some other kind of communication... I flat-out disagree with this, Ed. Nothing at all against you, though. This is the General list for PHP, and while this project is PHP-related (and general in nature), if we allow even the regulars to do so here, how can we then tell others that we won't allow them to discuss their PHP-related projects on this list? Putting the code on a proper system to begin with means no screwing around later when the project is running at full steam. And even if there are only four or five people working on it, if those folks put in a good effort, they can work wonders. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! I work on a development team of 3; me and 2 others. 1 of which only develops about a quarter of his time here. Even with my co worker sitting next to me, if we weren't using a repo, we would both be at a complete loss (right word?). -- Kyle Terry | www.kyleterry.com I have been using svn for 3 years by myself. Recently I talked my other co workers to play with it and they love it. But even in an army of one it's amazing to be able to figure out what I messed up last week or why I decided to change something at 5:00. People have wrote books on it though, so I'll hush. still up :p dan - great offer, I'd like to take you up on it [could we install any extra needed software, such as a wiki / list or something that allows discussion and document storage made website available] svn - a must imho consideration: been thinking 2 things 1 - this could be a lot of noise on the list; perhaps an approach of rfc and publish every idea, post link to it here so anybody can contribute, then go from there. discuss [ wiki needed? ] 2 - actually that was both in one sentance maybe first rfc should be super class for all (our) objects and if so what + a name, cos if we need to start prefixing.. and it can't be 4LC as can't start with a number :p this will be massively interesting.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Daniel Brown wrote: On Mon, Jan 19, 2009 at 19:58, Edmund Hertle edmund.her...@student.kit.edu wrote: Well, I think we should not go to fast... maybe we are setting up SVN, webspace, domain, mailing-list and in the end this is only used by 4-5 people. Because than this can be discussed on this mailinglist. But if there are quite enough people interested, it would be indeed a good idea to start some other kind of communication... I flat-out disagree with this, Ed. Nothing at all against you, though. This is the General list for PHP, and while this project is PHP-related (and general in nature), if we allow even the regulars to do so here, how can we then tell others that we won't allow them to discuss their PHP-related projects on this list? have to agree dan, not to mention the noise; people needing genuine helps posts getting missed etc.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Bastien Koert wrote: On Mon, Jan 19, 2009 at 9:35 PM, Nathan Rixham nrix...@gmail.com wrote: Daniel Brown wrote: On Mon, Jan 19, 2009 at 19:58, Edmund Hertle edmund.her...@student.kit.edu wrote: Well, I think we should not go to fast... maybe we are setting up SVN, webspace, domain, mailing-list and in the end this is only used by 4-5 people. Because than this can be discussed on this mailinglist. But if there are quite enough people interested, it would be indeed a good idea to start some other kind of communication... I flat-out disagree with this, Ed. Nothing at all against you, though. This is the General list for PHP, and while this project is PHP-related (and general in nature), if we allow even the regulars to do so here, how can we then tell others that we won't allow them to discuss their PHP-related projects on this list? have to agree dan, not to mention the noise; people needing genuine helps posts getting missed etc.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I'm in, sounds like fun and a great way to learn new stuff and here's the need to get a site or something up asap; even a quick wiki project anything - even just to keep note of who's in let alone get the rfc's going rfc format.. perhaps discuss as we go along, an rfc on it? weg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Kyle Terry wrote: On Mon, Jan 19, 2009 at 6:31 PM, Nathan Rixham nrix...@gmail.com wrote: discuss [ wiki needed? ] wiki will definitely be needed. dan? :-) + a name, cos if we need to start prefixing.. and it can't be 4LC as can't start with a number :p The world's object? Pobject [i jest] really going to bed this time -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Daniel Brown wrote: On Mon, Jan 19, 2009 at 21:31, Nathan Rixham nrix...@gmail.com wrote: dan - great offer, I'd like to take you up on it [could we install any extra needed software, such as a wiki / list or something that allows discussion and document storage made website available] svn - a must imho Nothing against the others, by any means, but as long as you, Koert, and - if he gets involved - Butera are running it, I'll give you guys root access to those systems and added ones if need be. I trust the three of you with having that info, so I'll send it to the three of you off-list tomorrow. As for others getting involved, I just don't know them, so I'll appreciate you three keeping it to yourselves. Then you can do whatever you need to do with the boxes. For now, I'm heading my ass off to bed as well. cheers dan, night, and can't see it being any problem about the root - all relevant permissions once it's up will be software based not os based I'd guess thanks again :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Paul M Foster wrote: On Mon, Jan 19, 2009 at 11:57:25PM +, Nathan Rixham wrote: Project: PHP Common Objects and Datatypes method: for everybody who wishes to contribute, and for everybody to review, discuss and work on the same classes. what are they: classes we can all use, that have been discussed, reviewed and agreed between many great developers around the world. the classes: all the common ones we can re-use from User to Address Email Article and beyond, also perhaps wrappers for primatives / scalars. expanding: extra abstract classes we can also use, common interfaces for the above; eventually maybe utility classes as well. the idea wouldn't be a framework or another php classes, more of a repo full of common classes to save us all some time, and as a nice project anybody can contribute to and which we can all discuss and debate the finer grained details. additional: these would maybe be best to stick to common usage, so if we have say a User class in our own project with specific needs, we can simply extend the base user class and add our own functionality. thinking of putting this distraction and debate time to good use that we can all benefit from. would also propose sticking to php 5.X [we could decide a version] and obviously OO; but then if the procedural guys wanted they could as well. maybe it's just me, no commitment, no solid work, just bits of contrib and discussion / feedback. follow? thoughts? comments? interest? [everybody, even tony, would need max input and discussion to get the best solutions for us all, and class at a time should mean we get a steady stream of classes to the repo.. think about 6 months down the line] You really don't have enough to do, do you? Paul actually, way too much - but I like to learn, contribute, think about what I'm doing, skill share and contribute to the development community. and you? too much to do? :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Paul M Foster wrote: On Tue, Jan 20, 2009 at 03:29:29AM +, Nathan Rixham wrote: Paul M Foster wrote: On Mon, Jan 19, 2009 at 11:57:25PM +, Nathan Rixham wrote: snip You really don't have enough to do, do you? Paul actually, way too much - but I like to learn, contribute, think about what I'm doing, skill share and contribute to the development community. and you? too much to do? :p Always. I've got projects on the back burner, side burner, next to the stove, in the sink, and on top of the fridge. On top of which, I have to run my company. And run a Linux User Group. AND I'm married! Whew! hopefully you'll partake and share the odd bit of knowledge in this little project then - looks like it's a definate goer; ps I know what you mean about the projects (and the mrs, likewise + 4 kids!) Incidentally, I'm relatively new to the list, but I see a lot of CCs along with posts to the list. The CCs are only useful if non-subscribers can post to the list. Is that the case? welcome; good to see a new face - even if it is preformatted courier as per :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Kyle Terry wrote: On Mon, Jan 19, 2009 at 7:14 PM, Eric Butera eric.but...@gmail.com wrote: On Mon, Jan 19, 2009 at 9:41 PM, Bastien Koert phps...@gmail.com wrote: I'm in, sounds like fun and a great way to learn new stuff This is what I was thinking too. I'm just not sure what sort of contributions I could make to such a thing. It'd be an interesting experience to try though. That's why branches exist. We can deploy branches and edit each others mistakes, comment them, and then merge it. yup; this discussion could get very fine grained, and could be very useful for many if done correctly and publicaly visible. Everything from project naming, svn committing, how we discuss, rfc, name classes, decide between; all considerations and every version of everything would be good to keep public and for us. on the naming thing: http://www.codinghorror.com/blog/archives/000996.html great site btw; worth a frequent check -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Kyle Terry wrote: I demand Dan and Nathan to go to bed now. yeah it's 4am; day job in 5 hours - kinda waiting on the mrs tonight; she just released another mix onto the net and the process is long and slow while she gets everything just so - damn good though - but always seems to do it at night *yawn* night again. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Installation problems on Vista
lucson pierre-charles wrote: Dear Nathan, The short_tags is sure off but when I changed the scripts, they're still being output to the browser. These are the lines I added to the modules section: #LoadModule php5_module c:/php5/php5apache2.dll #AddType application/x-httpd-php .php #PHPIniDir c:/php5 remove the #'s -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Installation problems on Vista
lucson pierre-charles wrote: Nathan, When I remove the #'s, I can't have Apache to restart. I keep receiving error messages. what are the errors? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Military - Standard times
Jochem Maas wrote: tedd schreef: Hi gang: would you stop calling me that, I'll bet it means something rude in korean. :-P What's the slickest way to go from standard to military times and back again? wouldn't the slickest way be to carry/store unixtimestamps and then output whatever version you need when you need it, the conversion back and forth *seems* pointless. agree completely, seperate out the display so you have function militaryTime($t) { return strftime('%R', $t); } function standardTime($t) { return strftime('%r', $t); } $time = time(); $militaryTime = militaryTime($time); $standardTime = standardTime($time); = but then you could shorten to: function timeFormat($militaryTime = FALSE) { $format = $militaryTime ? '%R' : '%r'; return strftime($format, $t); } $time = time(); $militaryTime = timeFormat(TRUE); $standardTime = timeFormat(); = or you could leave you're options open and go for: function timeFormat($format = '%r') { return strftime($format, $t); } $time = time(); $militaryTime = timeFormat('%r'); = or just $time = time(); $militaryTime = strftime('%r', $time); :P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL class. Thoughts?
c...@l-i-e.com wrote: there is an art to using them, they compliment 'traditional' error handling, and I agree they can hinder if used badly. I don't think I've ever seen Exceptions used well... Invariably, I end up having to write a wrapper function around every function implemented and catch all the Exceptions. Otherwise, my code is littered with try/catch blocks for every little thing the other guy was too lazy to figure out how to handle gracefully. ymmv i use them often, basically if a boolean false won't do its a case of throwing an exception. let's say you have: calls_fifty_methods($page_load_of_variables); wrap that bit in a try catch and you get try { calls_fifty_methods($page_load_of_variables); } catch ( DatabaseException $e) { // handle that error } catch ( FileNotFoundException $e) { // handle } catch ( VerySpecificException) { // handle } catch ( Exception $e ) { // didn't expect this, notify devs, error log it and do X Y Z } try firing back error codes or something from 50 methods down and you have a real can go wrong easily series of returning error codes and processing the same anyways; or you could take the echo some html approach from the function - which is wrong on so many levels or.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Time Wrong
Edmund Hertle wrote: 2009/1/21 Gary gwp...@ptd.net Im pretty new with php, so this might be a pretty novice mistake, but the time displays wrong on two computers. ?php echo date('l F jS, o h i A');? Shows up 2 hours late...time on both computers is correct. Thanks Do you mean on two computers visiting a php script? PHP is running on the server, so it will use server time -eddy makes sense.. check out http://php.net/date_default_timezone_set - probaly needs set -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: How to use SVN + PHP
derby wrote: Our dev team is using eclipse-pdt and subclipse plugin which integrates eclipse and subversion. Subversion or any VCS is essential. After 15 years of using FTP/SFTP/SCP, SVN has replaced it for all my web projects. you can get the RSE plugin for eclipse-pdt as well; I'd really recommend it, in short it's remote system explorer and allows you to connect to any server by almost any protocol, so you can ssh, ftp, scp, sftp, webdav whatever from inside eclipse. further there's the communications plugin which let's you msn, xmpp, aim etc from inside eclipse too finally make sure you have the zend eclipse debugger plugin for eclipse installed as well, let's you run php right in eclipse and debug etc, doesn't come with pdt-1 if i remember correctly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: killing a child process from pcntl_exec
bruce wrote: Hi.. I fork a child process If I wait, the child eventually dies.. but I'd like to be able to kill it thoughts/pointers/comments... thanks yeah - stop killing children -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php spawing/forking issues
bruce wrote: Hi... Playing around with a test app to spawn external child processes. I'd like to be able to spawn/fork/run am external child process, that: -allows the child processes to run as separate independent processes (pid) -allows the child process(es) to be terminated via cmdline (kill -9 pid) i've got a dynamic situation, where i'm reading from an array, and for each item in the array, i want to spawn/fork the child process. i'd like to be able to have 10 copies of the spawned child process running at the same time. the only way i've been able to get my test working, is to spawn a group of processes, and then to iterate through the group, using an array of pids, and doing a wait for each pid in the array. however, this doesn't satisfy me wanting to have a certain number of simultaneous processes running at the same time.. thoughts/comments/pointers to articles that might demonstrate this would be useful. thanks... i can easily post the sample chunk of code i'm playing with if someone wants to look at it! yep send the code; done it a few times in the past but need to see the method you've taken so far -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Java / PHP Bridge
c...@l-i-e.com wrote: Zero real experience, but what I hear is that the Java / PHP bridges are a bit brittle and difficult to shore up properly... You may want to consider going with HTTP REST / RPC services instead, as those are quite solid, and you can get what you want. Note that this is all hearsay on my part. ymmv definitely; couldn't agree more; create your java app as a web service [soap/rpc/rest/xml-rpc] using metro/axis/cxf or suchlike and call it from php server side to integrate :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Java / PHP Bridge
c...@l-i-e.com wrote: And vice-versa: Any PHP functionality that needs to be called from Java can be a web service using whatever weapon you find suitable. yup and if I may suggest, wso2 WSF for PHP is probably you're best bet for doing this; http://wso2.org/ no finer php web service framework out there -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: process creation
bruce wrote: A simple question (or so I thought). Does php allow an app to create/start a process/application that can continue to run on its own, after the initiating program/app terminates? It appears that the spawning/forking functions might work, but the child apps would be in a zombie status, and couldn't be killed by an external program. you keep mentioning this zombie state; make sure that all you're child processes have an exit(); at the end or at the end of the code where they are finished; otherwise you get the xombies! also here is a very simple model you can follow that invariably works for me: this will run 10 worker threads: controller: ?php include './your.framework.php'; for($icount=0;$icount11;$icount++) { include './worker.php'; } ? worker: ?php $pid=pcntl_fork(); if(!$pid) { while(1) { if($icount) { $offset = $icount * 50; } else { $offset = 0; } $db = new mysql_handler( $connection ); $job_list = new job_list; if( $jobs = $job_list-get($offset) ) { foreach($jobs as $jdex = $job ) { //do something with the job } } else { sleep(10); } } } else { echo \ndaemon launcher done id $pid\n; } ? the above code is designed to run indefinately in a constant loop which polls a database for work to do this is just a very simple example, there are far more complex ways of doing it, keeping a track of how many processes you have, spawning new ones when you need them etc etc, but this i find works v well for me, the key is the $offset; getting jobs from a database and this literally is the offset used, so if you have say 200 emails to get and each script processes 50 at a time, only 4 of your threads are working, bump it up to 1 and all of them work until the queue drops; the sleep(10) and the spawn process of about 1 per second ensures that you're polling every second so jobs are picked up quickly. it's a lot of functionality for so little code :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: process creation
Török Alpár wrote: 2009/1/23 Nathan Rixham nrix...@gmail.com bruce wrote: A simple question (or so I thought). Does php allow an app to create/start a process/application that can continue to run on its own, after the initiating program/app terminates? It appears that the spawning/forking functions might work, but the child apps would be in a zombie status, and couldn't be killed by an external program. you keep mentioning this zombie state; make sure that all you're child processes have an exit(); at the end or at the end of the code where they are finished; otherwise you get the xombies! also here is a very simple model you can follow that invariably works for me: this will run 10 worker threads: controller: ?php include './your.framework.php'; for($icount=0;$icount11;$icount++) { include './worker.php'; } ? worker: ?php $pid=pcntl_fork(); if(!$pid) { while(1) { if($icount) { $offset = $icount * 50; } else { $offset = 0; } $db = new mysql_handler( $connection ); $job_list = new job_list; if( $jobs = $job_list-get($offset) ) { foreach($jobs as $jdex = $job ) { //do something with the job } } else { sleep(10); } } } else { echo \ndaemon launcher done id $pid\n; } ? This would start more than 10 children. Children will continue on with for loop after they do their work. As you advice that the children have an exit, i assume that you just overlooked it while writing this example. Also, a wait on the children, at some point, gets rid of the zombies, as i see from your code, there is no way you won't have zombie processes, unless the parent exists, and then the zombies also disappear. I hope i got it right, it's late here :) lol the script will only run 10 children, and as mentioned directly below, it is designed to run forever - the example doesn't fit the exact needs, but following bruces earlier posts this may be a model he can follow. I'm aware it could be fleshed out with much more code and error handling, but it's just a little model to get one started :) regards torak and hope you're well! the above code is designed to run indefinately in a constant loop which polls a database for work to do this is just a very simple example, there are far more complex ways of doing it, keeping a track of how many processes you have, spawning new ones when you need them etc etc, but this i find works v well for me, the key is the $offset; getting jobs from a database and this literally is the offset used, so if you have say 200 emails to get and each script processes 50 at a time, only 4 of your threads are working, bump it up to 1 and all of them work until the queue drops; the sleep(10) and the spawn process of about 1 per second ensures that you're polling every second so jobs are picked up quickly. it's a lot of functionality for so little code :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Doc standard for methods?
Larry Garfield wrote: Greetings, all. I am looking for feedback on a documentation question, in the hopes that someone else has found a good solution to an abnormal situation. We're in the process of introducing OOP syntax to a large procedural code base. Our developer base is a mixture of people who are procedural-centric and those that flip between procedural and OOP easily. One area we've run into is documenting some of the more complex OOP interactions. For example, if we have a method chain: foo()-bar()-baz()-narf(); some developers have expressed concern in figuring out which narf() method is actually being called, since foo(), bar() and baz() may return objects of different classes (of the same interface) depending on various conditions (the classic factory pattern). Currently, we're including a docblock (Doxygen, close enough to PHPDoc for government work) on the interface or parent class that has full docs, and then nothing on the child classes. My understanding of docblocks is that most documentation parsers prefer that, so that the docblock itself inherits. One suggestion that has been raised is to reference the parent class and factory function in a comment after the method signature. That is: class Narfing_mysql { // ... public function narf() { // Narfing foo() // ... } } So that it can be easily grepped for. That strikes me as a very hacky non- solution. Does anyone else have a recommendation for how to improve such documentation? Is there a standard in PHPDoc that I don't know about? Any other projects doing something like that? first idea would just be to use the @return; if they're using any kind decent of ide it'll show the return type; failing that they can check the docs class Narfing_mysql { /** * * @return Type */ public function narf() { // Narfing foo() // ... } } or not best practice but i dare say class Narfing_mysql { /** * * @return TypeA, TypeB */ public function narf() { // Narfing foo() // ... } } or in the method description with @see Class inline links? regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Doc standard for methods?
Kyle Terry wrote: On Tue, Jan 27, 2009 at 7:06 AM, Eric Butera eric.but...@gmail.com wrote: On Tue, Jan 27, 2009 at 10:00 AM, Kyle Terry k...@kyleterry.com wrote: On Tue, Jan 27, 2009 at 5:56 AM, Nathan Rixham nrix...@gmail.com wrote: Larry Garfield wrote: Greetings, all. I am looking for feedback on a documentation question, in the hopes that someone else has found a good solution to an abnormal situation. We're in the process of introducing OOP syntax to a large procedural code base. Our developer base is a mixture of people who are procedural-centric and those that flip between procedural and OOP easily. One area we've run into is documenting some of the more complex OOP interactions. For example, if we have a method chain: foo()-bar()-baz()-narf(); some developers have expressed concern in figuring out which narf() method is actually being called, since foo(), bar() and baz() may return objects of different classes (of the same interface) depending on various conditions (the classic factory pattern). Currently, we're including a docblock (Doxygen, close enough to PHPDoc for government work) on the interface or parent class that has full docs, and then nothing on the child classes. My understanding of docblocks is that most documentation parsers prefer that, so that the docblock itself inherits. One suggestion that has been raised is to reference the parent class and factory function in a comment after the method signature. That is: class Narfing_mysql { // ... public function narf() { // Narfing foo() // ... } } So that it can be easily grepped for. That strikes me as a very hacky non- solution. Does anyone else have a recommendation for how to improve such documentation? Is there a standard in PHPDoc that I don't know about? Any other projects doing something like that? first idea would just be to use the @return; if they're using any kind decent of ide it'll show the return type; failing that they can check the docs class Narfing_mysql { /** * * @return Type */ public function narf() { // Narfing foo() // ... } } or not best practice but i dare say class Narfing_mysql { /** * * @return TypeA, TypeB */ public function narf() { // Narfing foo() // ... } } or in the method description with @see Class inline links? regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Eric and I were just discussing something similar yesterday. We discovered you can make private and protected method calls from two different instances of the same object type. I personally called this reference hopping. -- Kyle Terry | www.kyleterry.com Help kick start VOOM (Very Open Object Model) for a library of PHP classes. http://www.voom.me | IRC EFNet #voom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php And I called it haxx. ;) Never said we used it :) Remember my coworkers responce ... FNE! and I want to know more, do you mean.. class egg { private function whatever() { echo __METHOD__ . PHP_EOL; } protected function wherever( $e ) { $e-whatever(); } public function whenever( $e ) { $this-wherever($e); } } $a = new egg; $b = new egg; $a-whenever($b); ?? regards! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Hidden costs of PHP arrays?
Clancy wrote: Also what the relative virtues of defining the same set of fields for every contact, as against either defining only the fields which actually hold values, as in the following examples? a: $contacts['clancy']['home_address'] = 'jkjkjk'; $contacts['clancy']['home_phone'] = 0123 4567; $contacts['clancy'][' office_address''] = ''; $contacts['clancy']['office_phone'] = ''; $contacts['joe']['home_address'] = ''; $contacts['joe']['home_phone'] = ''; $contacts['joe']['office_address'] = 'jsfvkl'; $contacts['joe']['office_phone'] = 'jsfvkl'; b; $contacts['clancy']['home_phone'] = 0123 4567; $contacts['clancy']['home_address'] = 'jkjkjk'; $contacts['joe']['office_address'] = 'jsfvkl'; $contacts['joe']['office_phone'] = 'jsfvkl'; if you go for option b; you're going to have do a vast amount of isset() checks in a for loop and all kinds of fancy business logic for $contacts['clancy']['home_phone'] = 0123 4567; vs $contacts['clancy']['home_phone'] = ''; vs 'home_phone' not set so one would guess that code would far outweigh any tiny speed gain from dropping the additional items in the array. on another note; php has been stable and speedy now for a very long time, some bit's like the reflection api could be speeded up a little bit as demand grows, but certainly all scalars and compound types have been tested and optimized to hell and back (afaik). you can test this all you're self, simply populate an array with say 1000 random other arrays of data with 10 keys each, stick it in a for loop and time several times, then do the same for an array as above but with subarrays of only 5 keys; see if you can spot any significant difference. [then compare to say a single database select, or an execution of a small script.] another way of putting it; I'm 99% sure that nobodies code is perfectly optimised enough by itself to notice any performance hits from php; quite sure you could make far bigger gains by optimising you're own code first :p regards! ramble -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Programming general question
Robert Cummings wrote: On Wed, 2009-01-28 at 01:07 +0100, Edmund Hertle wrote: 2009/1/28 Terion Miller webdev.ter...@gmail.com I googled this and didn't find an answer my question is how do you know when to use an object or array would an object just be 1 instance, and array is several things together ( I know infantile coder language I use..but I'm a baby still in this) Can someone explain objects and arrays in plain speak for me? Thanks Happy Coding Hey, Arrays: A structure to store data Example: $example = array(value1, value2, value3); echo $example[0]; // echos value1 echo $example[2]; // echos value3 Object: Something totally diffrent. A object is an instance of a class. Contains variables and methods. I don't know how you thought of using arrays or objects for the same problem? Can you give an example? An array's functionality can be implemented as a Class with specific array instances being Objects. This allows the array to be used in polymorphic contexts and to be extended by subclasses. The same can be said for any primitive datatype. Personally, I haven't seen a need to use an Array class in PHP. That's not to say it doesn't have a purpose, but I lean towards primitives when possible for efficiency. Cheers, Rob. ahh i said the same until recently, and it's actually prompted me to start making some generic container classes with array accessors. simple example being, I want an array which can't have duplicates and doesn't have any kind of ordered indexing, just an array or container i can throw objects in and trust that i won't have any dups. Another example is if you want an array of objects which can only be of class/interface type x -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Hidden costs of PHP arrays?
Robert Cummings wrote: On Wed, 2009-01-28 at 10:38 +1100, Clancy wrote: PHP arrays permit extremely concise programming; for example if I have all my contacts in an array $contacts, I can write: $my_phone_no = $contacts['clancy']['phone']; However it is clear that there must be a lot going on behind the scenes to achieve this simple result, as it requires some sort of search procedure. Is it possible to give any indication of the overheads and memory costs that are involved in such a statement, and of how well the search procedure is implemented? Also what the relative virtues of defining the same set of fields for every contact, as against either defining only the fields which actually hold values, as in the following examples? a: $contacts['clancy']['home_address'] = 'jkjkjk'; $contacts['clancy']['home_phone'] = 0123 4567; $contacts['clancy'][' office_address''] = ''; $contacts['clancy']['office_phone'] = ''; $contacts['joe']['home_address'] = ''; $contacts['joe']['home_phone'] = ''; $contacts['joe']['office_address'] = 'jsfvkl'; $contacts['joe']['office_phone'] = 'jsfvkl'; b; $contacts['clancy']['home_phone'] = 0123 4567; $contacts['clancy']['home_address'] = 'jkjkjk'; $contacts['joe']['office_address'] = 'jsfvkl'; $contacts['joe']['office_phone'] = 'jsfvkl'; And is there any advantage in always assigning the keys in the same order? Lookup is O( lg n ). Since your examples above are nested 2 levels deep then it's actually 2 * O( lg n ) which is O( lg n ). But really, the variable itself, $contacts is probably also looked up and it is also O( lg n ) and of course 3 * O( lg n ) is still O( lg n ). Moving along... for arbitrary depth paths, you'd be talking O( m lg n ) but for realistic cases you'll not get deep enough for that to matter much. Either way, if you are looping over an array and always accessing X levels deep, you might want to create a temporary variable that is level X - 1 (unless that's not a possible option). Cheers, Rob. rob; go apply for a job at yahoo - that's one of there interview questions for new developers [describe o notation] is impressed - v nice answer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
Paul M Foster wrote: On Wed, Jan 28, 2009 at 09:26:10PM +, Ashley Sheridan wrote: snip I use CSS as much as possible, and it's second nature to me now to design with CSS rather than tables, but the only area I find it quicker to use tables is when I design forms. I know I'm going to browser hell, but meh, I can deal with it! :p That's my problem. Almost all the stuff I do is actual tabular data, or forms. Of course, the header and side bars are built with CSS. But the interior data are usually in tables. I've got forms with 50-odd fields in them, and I completely dispair of trying to make it look as good in CSS as it does in tables. Even with tables, I had more experimenting and colspans than you can imagine. Paul see this is why i chant flex flex flex flex flex flex flex flex flex flex flex flex flex drumroll flx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Content Management
Larry Garfield wrote: On Friday 30 January 2009 12:16:44 am Jason Todd Slack-Moehrle wrote: I would like something simple to setup, http://drupal.org/ lol -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Matching
Eric Butera wrote: On Sat, Jan 31, 2009 at 9:33 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Sat, 2009-01-31 at 08:38 -0500, Eric Butera wrote: On Sat, Jan 31, 2009 at 7:32 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Fri, 2009-01-30 at 21:33 -0500, Eric Butera wrote: On Fri, Jan 30, 2009 at 9:28 PM, Ron Piggott ron@actsministries.org wrote: How do I determine the value oftx from this string? page/words_from_the_well_checkout/?tx=8UM53005HH344951Tst=Completedamt=0.01 My desired answer is: 8UM53005HH344951T I am trying to capture the serial number which follows tx= and ends immediately before the Ron http://us.php.net/parse_str -- http://www.voom.me | EFnet: #voom Go regular expressions... /tx=([^\]+)/ then do a preg_match with the string using the $matches array argument. $matches[1] should be your value. Ash www.ashleysheridan.co.uk There really isn't a need to even try to build something like that when something already exists exactly for the purpose. It's well documented too. Plus after this part works, there's probably a good chance we'd be looking for that second variable. =) -- http://www.voom.me | EFnet: #voom But isn't what you suggest to use only available in PHP5? When possible, I try to build for PHP4, as my own hosting, and others I've seen only support 4, and the old answer of find a better hosting is not always a good solution. Besides, if you need the second part of the URL, just adapt the regular expression a bit. I don't why people seem so afraid of them to be honest. Ash www.ashleysheridan.co.uk parse_str (PHP 4, PHP 5) parse_str — Parses the string into variables lol - it's obviously an url guys.. http://php.net/parse_url and http://php.net/parse_str $s = 'your/url/?with=parrams'; $parts = parse_url($s); $arrayOfQueryParams = parse_str($parts['query']); $theBitYouWant = $arrayOfQueryParams['tx']; // output the bit you want echo $theBitYouWant . PHP_EOL; // output all the params print_r($arrayOfQueryParams); regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Enclosing Tags? Do You Close Your PHP Declarations?
Eric Butera wrote: On Sat, Jan 31, 2009 at 10:10 AM, tedd tedd.sperl...@gmail.com wrote: My mother always told me to close the door. She wasn't a programmer, but it kept the chickens out. As a matter of habit, I always close all tags. However, I have yet to be bitten by the problem everyone speaks about (knock on wood). Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Right, but the problem isn't us, its them. I don't have this problem myself (since I figured out why I was getting those lame headers sent errors years ago), but when we work in teams... well.. all bets are off. :( personally I close and ensure no trailing space; however I have been trying to remove the ? recently for files with nothing but php - purely to save others grief who may use the code, as I did come across this error again recently. specifically the error in my scenario was called by a DOS format php file with trailing lines on a linux box - so I'm guessing that /n is trimmed but that leaves the /r which is output on linux systems; hence the error. although, in a world of tags and markup there's something that really grates about opening with ?php and not closing it.! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: frameworks
Eric Butera wrote: On Sat, Jan 31, 2009 at 12:06 PM, Shawn McKenzie nos...@mckenzies.net wrote: Eric Butera wrote: On Fri, Jan 30, 2009 at 7:14 PM, Kevin Waterson ke...@phpro.org wrote: On Fri, 2009-01-30 at 18:03 -0600, Shawn McKenzie wrote: From what I could tell, this was the best RAD, however if you prefer to lay everything out your own way and do things your own way then probably CI or Zend. I use Zend every day in my current employ. It is like pulling teeth and its feature set is not as rich as they would have you believe. Zend DB is pathetic Zend Form (although not from Zend itself) is abstraction for abstractions sake and is mind numbingly complex. The lack of a model loader is laughable. The list goes but you get the point, this is supposed to be from the makers of PHP and is supposed to be a mature framework and ready for enterprise level applications. What a joke. but, just my $0.02 Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php And what exactly do you expect for the model layer? That's the part you are supposed to write on your own. Supposed to? Who says? The DB yes, but if you design the DB correctly and want your models tightly coupled with the DB, then it is an useless step to create the model yourself. Zend has a Zend_Tool script in the incubator that does project and some code gen. Reading the plans they plan to include model generation as well. It will probably be a while in coming though. To me, right now Zend is just a more professional and consistent PEAR, but with fewer features. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Model != database. I made this mistake for years, but no more! :) Models can persist data, but a model is supposed to be the business logic of your app. It's a set of rules. So how could any tool generate your app for you is/was my point. Take an ecommerce example. You might have a product in the database, but calculating it's price based on categories, sale prices, etc isn't something that a database is going to do. That is your app's logic is part of your model. The model can ask the DB for all that static info about pricing, but it makes the determination as to what the price is. What about when you want to add a product to the cart? Where would you ask the code if that product is already in the cart? Just all those types of things... actually (imho?).. Model != Database Model != Business Logic A model class describes the structure of data, and has methods to ensure the instance properties are of the correct format and valid so that they can be persisted. Let's say a simple User class class User { private $id; private $name; public function getId() { return $this-id; } public function setId( $id ) { // logic to ensure $id is the correct format to persist // let say just a valid int $this-id = $id; } public function getName() { return $this-name; } public function setName( $name ) { // logic to ensure $name is the correct format to persist // let's say a string under 64 chars $this-name = $name } } how it's persisted is out with the scope of this mail, and varying techniques exist, however this is normally inside the domain model layer (but not necessarily the model classes themselves) The above keeps you're domain model clean and free from implementation specific idiosyncrasies. This is especially useful when working on n-tier/3-tier architectures, building a framework, or a single codebase to be used across multiple sites. All the implementation specific code comes in at the business layer, which is where all you're business logic also occurs. thus: Business layer asks domain model layer for a new user, domain model layer returns a new empty instance of the user class. Business layer does it's thing and ends up populating the user instance with data that valid for the specific application (let's say a name string 8-16 alphanumeric chars) Business Layer then passes it back to the domain model layer to persist; the domain model layer either persists the data OR returns back an exception should the instance properties not be valid to persist, or if an error occurred. regards :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: frameworks
Eric Butera wrote: On Sat, Jan 31, 2009 at 1:12 PM, Nathan Rixham nrix...@gmail.com wrote: Eric Butera wrote: On Sat, Jan 31, 2009 at 12:06 PM, Shawn McKenzie nos...@mckenzies.net wrote: Eric Butera wrote: On Fri, Jan 30, 2009 at 7:14 PM, Kevin Waterson ke...@phpro.org wrote: On Fri, 2009-01-30 at 18:03 -0600, Shawn McKenzie wrote: From what I could tell, this was the best RAD, however if you prefer to lay everything out your own way and do things your own way then probably CI or Zend. I use Zend every day in my current employ. It is like pulling teeth and its feature set is not as rich as they would have you believe. Zend DB is pathetic Zend Form (although not from Zend itself) is abstraction for abstractions sake and is mind numbingly complex. The lack of a model loader is laughable. The list goes but you get the point, this is supposed to be from the makers of PHP and is supposed to be a mature framework and ready for enterprise level applications. What a joke. but, just my $0.02 Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php And what exactly do you expect for the model layer? That's the part you are supposed to write on your own. Supposed to? Who says? The DB yes, but if you design the DB correctly and want your models tightly coupled with the DB, then it is an useless step to create the model yourself. Zend has a Zend_Tool script in the incubator that does project and some code gen. Reading the plans they plan to include model generation as well. It will probably be a while in coming though. To me, right now Zend is just a more professional and consistent PEAR, but with fewer features. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Model != database. I made this mistake for years, but no more! :) Models can persist data, but a model is supposed to be the business logic of your app. It's a set of rules. So how could any tool generate your app for you is/was my point. Take an ecommerce example. You might have a product in the database, but calculating it's price based on categories, sale prices, etc isn't something that a database is going to do. That is your app's logic is part of your model. The model can ask the DB for all that static info about pricing, but it makes the determination as to what the price is. What about when you want to add a product to the cart? Where would you ask the code if that product is already in the cart? Just all those types of things... actually (imho?).. Model != Database Model != Business Logic A model class describes the structure of data, and has methods to ensure the instance properties are of the correct format and valid so that they can be persisted. Let's say a simple User class class User { private $id; private $name; public function getId() { return $this-id; } public function setId( $id ) { // logic to ensure $id is the correct format to persist // let say just a valid int $this-id = $id; } public function getName() { return $this-name; } public function setName( $name ) { // logic to ensure $name is the correct format to persist // let's say a string under 64 chars $this-name = $name } } how it's persisted is out with the scope of this mail, and varying techniques exist, however this is normally inside the domain model layer (but not necessarily the model classes themselves) The above keeps you're domain model clean and free from implementation specific idiosyncrasies. This is especially useful when working on n-tier/3-tier architectures, building a framework, or a single codebase to be used across multiple sites. All the implementation specific code comes in at the business layer, which is where all you're business logic also occurs. thus: Business layer asks domain model layer for a new user, domain model layer returns a new empty instance of the user class. Business layer does it's thing and ends up populating the user instance with data that valid for the specific application (let's say a name string 8-16 alphanumeric chars) Business Layer then passes it back to the domain model layer to persist; the domain model layer either persists the data OR returns back an exception should the instance properties not be valid to persist, or if an error occurred. regards :p This is php we're talking about, not java! :D dude you're gonna have to stop using that language as an excuse to negate everything I say weg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Clarity needed
tedd wrote: Hi gang: I need some fog removed. I have a problem where I have an unlimited number of tutors teaching an unlimited number of courses. When I call upon a tutor, I want to see all the courses they teach. In my old days, I would just set up a linked list of courses and attach it to the tutor (another linked list). As a tutor adds courses, I would just add the course to the end of the linked list. If the tutor deletes a course, then I would remove it from the list by changing a single pointer. If I needed a list of all the courses the tutor taught, I would just run down the linked list pulling them out as needed. But now I have to think in terms of records in a database. I'll eventually figure it out, but what are your suggestions/solutions? I understand that I can have one record set up for each tutor, and another record set up for each course, and then tie the two together by another record like an assignment. That way I can have as many assignments as I want tying courses to tutors. It that the way you guys would do it? Thanks, tedd not even read the other responses but yep, just normalise it like you said two tables + a link table tutorId,courseId and a unique index over those two columns to make sure you don't get duplicates :) regards! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Speed Opinion
Ashley Sheridan wrote: On Thu, 2009-02-05 at 09:44 +1100, Chris wrote: PHP wrote: Hi all, I am seeking some knowledge, hopefully I explain this right. I am wondering what you think is faster. Say you have 1000 records from 2 different tables that you need to get from a MySQL database. A simple table will be displayed for each record, the second table contains related info for each record in table 1. Is if faster to just read all the records from both tables into two arrays, then use php to go through the array for table 1 and figure out what records from table 2 are related. Or, you dump all the data in table 1 into an array, then as you go through each record you make a database query to table 2. Make the db do it. PS: I know I can use a join, but I find anytime I use a join, the database query is extremely slow, I have tried it for each version of mysql and php for the last few years. The delay difference is in the order of 100x slower or more. Then you're missing indexes or something, I've joined tables with hundreds of thousands of records and it's very fast. -- Postgresql php tutorials http://www.designmagick.com/ I've used joins on tables with millions of rows, and it's still not been too slow to use. Admittedly it was an MSSQL database, which I've always found to be slower, but MySQL was built to be a relational database, and can handle many many millions of records quite happily. The slowdown you experienced is either not using indexes on tables, or the way you were displaying/manipulating those results from within PHP. Ash www.ashleysheridan.co.uk and if you use spatial indexes and points instead of integers you can join on the biggest of databases with literally no perfomance hit, same speed regardless of table size :p (plus cos a point has two values you can use one for id and the other for timestamp ;) regards ps: i've said this many times before, but not for like 6 months so time for another reminder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP pop-up windows
Clancy wrote: I'm working on a website editor, primarily for my own use. Normally it will be used on my own computer, and much of what I wish to achieve could arguably be better done in either C or JavaScript, but both of these have a similar programming syntax to PHP, but with subtle differences, and I don't think my brain could cope with trying to work in two similar but different languages simultaneously. An example of what I would like to achieve is: The primary instance of the program opens a text input window for the user to enter, say, one or more addresses from the contact list. It then pops up a second window, which could be another instance of the same program. In this window the user can search the contacts for the names he wants, and highlight them. When he is satisfied he clicks the submit button on the second window. When he does this the second window closes, and the primary window detects the response, processes it, and inserts it into the entry area. I gather that it would be possible for the first program to spawn a child process when the user clicks the button, and this could then open the second window. I think that the child can share session variables with the parent, so the parent could redraw its window, then wait for some flag to be set in the session window, indicating the second window was closing. The parent would then redraw its page incorporating the new information. Is this a feasible mode of operation, and if so would anyone like to suggest ways to implement it, and/or traps to be avoided? if ever somebody needed flex, it's you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Garbage Collection
Dan Shirah wrote: Hi gang: A related question to my last Clarity needed post. I have a tutor table (showing all the tutors), a course table (showing all the courses), and a course-to-tutor table (showing all the instances of what tutor teaches what course). Okay, everything works. Whenever I want to find out what courses a specific tutor teaches OR what tutors teach a specific course, I simply search the course-to-tutor table and bingo out pops the answer. Now, how do you handle the situation when a tutor quits or when a course is no longer offered? If I search the course-to-tutor table for all the tutors who teach a course and find a tutor who is no longer there OR search the course-to-tutor table for all the courses a tutor teaches and find a course that is no longer offered, how do you handle the record? I realize that if either search turns up nothing, I can check for that situation and then handle it accordingly. But my question is more specifically, in the event of a tutor quilting OR removing a course from the curriculum, what do you do about the course-to-tutor orphaned record? As I see it, my choices are to a) ignore the orphaned record or b) delete the orphaned record. If I ignore the record, then the database grows with orphaned records and searches are slowed. If I delete the orphaned record, then the problem is solved, right? I just want to get a consensus of how you people normally handle it. Do any of you see in danger in deleting an orphaned record? Cheers, tedd I guess that all depends. If you want some kind of historical log of what tutor taught which course and which courses have previously been offered then I wouldn't delete the records. Instead I would and something like a Active column and use simple Y and N vaules to mark each tutor or course as active and then just re-write your query to only pull tutor's/courses with the Y flag. That would give you a current listing of active courses and who teaches them, and also retain the historical data if it need to be referenced later. IMHO forget the active flag, replace it with a field deleted which is a timestamp, then you've got an audit trail of when the it was removed :) infact often seen three fields on every table, inserted, updated and deleted all timestamps and self explanatory. regards! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: DB Comparisons
revDAVE wrote: Hi Folks, I¹m curious if there are any previous discussions / Articles / URL¹s that compare the power and scalability of MySQL (with php) with other technologies like MS sequel server oracle - coldfusion etc I imagine that most middleware like php / asp / coldfusion is relatively good fast - (let me know if one is better ). Mostly I¹m concerned with the speed and power of the backend database as to how it functions on an enterprise scale such as how many hits it can handle per hour how many users before it starts to slow down etc. honestly, if you're thinking enterprise scale then database is the least of you're worries, you'll be needing to move away from a scripting language and go for a pre compiled programming language. if you must script this then mysql cluster is probably you're best route to gain what you need, any of the others and you're (probably) going to run into transactional problems especially with multi-master replication. Primarily though one would imagine you'll be doing more reads than writes, in which case you'll be needing a lot of caching in there, second level not just the sql query cache. Using PHP and suchlike is possible for an enterprise ap, but only if you bolt on massive amounts of caching at both the data side and the presentation side of your app. Back to specifics, how the back end database will bear up in an enterprise situation (you'll like this) assuming that all your tables are properly created and optimised assuming you've indexed everything perfectly after analysing every sql query assuming you've optimised every sql query perfectly and you're database is normalised and optimised for you're application structure assuming you've configured all the database server variables correctly for the application and to make the most of the hardware assuming the physical server is of a decent specification and not an old pentium 3 with 128mb ram assuming you're application is well optimised and with no caches then: you'll find 1 database server will support approx 2 UI (user interface) servers of a similar running at full tilt - but you've got a single point of failure by only having one db server so you'll need to look at that :p all in all, with a web app that's scripted you need not worry about which database server to use, pick one from preference and to budget and roll with it. IMHO go php mysql, tonnes of reference online, loads of help, cheaper than going m$sql with windows hosting, and easier to dive in to and use well than postgres. ps: when you've covered all those assuming(s) above come back and we'll give you a better idea of where to go next based on the info you give us. Regards :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: DB Comparisons
Robert Cummings wrote: On Thu, 2009-02-05 at 21:03 +, Nathan Rixham wrote: revDAVE wrote: Hi Folks, I¹m curious if there are any previous discussions / Articles / URL¹s that compare the power and scalability of MySQL (with php) with other technologies like MS sequel server oracle - coldfusion etc I imagine that most middleware like php / asp / coldfusion is relatively good fast - (let me know if one is better ). Mostly I¹m concerned with the speed and power of the backend database as to how it functions on an enterprise scale such as how many hits it can handle per hour how many users before it starts to slow down etc. honestly, if you're thinking enterprise scale then database is the least of you're worries, you'll be needing to move away from a scripting language and go for a pre compiled programming language. Isn't Yahoo using PHP? I thought Facebook too? Doesn't seem like they moved away from a scripting language. Cheers, Rob. only for the display tier in certain parts AFAIK, facebook had a good success using APC cache; however the bulk of their applications are certainly not php. ie: TIER 1 |-A : many many db servers |--( cluster / distribution point) v | |-B : distributed caches (like terracotta) |-C : entity manager / persistence manager |-D : domain model TIER 2 |-E : business logic |-F : app interface / web service interface |--( cluster / distribution point) v | |-G : web service client TIER 3 |-H : display interface | --( cluster / distribution point) v HTTP | CLIENT |-I : end user client (web browser) that's vastly simplified with loads left out, a short time ago yahoo rolled out 40k new apache hadoop servers - you really think the just bolted a connector on the front ran a few php scripts then popped on some caching? :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Clarity needed (Really OT)
tedd wrote: At 7:35 PM +0100 2/6/09, Jochem Maas wrote: Socialist Doctrine? the community orm? Here's a group of people under treat of loss of life tell their government that everyone is created equal and you say that what they said is a Socialist Doctrine? A doctrine that came into being some 140 years later? and required a tonne of xml to set-up? Look, you are a gifted programmer and I learn a lot from you, but this goes to prove that often we are gifted in only a limited number of subjects. he is ! and his surname sounds like a technology Wanted Senior MAAS Developer, London £35k As Will Rogers once said, We're all ignorant, only in different subjects. I say We're all gifted, but not in everything. we'll never be gifted at everything but it won't stop us trying and pretending we are to clients - the developers motto Cheers, Regards, tedd nath -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Email configuration
Ashley Sheridan wrote: I've never had an email bounced because of where it came from based on IP. I have had emails bounced based on the email headers that were sent. Always check the headers first. Even MessageLabs won't block an email based on the IP. ash: http://en.wikipedia.org/wiki/DNSBL that's what RBL is, stopping email because of the IP it was sent from if you've never had it then you can't be a spammer :D *hoorah* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Email configuration
Shawn McKenzie wrote: Ever heard of RBL or DNSBL? I use it on my email server and so do many lol snap, just sent same message at same time - tis so easy to jump on ash's back cos he's always so sure he's right lolol -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Email configuration
Shawn McKenzie wrote: Nathan Rixham wrote: Shawn McKenzie wrote: Ever heard of RBL or DNSBL? I use it on my email server and so do many lol snap, just sent same message at same time - tis so easy to jump on ash's back cos he's always so sure he's right lolol Hmmm... So Ashley is a him? yeah quot: Actually I'm a guy, but we can't all be perfect ;) http://www.mail-archive.com/php-general@lists.php.net/msg235765.html dunno why I insist on winding him up either, he's pretty sound lol -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Session variables
Paul M Foster wrote: I'm not too clear on HTTP headers, cookies, and such. So here are questions related to that. Let's say I generate a random number that I want the user to enter in a form. When I generate the number, I store it in a session variable ($_SESSION). When the user submits the form, I check the number they enter with what I've stored in the session variable. Since this session variable survives across page loads (assuming session_start() is appropriately called), how is it stored and recalled? Is it automatically stored as a cookie on the user's system? Or is it stored on the server? And how does a server get a cookie? Is it a separate request made by the server to the client? If the value I've asked the user for is *not* stored as a cookie, then is it passed as part of the HTTP submission or what? Thanks for any enlightenment on this. Paul seeing as you're a voomer here's a very mini explanation session has an id a: session id is passed to a user in the http headers users client gets sessionid and stores it in a cookie users client sends cookie with sessionid in it back to website every page load b: on the server a small file is stored in a temp directory containing all the stuff you've stored in session the file is named with the session id when php recieves a request, with a cookie, with a session id in it, then it grabs the related server side session files, pulls the variables from it an makes them available to you in $_SESSION. v simple :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sending XML requests as raw post data
Marc Steinert wrote: Hi there! The software I'm maintaining uses $HTTP_RAW_POST_DATA to receive XML requests, posted by some client written in C#. Now I need to write a PHP client that posts XML requests the same way as the C# client, so that the posted data is stored in $HTTP_RAW_POST_DATA, too. I tried to use curl to match my needs, but failed to establish a connection with the following code: $header[] = Host: .$host; $header[] = MIME-Version: 1.0; $header[] = Accept: text/xml; $header[] = Content-length: .strlen($xmlRequest); $header[] = Cache-Control: no-cache; $header[] = Connection: close \r\n; $header[] = $xmlRequest; // Contains the XML request curl_setopt($curl, CURLOPT_URL,self::BASE_URL); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_TIMEOUT, 4); curl_setopt($curl, CURLOPT_CUSTOMREQUEST,'POST'); curl_setopt($curl, CURLOPT_HTTPHEADER, $header); // Dispatch request and read answer $response = curl_exec($curl); // returns false Thanks for your help. Greetings from Germany Marc i think.. curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlhere ); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sending XML requests as raw post data
Marc Steinert wrote: Hi there! The software I'm maintaining uses $HTTP_RAW_POST_DATA to receive XML requests, posted by some client written in C#. Now I need to write a PHP client that posts XML requests the same way as the C# client, so that the posted data is stored in $HTTP_RAW_POST_DATA, too. I tried to use curl to match my needs, but failed to establish a connection with the following code: $header[] = Host: .$host; $header[] = MIME-Version: 1.0; $header[] = Accept: text/xml; $header[] = Content-length: .strlen($xmlRequest); $header[] = Cache-Control: no-cache; $header[] = Connection: close \r\n; $header[] = $xmlRequest; // Contains the XML request curl_setopt($curl, CURLOPT_URL,self::BASE_URL); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_TIMEOUT, 4); curl_setopt($curl, CURLOPT_CUSTOMREQUEST,'POST'); curl_setopt($curl, CURLOPT_HTTPHEADER, $header); // Dispatch request and read answer $response = curl_exec($curl); // returns false Thanks for your help. Greetings from Germany Marc and nearly forgot, you can loose all of those headers, half the ones you specified are for responses not requests anyways :p $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, self::BASE_URL); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $xmlRequest); curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_setopt($curl, CURLINFO_HEADER_OUT, 1); $response = curl_exec($curl); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php get rss tag using DOM
Morris wrote: Hi, I am trying to write a programme to read a rss xml file. ... media:content url=*exampe.jpg* ... ... scan anyone tell me how to get the url attribute? I wrote some codes similar: $doc = new DOMDocument; $doc-load($myFlickrRss); $r = $doc-getElementsByTagName('media:content'); for($i=0;$i=$r-length;$i++) { // help here } use http://rssphp.net/ you can view the source online and it's all done using DOMDocuments :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maybe we could all?
Marcus Gnaß wrote: Nathan Rixham wrote: Project: PHP Common Objects and Datatypes Has anything been setup for project COD-pieces yet? I like this name! ;) Hi Markus, Actually, yes it has - the project, well working group, has been called voom. So far there are 8 developers including myself; we've got 3 dedicated servers kindly donated by dan. Mailing list, irc room, single sign on, multiple svn repos including our own personal repos; fisheye for online source view, crucible for project reviews, jira as a bugtracker, confluence as a wiki; all the applications are integrated in with each other and we've also got a continuous integration build set-up coming for the main public projects; complete with code coverage, automated builds, maven integration and quite a lot more. There are currently multiple projects on the go and all suggestions are welcome. The members are all of varying skill levels and experience, with a great set of skills - infact between us I think we cover about everything ;) developer list so far: Dan Brown, Edmund Hertle, Eric Butera, Jason Prium, Kyle Terry, Tedd Sperling, Myself and Paul (who's actually a bit tentative - ie is on mailing list but just noted nothing else..) If you're interested just let me know and we'll get you introduced and set-up. regards! note: paul drop me a mail if you wanna get set-up properly, not heard from you for a few days. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP OOP
Eric Butera wrote: On Mon, Feb 9, 2009 at 11:20 AM, Thodoris t...@kinetix.gr wrote: Hi gang: At the college where I teach, they are considering teaching OOP, but they don't want to settle on a specific language. My thoughts are it's difficult to teach OOP without a language -- while the general concepts of OOP are interesting, people need to see how concepts are applied to understand how they work -- thus I think a specific language is required I lean toward C++ because I wrote in it for a few years AND C++ appears to be the most common, widespread, and popular OOP language. However, while I don't know PHP OOP, I am open to considering it because of the proliferation of web based applications. My personal opinion is that's where all programming is headed anyway, but that's just my opinion. With that said, what's the differences and advantages/disadvantages between C++ and PHP OOP? Cheers, tedd IMHO I think that you are right about using a specific language and you should strongly insist on that. Someone needs to see how objects are taking flesh and bones in real life and not just theoretically. You could consider Java as well before taking your final decision. -- Thodoris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Especially since PHP is trying to be Java. :) take a wild guess as to what I'm going to day.. java is v good language to learn OO specific principals and I'd strongly recommend it - while I may get more done with php oo practically, I learn and undertand a lot more with java. regards! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Free XML and WDL classes/scripts
Per Jessen wrote: Anton Heuschen wrote: What are some good php classes/scripts to work with: Parsing XML data/files. xpath() or xslt. /Per you'll do no finer than wso2 wsf/php for anything webservice related http://wso2.org/projects/wsf/php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php