1--TEST-- 2Bug #81226: Integer overflow behavior is different with JIT enabled 3--EXTENSIONS-- 4opcache 5--INI-- 6opcache.enable=1 7opcache.enable_cli=1 8opcache.jit_buffer_size=1M 9opcache.jit=tracing 10--SKIPIF-- 11<?php if (PHP_INT_SIZE != 8) die("skip: 64-bit only"); ?> 12--FILE-- 13<?php 14// 65-bit hexadecimal number 15$hex = '10000000000000041'; 16 17for ($i = 0; $i < 200; ++$i) { 18 $characterReferenceCode = 0; 19 20 for ($j = 0, $len = strlen($hex); $j < $len; ++$j) { 21 $characterReferenceCode *= 16; 22 $characterReferenceCode += ord($hex[$j]) - 0x0030; 23 } 24 25 assert($characterReferenceCode > 0x10FFFF); 26} 27?> 28OK 29--EXPECT-- 30OK 31