[php-src] Issue #8566: >= operator processing order should be higher than a casting operator

From: Date: Mon, 16 May 2022 13:31:13 +0000
Subject: [php-src] Issue #8566: >= operator processing order should be higher than a casting operator
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241526@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8566 Author: noge075 ### Description The following code: ```php <?php echo '<pre>'; var_dump( 1 > 2, 1 >= 2, (bool) 1 > 2, (bool) 1 >= 2, (bool) (1 > 2), (bool) (1 >= 2), boolval(1 > 2), boolval(1 >= 2), ); echo '<pre>'; ``` Resulted in this output: ``` bool(false) bool(false) bool(false) bool(true) bool(false) bool(false) bool(false) bool(false) ``` But I expected this output instead: ``` bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) ``` When you use a ">=" operator you expect the compare has higher processing order than a type cast. https://3v4l.org/cN9YU ### PHP Version latest ### Operating System Ubuntu 20.04

« previous php.bugs (#241526) next »