Hi!
I'm new to phpbuilder.com. People are a little up tight at devnetwork forums (<!-- m --><a class="postlink" href="http://forums.devnetwork.net/index.php">http://forums.devnetwork.net/index.php</a><!-- m -->). So I thought I would check this forum out!
My question is, is there a way to check your php code to see if it is php5 compliant? Maybe an editor like Eclipse? I have BBEdit, but I don't think that it has anything like that on it. I just use it because it's extremely fast and still has a lot of features.
Thank You in advance! if it works on a php 5 server then its valid...
well formed is another case... thats just depends on how good of a coder u areZend Studio (<!-- m --><a class="postlink" href="http://www.zend.com/products/zend_studio/">http://www.zend.com/products/zend_studio/</a><!-- m -->) includes a code analyzer (<!-- m --><a class="postlink" href="http://www.zend.com/products/zend_studio/feature_list#Analysis">http://www.zend.com/products/zend_studi ... t#Analysis</a><!-- m -->). (I've not used it, so can't comment on it other that I know it exists.)Thank You for the info NogDog, I'm going to look in to it. I will need such an instrument unfortunately, my coding skills are limited to very basic PHP, and that is based on php4. The heaviest I get is some light class objects and functions, not to much mysql.
I had purchased php advanced books but by the time I got around to 'em they are out dated and I need to buy a second edition! I put php5 on my system anyway, why start bad habits now right?You can write a script which finds all your php files and runs php -l on them. However, this only checks for syntax errors so it will probably pass even if your application is entirely incompatible with PHP5.
As others have suggested, you just have to try it. Just install PHP5 on a dev server and thoroughly test the application. Bear in mind that you may need to modify it in ways which it no longer functions in PHP4. Don't worry about that though, supporting PHP4 is pointless anyway.
Mark...Don't worry about that though, supporting PHP4 is pointless anyway.
Mark
It's pointless unless you're writing an application which (a) is targeted for a client who is on a host running PHP4, (b) targeted for general distribution (open source or for purchase) and you don't want to exclude potential users/buyers who happen to be on the significant percentage of servers which are still running PHP4, or (c) any of the other reasons you can think of that it might be desirable for your application to run under PHP4.
Just like a good web designer who wants to reach the widest market for a site will not assume that all users are running IE7 on WinXP-SP2 over a Cable or DSL modem, a PHP developer may not always want to assume that everyone who will want to use his/her program will be able to install it on the latest/greatest versions of PHP, MySQL, and Apache. How backwards-compatible it should be will need to be a case-by-case decision based on an analysis of your expected user base, the current distribution of PHP versions amongst that user base, and the benefits/trade-offs of using functionalities only available in the latest versions versus settling for the use of older functionalities.
I'm new to phpbuilder.com. People are a little up tight at devnetwork forums (<!-- m --><a class="postlink" href="http://forums.devnetwork.net/index.php">http://forums.devnetwork.net/index.php</a><!-- m -->). So I thought I would check this forum out!
My question is, is there a way to check your php code to see if it is php5 compliant? Maybe an editor like Eclipse? I have BBEdit, but I don't think that it has anything like that on it. I just use it because it's extremely fast and still has a lot of features.
Thank You in advance! if it works on a php 5 server then its valid...
well formed is another case... thats just depends on how good of a coder u areZend Studio (<!-- m --><a class="postlink" href="http://www.zend.com/products/zend_studio/">http://www.zend.com/products/zend_studio/</a><!-- m -->) includes a code analyzer (<!-- m --><a class="postlink" href="http://www.zend.com/products/zend_studio/feature_list#Analysis">http://www.zend.com/products/zend_studi ... t#Analysis</a><!-- m -->). (I've not used it, so can't comment on it other that I know it exists.)Thank You for the info NogDog, I'm going to look in to it. I will need such an instrument unfortunately, my coding skills are limited to very basic PHP, and that is based on php4. The heaviest I get is some light class objects and functions, not to much mysql.
I had purchased php advanced books but by the time I got around to 'em they are out dated and I need to buy a second edition! I put php5 on my system anyway, why start bad habits now right?You can write a script which finds all your php files and runs php -l on them. However, this only checks for syntax errors so it will probably pass even if your application is entirely incompatible with PHP5.
As others have suggested, you just have to try it. Just install PHP5 on a dev server and thoroughly test the application. Bear in mind that you may need to modify it in ways which it no longer functions in PHP4. Don't worry about that though, supporting PHP4 is pointless anyway.
Mark...Don't worry about that though, supporting PHP4 is pointless anyway.
Mark
It's pointless unless you're writing an application which (a) is targeted for a client who is on a host running PHP4, (b) targeted for general distribution (open source or for purchase) and you don't want to exclude potential users/buyers who happen to be on the significant percentage of servers which are still running PHP4, or (c) any of the other reasons you can think of that it might be desirable for your application to run under PHP4.
Just like a good web designer who wants to reach the widest market for a site will not assume that all users are running IE7 on WinXP-SP2 over a Cable or DSL modem, a PHP developer may not always want to assume that everyone who will want to use his/her program will be able to install it on the latest/greatest versions of PHP, MySQL, and Apache. How backwards-compatible it should be will need to be a case-by-case decision based on an analysis of your expected user base, the current distribution of PHP versions amongst that user base, and the benefits/trade-offs of using functionalities only available in the latest versions versus settling for the use of older functionalities.