1--TEST-- 2Integer conversion from scientific notation 3--FILE-- 4<?php 5 6var_dump((int)"1.2345e9"); 7var_dump((int)"-1.2345e9"); 8var_dump(intval("1.2345e9")); 9var_dump(intval("-1.2345e9")); 10var_dump("1.2345e9" % PHP_INT_MAX); 11var_dump("-1.2345e9" % PHP_INT_MIN); 12var_dump("1.2345e9" | 0); 13var_dump("-1.2345e9" | 0); 14 15echo PHP_EOL; 16 17var_dump((int)" 1.2345e9 abc"); 18var_dump((int)" -1.2345e9 abc"); 19var_dump(intval(" 1.2345e9 abc")); 20var_dump(intval(" -1.2345e9 abc")); 21var_dump(" 1.2345e9 abc" % PHP_INT_MAX); 22var_dump(" -1.2345e9 abc" % PHP_INT_MIN); 23var_dump(" 1.2345e9 abc" | 0); 24var_dump(" -1.2345e9 abc" | 0); 25 26?> 27--EXPECTF-- 28int(1234500000) 29int(-1234500000) 30int(1234500000) 31int(-1234500000) 32int(1234500000) 33int(-1234500000) 34int(1234500000) 35int(-1234500000) 36 37int(1234500000) 38int(-1234500000) 39int(1234500000) 40int(-1234500000) 41 42Warning: A non-numeric value encountered in %s on line %d 43int(1234500000) 44 45Warning: A non-numeric value encountered in %s on line %d 46int(-1234500000) 47 48Warning: A non-numeric value encountered in %s on line %d 49int(1234500000) 50 51Warning: A non-numeric value encountered in %s on line %d 52int(-1234500000) 53