Skip to content

Commit

Permalink
Merge pull request wangzheng0822#292 from git-zjx/patch-4
Browse files Browse the repository at this point in the history
ord 判断问题
  • Loading branch information
wangzheng0822 authored Apr 11, 2019
2 parents 7926554 + d8af427 commit 281c748
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions php/08_stack/Compute.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function expression($str)
$operStack[] = NULL;

for ($i = 0; $i < count($arr); $i++){
if (ord($arr[$i]) >= 48 && ord($arr[$i] <= 57)){
if (ord($arr[$i]) >= 48 && ord($arr[$i]) <= 57){
array_push($numStack, $arr[$i]);
continue;
}
Expand Down Expand Up @@ -85,4 +85,4 @@ function compute(&$numStack, &$operStack){
}
expression('-1+2-(1+2*3)');
echo PHP_EOL;
eval('echo -1+2-(1+2*3);');
eval('echo -1+2-(1+2*3);');

0 comments on commit 281c748

Please sign in to comment.