1

I have couple of questions. I have written test case like this.

$animals = array(
    array('Spook', 'spook.png'),
    array('Helmut', 'pic1.jpg')
);

foreach($animals as $row){
   $name = $row[0];
   $picname = $row[1];
   $picture = dirname(__FILE__) . "/$picname";
   bind_param($stmt, 1, "name", DB2_PARAM_IN);
   bind_param($stmt, 2, "picture", DB2_PARAM_FILE, DB2_BINARY);
   $res = execute($stmt);
   echo "insert into animal pics success\n";
}

From for loop i am iterating each row and calling execute. bind_param will remember all the values and in execute using variable name "name"and "picture" it will try to fetch values from symbol_table. but its failing. I have modified code from php 5 to php 7. In php5 it pass this test case but in php7 it is failing.

key = zend_string_init( curr->varname, strlen(curr->varname), 0 );
temp =  zend_hash_find( &EG(symbol_table), key );
zend_string_release(key);

1) Am i missing something?

2) In PHP5 i was using active_symbol_table but here (php7) i modified it to symbol_table( somewhere in google i found it to modify active_symbol_table to symbol_table). Is it correct?

Andrea
  • 19,134
  • 4
  • 43
  • 65
abhi7436
  • 43
  • 6
  • I don't really understand the question, but taking a wild guess you might be looking for zend_hash_find_ind. – NikiC Mar 24 '16 at 23:12

0 Answers0