1--TEST-- 2Bug #66797 (mb_substr only takes 32-bit signed integer) 3--SKIPIF-- 4<?php 5if (!extension_loaded('mbstring')) die('skip mbstring extension not available'); 6if (PHP_INT_SIZE != 8) die('skip this test is for 64bit platforms only'); 7?> 8--FILE-- 9<?php 10var_dump( 11 mb_substr('bar', 0, 0x7fffffff), 12 mb_substr('bar', 0, 0x80000000), 13 mb_substr('bar', 0xffffffff, 1), 14 mb_substr('bar', 0x100000000, 1) 15); 16?> 17--EXPECT-- 18string(3) "bar" 19string(3) "bar" 20string(0) "" 21string(0) "" 22