Re: [nyphp-talk] equal (==) vs identical (===) and casting

2009-02-23 Thread Rolan Yang
Konstantin Rozinov wrote: Hey guys, Some more questions. 1. Is there a significant speed difference between the equal operator (==) and the identical operator (===)? Should I even be concerned about this? For example, if I know a variable will be of type INT 100% of the time, and I pass it to

Re: [nyphp-talk] mysql vs mysqli

2009-02-23 Thread Artur Marnik
From my experience if mysql is sufficient you shouldn't rewrite all the code I used mysqli recently because I had to establish SSL connection to the external database server (mysql extension cannot do that) I worked great and I discovered power of OO mysqli I really liked it and if possible I

[nyphp-talk] equal (==) vs identical (===) and casting

2009-02-23 Thread Konstantin Rozinov
Hey guys, Some more questions. 1. Is there a significant speed difference between the equal operator (==) and the identical operator (===)? Should I even be concerned about this? For example, if I know a variable will be of type INT 100% of the time, and I pass it to a function which expects th

[nyphp-talk] mysql vs mysqli

2009-02-23 Thread Konstantin Rozinov
Hey guys, I have a lot of PHP code written that uses the mysql extension. Should I rework the code to use mysqli extension? How can I tell if it will be worth the effort and time? Any advice would appreciated. Thanks! Konstantin ___ New York PHP User G

Re: [nyphp-talk] Flattening a Tree

2009-02-23 Thread Ajai Khattri
On Mon, 23 Feb 2009, Tim Lieberman wrote: > Yup, your standard depth-first tree traversal. But in order to build a flat array, I'd have to pass that by reference into my recursive function so it can append the each node right? -- Aj. ___ New York

[nyphp-talk] FW: [PHP] Why PHP won

2009-02-23 Thread Hans Zaunere
All, an interesting/useful read... And sharding: http://startuplessonslearned.blogspot.com/2009/01/sharding-for-startups.html > http://startuplessonslearned.blogspot.com/2009/01/why-php-won.html ___ New York PHP User Group Community Talk Mailing Li

Re: [nyphp-talk] Flattening a Tree

2009-02-23 Thread Tim Lieberman
On Feb 23, 2009, at 6:51 PM, Ajai Khattri wrote: Its a tree structure so Ive no idea how many arrays are in there, so Id need to walk through each array recursively and get keys? Yup, your standard depth-first tree traversal. ___ New York PHP Us

Re: [nyphp-talk] Flattening a Tree

2009-02-23 Thread Ajai Khattri
On Mon, 23 Feb 2009, csnyder wrote: > Append each sub-key's name to the current name, separated by an underscore. > > $deep['foo']['bar']['quux'] > > becomes > > $flat['foo_bar_quux'] > > Provided the keys don't have underscores in them already, of course. ;-) Its a tree structure so Ive no i

Re: [nyphp-talk] Flattening a Tree

2009-02-23 Thread csnyder
On Mon, Feb 23, 2009 at 6:12 PM, Ajai Khattri wrote: > > Best way to flatten a multi-dimensional array of objects into a single > dimensional array? Append each sub-key's name to the current name, separated by an underscore. $deep['foo']['bar']['quux'] becomes $flat['foo_bar_quux'] Provided

[nyphp-talk] Flattening a Tree

2009-02-23 Thread Ajai Khattri
Best way to flatten a multi-dimensional array of objects into a single dimensional array? -- A ___ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php

Re: [nyphp-talk] how to grab original uri from error page

2009-02-23 Thread Michael Southwell
Daniel Convissor wrote: Hey Michael: On Mon, Feb 23, 2009 at 03:59:52PM -0500, Michael Southwell wrote: I need to grab the original uri after having been redirected to an error page (like example.com/blah now that I'm in 404.php). It's in $_SERVER['REQUEST_URI']. doh, of course ;-( My fa

Re: [nyphp-talk] PHP scripts running in JBoss

2009-02-23 Thread Artur Marnik
There are a few ways to approach PHP/JEE application server integration, and the solution you pick depends on the answer to a few questions: - Is this a straight conversion of your applications from PHP to Java? Or do you intend to leave some portion in PHP? temporary we will leave our PHP

Re: [nyphp-talk] PHP scripts running in JBoss

2009-02-23 Thread Artur Marnik
When you want to start a new discussion, you need to make a whole new email. Replying to an earlier email makes your discussion show up as part of the earlier discussion. ok sorry for that Sorry for not really answering your question, but _exactly_ why do they want to do this? Seems li

Re: [nyphp-talk] PHP scripts running in JBoss

2009-02-23 Thread Daniel Krook
Hi Artur, Artur Marnik wrote on 02/23/2009 03:42:31 PM: > Hi All > > In my company we are using Linux servers where we have > PHP, mysql and > all other nice stuff. My new manager is a Java guy and he > always worked > with Java and his new idea is to move all our stuff to > Jboss. There i

Re: [nyphp-talk] PHP scripts running in JBoss

2009-02-23 Thread Daniel Convissor
Hi Artur: When you want to start a new discussion, you need to make a whole new email. Replying to an earlier email makes your discussion show up as part of the earlier discussion. On Mon, Feb 23, 2009 at 03:42:31PM -0500, Artur Marnik wrote: > > My new manager is a Java guy and he always work

Re: [nyphp-talk] how to grab original uri from error page

2009-02-23 Thread Daniel Convissor
Hey Michael: On Mon, Feb 23, 2009 at 03:59:52PM -0500, Michael Southwell wrote: > I need to grab the original uri after having been redirected > to an error page (like example.com/blah now that I'm in 404.php). It's in $_SERVER['REQUEST_URI']. My favorite way to figure stuff like this out is pu

Re: [nyphp-talk] how to grab original uri from error page

2009-02-23 Thread Artur Marnik
try $_SERVER["HTTP_REFERER"] Artur Michael Southwell wrote: I need to grab the original uri after having been redirected to an error page (like example.com/blah now that I'm in 404.php). I suppose this is somewhere in HttpRequest but I can't find it (brains not working very well right now). An

[nyphp-talk] how to grab original uri from error page

2009-02-23 Thread Michael Southwell
I need to grab the original uri after having been redirected to an error page (like example.com/blah now that I'm in 404.php). I suppose this is somewhere in HttpRequest but I can't find it (brains not working very well right now). Anybody? -- = Michael Southwell Vice President, E

Re: [nyphp-talk] PHP scripts running in JBoss

2009-02-23 Thread Jake McGraw
Try using this: http://php-java-bridge.sourceforge.net/pjb/ - jake On Mon, Feb 23, 2009 at 3:42 PM, Artur Marnik wrote: > Hi All > > In my company we are using Linux servers where we have PHP, mysql and all > other nice stuff. My new manager is a Java guy and he always worked with > Java and hi

[nyphp-talk] PHP scripts running in JBoss

2009-02-23 Thread Artur Marnik
Hi All In my company we are using Linux servers where we have PHP, mysql and all other nice stuff. My new manager is a Java guy and he always worked with Java and his new idea is to move all our stuff to Jboss. There is only one problem - we don't have enough time to migrate all of our PHP co