Opcache idea: Support !is_int($x)

#7 · closed · 0 comments

View on GitHub ↗

TysonAndre

Related to #6 - the BOOL_NOT can be skipped ``` » ~/php-8.0.0-dev-install/bin/php -d opcache.file_cache= -d opcache.opt_debug_level=0x20000 test.php $_main: ; (lines=1, args=0, vars=0, tmps=0) ; (after optimizer) ; /path/to/test.php:1-6 L0 (6): RETURN int(1) f1: ; (lines=10, args=2, vars=2, tmps=2) ; (after optimizer) ; /path/to/test.php:2-5 L0 (2): CV0($x) = RECV 1 L1 (2): CV1($y) = RECV 2 L2 (3): INIT_FCALL 1 96 string("var_export") L3 (3): T3 = TYPE_CHECK (long) CV1($y) L4 (3): T2 = BOOL_NOT T3 L5 (3): SEND_VAL T2 1 L6 (3): DO_ICALL L7 (4): T3 = TYPE_CHECK (long) CV1($y) L8 (4): T2 = BOOL_NOT T3 L9 (4): RETURN T2 ```

Comments