Skip to content

Commit

Permalink
change error report
Browse files Browse the repository at this point in the history
  • Loading branch information
wilon committed Nov 27, 2017
1 parent dfb382e commit 5f4c786
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

vendor/
composer.lock
4 changes: 2 additions & 2 deletions test.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

error_reporting(E_ERROR);
error_reporting(E_ALL);
require __DIR__ . '/number2chinese.php';

$br = PHP_SAPI == 'cli' ? "\r\n" : '<br>';

if ($num = $argv[1]) {
if (array_key_exists(1, $argv) && $num = $argv[1]) {
echo ($num), ' -> ', number2chinese($num), $br;
echo ($num), ' -> ', number2chinese($num, true), $br;
die;
Expand Down

0 comments on commit 5f4c786

Please sign in to comment.