@@ -82,7 +82,7 @@ public function power($other) {
8282 public function ceil () {
8383 return new self (false === strpos ($ this ->num , '. ' )
8484 ? $ this ->num
85- : ('- ' === $ this ->num { 0 } ? bcsub ($ this ->num , 0 , 0 ) : bcadd ($ this ->num , 1 , 0 ))
85+ : ('- ' === $ this ->num [ 0 ] ? bcsub ($ this ->num , 0 , 0 ) : bcadd ($ this ->num , 1 , 0 ))
8686 );
8787 }
8888
@@ -94,7 +94,7 @@ public function ceil() {
9494 public function floor () {
9595 return new self (false === strpos ($ this ->num , '. ' )
9696 ? $ this ->num
97- : ('- ' === $ this ->num { 0 } ? bcsub ($ this ->num , 1 , 0 ) : bcadd ($ this ->num , 0 , 0 ))
97+ : ('- ' === $ this ->num [ 0 ] ? bcsub ($ this ->num , 1 , 0 ) : bcadd ($ this ->num , 0 , 0 ))
9898 );
9999 }
100100
@@ -111,7 +111,7 @@ public function round($precision= 0) {
111111 $ a = '0. ' .str_repeat ('0 ' , $ precision ).'5 ' ;
112112 return new self (false === strpos ($ this ->num , '. ' )
113113 ? $ this ->num
114- : ('- ' === $ this ->num { 0 } ? bcsub ($ this ->num , $ a , $ precision ) : bcadd ($ this ->num , $ a , $ precision ))
114+ : ('- ' === $ this ->num [ 0 ] ? bcsub ($ this ->num , $ a , $ precision ) : bcadd ($ this ->num , $ a , $ precision ))
115115 );
116116 }
117117}
0 commit comments