This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<p>Here are Webber’s points:</p> | |
<ul> | |
<li>If a method can be static, declare it static. Speed improvement is by a factor of 4.</li> | |
<li>echo is faster than print.(<em>* compare with list from phplens by John Lim</em>)</li> | |
<li>Use echo’s multiple parameters instead of string concatenation.</li> | |
<li>Set the maxvalue for your for-loops before and not in the loop.</li> | |
<li>Unset your variables to free memory, especially large arrays.</li> | |
<li>Avoid magic like __get, __set, __autoload</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CyberSource { | |
const ENV_TEST = 'https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.67.wsdl'; | |
const ENV_PRODUCTION = 'https://ics2ws.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.67.wsdl'; | |
const VERSION = '0.2'; | |
const API_VERSION = '1.67'; | |
/** | |
* | |
* @var string The URL to the WSDL endpoint for the environment we're |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Format date using PHP DateTime Object | |
**/ | |
function format_date_from_mysql($date,$newformatted='M d, Y') | |
{ | |
return DateTime::createFromFormat("Y-m-d H:i:s", $date)->format($newformatted); | |
} | |
/** |