Skip to content

Instantly share code, notes, and snippets.

@jorgecc
Last active October 4, 2018 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jorgecc/3ee453e573624eb1722872a072320218 to your computer and use it in GitHub Desktop.
Save jorgecc/3ee453e573624eb1722872a072320218 to your computer and use it in GitHub Desktop.
DI Example 1
<?php
class ClassConvertMoneyWithoutInjection
{
function conversor($value)
{
return $value*1.15;
}
public function example($money) {
echo "$money is converted in ".$this->conversor($money)."<br>";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment