Wednesday, October 10, 2007

Zend Studio for Eclipse ("Neon") goes public

Zend is launching a beta of the next generation of the Zend Studio family - Zend Studio for Eclipse.

This beta release (code named "Neon") is based on proven Zend Studio technology and the Eclipse PHP Developers Tools (PDT) project. Zend Studio for Eclipse is the world's most powerful PHP IDE - providing professional PHP development capabilities combined with the Eclipse multi-language support and plug-in extension technology.

When Zend Studio for Eclipse is released, customers will get licenses for both the stand-alone Zend Studio and the Eclipse based product. Zend will also offer Zend Studio for Eclipse to all Zend Studio customers with a valid support subscription.

Zend Studio for Eclipse Features Include:

  • Eclipse/PDT based solution:
    • Community of millions of users and thousands of developers
    • Access to hundreds of plug-ins
    • Blended language support in one tool
    • PHP syntax highlighting, code assist and inspection
    • PHP basic debugging
  • High value addition based on Zend Studio:
    • Simplified, integrated, advanced debugging (local and remote/web server)
    • Code Refactoring
    • Profiling and Code Coverage
    • PHPUnit Test support
    • Enhanced Zend Framework integration
    • WYSIWYG HTML Editing
    • Zend Platform integration
    • Migration tools from Zend Studio users
    • BIRT integration
    • Unified installer for one stop install
    • And more…

Sunday, August 19, 2007

PHP IDE - Zend Studio Neon

The new version of famous PHP IDE Zend Studio 6.0 will be based on Eclipse platform. The beta version is available for testers. Now with the power of Zend Studio the PHP developers can enjoy all features of Eclipse platform. Thus the Zend Studio Neon can became your native IDE for PHP and for other languages as well. Based on eclipse it can provide the reach environment for development in Java, Python, JavaScript (AJAX) e.t.c...

There are few screenshots of Zend Studio Neon:

Pic1: Zend Studio Neon main window.
ZendFramework example project is opened:





Pic2: Zend Studio Neon debug perpective:





Pic3: Zend Studio Neon profile perspective:

Thursday, August 09, 2007

Zend, IBM expand PHP agreement

Zend Technologies and IBM are expanding their partnership in the PHP (Hypertext Preprocessor) application development space Wednesday, focusing on IBM's DB2 database.

Featured in the arrangement are enhanced IBM DB2 Express-C capabilities in IBM Zend Core for IBM, which is Zend's PHP offering. DB2 Express-C is IBM's hybrid relational-XML data server for accessing enterprise capabilities such as data replication, clustering and offsite disaster recovery.

Also included is new support for DB2 Connect technology to access i5/PS and z/OS DB2 data servers. DB2 Connect technology makes it easy to build PHP applications that leverage DB2 hosted on IBM System z and System i servers.

Additionally, users can leverage IBM System i Linux partitions and the System i attached BladeCenter and System x servers.

Users also get a single source of support for the integrated PHP and DB2 stack. Zend will provide this support.

Zend Core for IBM features a PHP-based application development and deployment stack that includes Apache, PHP, the Zend Framework and DB2 Express-C.


from infoworld.com

Thursday, August 02, 2007

Web application requirements

  • Database scheme
  • Valid XHTML output
  • SEO Friendly

Something else ?

Tuesday, July 31, 2007

Google Tricks

Enter just the word http for your search to find the top 1000 PageRanked sites.

Enter only www in your search to see how Google ranks the top 1,000 sites.

Manually type the following prefixes and note their utility:

# link:url Shows other pages with links to that url.
# related:url same as "what's related" on serps.
# site:domain restricts search results to the given domain.
# allinurl: shows only pages with all terms in the url.
# inurl: like allinurl, but only for the next query word.
# allintitle: shows only results with terms in title.
# intitle: similar to allintitle, but only for the next word. "intitle:seoforgoogle google" finds only pages with seoforgoogle in the title, and google anywhere on the page.
# cache:url will show the Google version of the passed url.
# info:url will show a page containing links to related searches, backlinks, and pages containing the url. This is the same as typing the url into the search box.
# spell: will spell check your query and search for it.
# stocks: will lookup the search query in a stock index.
# filetype: will restrict searches to that filetype. "-filetype:pdf" to remove Adobe PDF files.
# daterange: is supported in Julian date format only. 2452384 is an example of a Julian date.
# maps: If you enter a street address, a link to Yahoo Maps and to MapBlast will be presented.
# phone: enter anything that looks like a phone number to have a name and address displayed. Same is true for something that looks like an address (include a name and zip code)
# site:www.somesite.net "+www.somesite.+net" - (tells you how many pages of your site are indexed by google)
# allintext: searches only within text of pages, but not in the links or page title
# allinlinks: searches only within links, not text or title

Saturday, January 06, 2007

Top 5 new (and cool!) features in PHP5 that you probably haven’t heard of at vexxhost

