Add folding support for PHP