Tuesday, April 28, 2009

PHP 5.3 features

I was just going through the interview of Lukas Kahwe Smith(Release manager php.net), He was explaining the key features we need to look out in PHP 5.3. In all the feature i am keen to use the feature lambda functions and closures and also PHAR.
About lambda function and closure i have already posted.
In this post lets look at PHAR, In the interview Lukas didn't explain in depth about it just mentioned PHAR is the result of a "proof of concept" PEAR package called "PHP_Archive".

I found an very good article on net about PHAR with an example.

Monday, April 27, 2009

Where is the include coming from?

This is the post if you are interested to know how the flow of code is which file is included from were, here is a post with example of few of framework. I like it interesting post :)

Here a link.

Thursday, April 23, 2009

How to improve PHP session security

Nice article about session security, I never tried any of session hacking technique but its true as session id is stored in cookies and cookies are stored in user side and also it is passed to server directly anyone in between can sniff or hijack it :)

Go through the article how to protect it.

Tuesday, April 21, 2009

Embedding PHP In CSS

Very interesting tutorial just check it out Embedding PHP In CSS

Useful PHP links

This list will be growing, please comment or send me a mail to add more link :)

i) Useful PHP Classes and Components

ii) Open-source PHP applications

iii) How to Install PHP on Windows

iv) A-Z PHP

v) Useful PHP + jQuery Components & Tuts for Everyday Project

vi) The ABC's of PHP

vii) Top 5 php template engines

viii) 10 Advanced PHP Tips To Improve Your Programming

ix) 6 books to master PHP

Auto Increment in Sybase

I had to use auto increment column in Sybase, I found we can use column as identity for it. Then I had a problem as I wanted to know last inserted value or id but I didn’t get answer today I was browsing to find how we can do so I found we can do it using Sybase global variable @@identity.

Example:

An easy way to insert a row into salesdetail after inserting a row into sales is to use the @@identity global variable to insert the IDENTITY column value into salesdetail. The @@identity global variable stores the most recently generated IDENTITY column value. For example:

begin tran
insert sales values ("6380", "04/25/97")
insert salesdetail values ("6380", @@identity, "TC3218", 50, 50)
commit tran
This example is in a transaction because both inserts depend on each other to succeed. For example, if the sales insert fails, the value of @@identity is different, resulting in an erroneous row being inserted into salesdetail. Because the two inserts are in a transaction, if one fails, the entire transaction is rejected

PHP 5.3, Lambda Functions, and Closures

PHP 5.3 will have a lot of exciting new features. One of the most important one for me is the introduction of lambda functions and closures support.

For more information click