This file contains hidden or 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 | |
| function countChange($desiredResult, $typeOfCoins) | |
| { | |
| if ($desiredResult <= 0) return 0; | |
| if (empty($typeOfCoins)) return 0; | |
| if (count($typeOfCoins) == 1) { | |
| return ($desiredResult % $typeOfCoins[0] == 0) ? 1 : 0; | |
| } |
This file contains hidden or 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 | |
| if ($argc < 3) die('Provide trace file and filter'); | |
| $file = $argv[1]; | |
| $filter = $argv[2]; | |
| $f = fopen($file, 'r'); | |
| if (!$f) die('Couldn\'t open file for reading'); | |
| fgets($f); //Useless header |
This file contains hidden or 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 | |
| require_once __DIR__ . '/bootstrap.php.cache'; | |
| require_once __DIR__ . '/AppKernel.php'; | |
| use Symfony\Bundle\FrameworkBundle\Console\Application; | |
| use Symfony\Component\Console\Input\ArrayInput; | |
| $kernel = new AppKernel('test', true); |