|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-06-28 14:40 UTC] andi at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 06:00:01 2025 UTC |
<? $var = 2147483648; settype($var, 'integer'); // SIGFPE echo gettype($var).':'.$var; //-or- $var = 2147483648; settype($var, 'string'); settype($var, 'integer'); // now NO SIGFPE echo gettype($var).':'.$var; //var == 2147483647 ?> *Note the cast from long I find this error will happen any time this is done. there are a few castings like this throughout zend_operator.c. Program received signal SIGFPE, Arithmetic exception. 0x809cbea in convert_to_long_base (op=0x821358c, base=10) at zend_operators.c:203 203 op->value.lval = (long) op->value.dval; (gdb) backtrace #0 0x809cbea in convert_to_long_base (op=0x821358c, base=10) at zend_operators.c:203 #1 0x809cb95 in convert_to_long (op=0x821358c) at zend_operators.c:185 #2 0x80c3079 in php_if_settype (ht=2, return_value=0x82135ac, this_ptr=0x0, return_value_used=0) at basic_functions.c:1057 #3 0x80f82fd in execute (op_array=0x8211e0c) at ./zend_execute.c:1574 #4 0x8090b29 in php_execute_script (primary_file=0xbfbfd5d0) at main.c:1200 #5 0x80a9c3d in apache_php_module_main (r=0x821a034, fd=30, display_source_mode=0) at sapi_apache.c:93 #6 0x808d18e in send_php () #7 0x808d1d0 in send_parsed_php () #8 0x8117f7b in ap_invoke_handler () #9 0x812aa01 in process_request_internal () #10 0x812aa60 in ap_process_request () #11 0x81224a9 in child_main () #12 0x8122634 in make_child () #13 0x812278f in startup_children () #14 0x8122d40 in standalone_main () #15 0x8123593 in main () #16 0x8060829 in _start ()