PHP5 has brought so much new features but because of its big syntax changes, a big percentage of the PHP developing base has not made the change. Here are the top 10 new features that could change your mind.

Read more at vexxhost.com/blog/?p=27

Saturday, December 09, 2006

PHP Optimization Tricks

There are a number of tricks that you can use to squeeze the last bit of performance from your scripts. These tricks won't make your applications much faster, but can give you that little edge in performance you may be looking for. More importantly it may give you insight into how PHP internals works allowing you to write code that can be executed in more optimal fashion by the Zend Engine. Please keep in mind that these are not the 1st optimization you should perform. There are some far easier and more performance advantageous tricks, however once those are exhausted and you don't feel like turning to C, these maybe tricks you would want to consider. So, without further ado...
1) When working with strings and you need to check that the string is either of a certain length you'd understandably would want to use the strlen() function. This function is pretty quick since it's operation does not perform any calculation but merely return the already known length of a string available in the zval structure (internal C struct used to store variables in PHP). However because strlen() is a function it is still somewhat slow because the function call requires several operations such as lowercase & hashtable lookup followed by the execution of said function. In some instance you can improve the speed of your code by using a isset() trick.

Ex.
if (strlen($foo) < href="http://php-docs.blogspot.com/">PHP optimizer. It is a still a good idea to keep in mind since not all opcode optimizers perform this optimization and there are plenty of ISPs and servers running without an opcode optimizer.

3) When it comes to printing text to screen PHP has so many methodologies to do it, not many users even know all of them. This tends to result in people using output methods they are already familiar from other languages. While this is certainly an understandable approach it is often not best one as far as performance in concerned.

print vs echo

Even both of these output mechanism are language constructs, if you benchmark the two you will quickly discover that print() is slower then echo(). The reason for that is quite simple, print function will return a status indicating if it was successful or not, while echo simply print the text and nothing more. Since in most cases (haven't seen one yet) this status is not necessary and is almost never used it is pointless and simply adds unnecessary overhead.

printf

Using printf() is slow for multitude of reasons and I would strongly discourage it's usage unless you absolutely need to use the functionality this function offers. Unlike print and echo printf() is a function with associated function execution overhead. More over printf() is designed to support various formatting schemes that for the most part are not needed in a language that is typeless and will automatically do the necessary type conversions. To handle formatting printf() needs to scan the specified string for special formatting code that are to be replaced with variables. As you can probably imagine that is quite slow and rather inefficient.

heredoc

This output method comes to PHP from PERL and like most features adopted from other languages it's not very friendly as far as performance is concerned. While this method allows you to easily output large chunks of text while preserving things like newlines and even allow for variable handling inside the text block this is quite slow and there are better ways to do that. Performance wise this is just marginally faster then printf() however it does not offer nearly as much functionality.

?> <?

When you need to output a large or even a medium sized static bit of text it is faster and simpler to put it outside the of PHP. This will make the PHP's parser effectively skipover this bit of text and output it as is without any overhead. You should be careful however and not use this for many small strings in between PHP code as multiple context switches between PHP and plain text will ebb away at the performance gained by not having PHP print the text via one of it's functions or constructs.

4) Many scripts tend to reply on regular expression to validate the input specified by user. While validating input is a superb idea, doing so via regular expression can be quite slow. In many cases the process of validation merely involved checking the source string against a certain character list such as A-Z or 0-9, etc... Instead of using regex in many instances you can instead use the ctype extension (enabled by default since PHP 4.2.0) to do the same. The ctype extension offers a series of function wrappers around C's is*() function that check whether a particular character is within a certain range. Unlike the C function that can only work a character at a time, PHP function can operate on entire strings and are far faster then equivalent regular expressions.
Ex.
preg_match("![0-9]+!", $foo);
vs
ctype_digit($foo);

5) Another common operation in PHP scripts is array searching. This process can be quite slow as regular search mechanism such as in_array() or manuall implementation work by itterating through the entire array. This can be quite a performance hit if you are searching through a large array or need to perform the searches frequently. So what can you do? Well, you can do a trick that relies upon the way that Zend Engine stores array data. Internally arrays are stored inside hash tables when they array element (key) is the key of the hashtables used to find the data and result is the value associated with that key. Since hashtable lookups are quite fast, you can simplify array searching by making the data you intend to search through the key of the array, then searching for the data is as simple as $value = isset($foo[$bar])) ? $foo[$bar] : NULL;. This searching mechanism is way faster then manual array iteration, even though having string keys maybe more memory intensive then using simple numeric keys.

Ex.

$keys = array("apples", "oranges", "mangoes", "tomatoes", "pickles");
if (in_array('mangoes', $keys)) { ... }

vs

$keys = array("apples" => 1, "oranges" => 1, "mangoes" => 1, "tomatoes" => 1, "pickles" => 1);
if (isset($keys['mangoes'])) { ... }

The bottom search mechanism is roughly 3 times faster.