Archive

- Posts Tagged ‘PHP’

PHP Penetration in Enterprise Market

PHP Penetration in Enterprise Market is increasing. It has already many core applications running on Enterprise and it is going to increase at good rate as come in recent survey. Zend has become good and guiding force for enterprises all over the world. Availability of developers and ease of development… (Continue)

stdClass Object to Array in PHP

If you deal with Restful services then many times you need to deal with stdClass Object. This generally create requirements to stdClass Object to Array conversion. Here is the code to do that in Class: <?php function objectToArray($o) { if (is_object($o)) { $o = get_object_vars($o); } if (is_array($o)) { return… (Continue)

PHP Image Info Function. View Exif info of Images

Using PHP information function, you can write small script to review your camera setting at the time of image capture. Here is small script to view images in a folder with few important settings. Sample Output: If you want more information for each image then un-comment the line (//print_r($exif['EXIF']);) and… (Continue)

PHPEd Version 6 is ready to get released

A major version of PHPEd (v6), an IDE for PHP is ready to come into market. Many of you may know about PHPEd. It is good IDE but only not so good thing is that it is not open source. New features in PHPEd 6 are greatly improved php code… (Continue)

Data Structure in PHP: Quicksort

Quicksort is one of the best method in sorting algorithm. It has best and average case performance as O(n Log n). It means for 100 element, sorting can take around 660 iterations whereas in bubble sort it will take around 10000 iteration. In the example below, which has eight elements,… (Continue)

Data Structure in PHP: Bubble Sort

Here is the code for a data structure items in PHP. It is about Bubble Sort. Bubble sort is the way of sorting data. This is regarded as bad algorithm due to its worst case performance O(n2). Average case performance is also same as O(n2). But this sorting algorithm is… (Continue)

PHP Stream: stream_set_read_buffer and stream_set_write_buffer

First something about stream from PHP.net: Stream came to PHP in version 4.3 to generalize file, network, data compression, and other operations which share a common set of functions and uses. In its simplest definition, a stream is a resource object which exhibits streamable behavior. That is, it can be… (Continue)

PHP is not Java

I went for an Interview and there interviewer asked me few questions. I disagreed on two questions and their answers. According to interviewer, it is must to use parenthesis while initializing class( new className()), but I said if it requires parameters then it is essential otherwise it is not. After… (Continue)

Play with YQL: HTML Scraping using YQL and PHP

Here is a quick post. It is a product created from a play with YQL (Yahoo Query Language). YQL is very powerful in scrapping HTML from any page on web. Yahoo YQL and Yahoo Pipes are very powerful tool. Yahoo pipes is very good for merging Feed. This YQL play… (Continue)