|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-10-27 09:44 UTC] derick@php.net
[2002-10-27 09:51 UTC] pcgod at gmx dot net
[2002-10-27 09:53 UTC] derick@php.net
[2002-10-27 10:21 UTC] sniper@php.net
[2002-10-27 10:40 UTC] pcgod at gmx dot net
[2002-10-27 12:25 UTC] msopacua@php.net
[2002-10-27 13:24 UTC] sniper@php.net
[2002-10-27 13:54 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 17:00:02 2025 UTC |
If I try to call a function from a class and the name of the function is inside a variable php seg faults. It works fine with php 4.2.3 and if the function isn't inside a class. Some pear script which use this don't produce a crash but give errors about an undefined function with a numeric name. (e.g. Fatal error: Call to undefined function: 138421340() in /usr/lib/php/PEAR.php on line 512) Example: <?php class bugtest { function bug() { echo "test\n"; } } $test = new bugtest(); $test1 = "bug"; $test->$test1(); ?> Backtrace: #0 execute (op_array=0x83b64bc) at /home/pcgod/php4/Zend/zend_execute.c:1496 1496 tmp = *function_name; (gdb) bt #0 execute (op_array=0x83b64bc) at /home/pcgod/php4/Zend/zend_execute.c:1496 #1 0x0822380b in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/pcgod/php4/Zend/zend.c:839 #2 0x081f26f4 in php_execute_script (primary_file=0x5ffff8f0) at /home/pcgod/php4/main/main.c:1542 #3 0x0823aa24 in main (argc=2, argv=0x5ffff994) at /home/pcgod/php4/sapi/cli/php_cli.c:695 #4 0x265dc1eb in __libc_start_main () from /lib/libc.so.6