Update of code samples with valid PHP