drcp_pconn_close2.phpt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --TEST--
  2. DRCP: oci_pconnect() with oci_close() and oci8.old_oci_close_semantics OFF
  3. --EXTENSIONS--
  4. oci8
  5. --INI--
  6. oci8.old_oci_close_semantics=0
  7. oci8.connection_class=test
  8. --FILE--
  9. <?php
  10. require __DIR__."/details.inc";
  11. // Test will open a persistent connection
  12. // Close the connection
  13. // Open another connection
  14. // With oci_close() the connection is released to the pool and hence the
  15. // the second connection will be different
  16. echo "This is with a OCI_PCONNECT\n";
  17. var_dump($conn1 = oci_pconnect($user,$password,$dbase));
  18. $rn1 = (int)$conn1;
  19. oci_close($conn1);
  20. // Query for the row updated. The new value should be returned
  21. var_dump($conn2 = oci_pconnect($user,$password,$dbase));
  22. $rn2 = (int)$conn2;
  23. oci_close($conn2);
  24. // Compare the resource numbers
  25. if ($rn1 === $rn2)
  26. echo "Both connections share a resource : NOT OK\n";
  27. else
  28. echo "Both connections are different : OK\n";
  29. echo "Done\n";
  30. ?>
  31. --EXPECTF--
  32. This is with a OCI_PCONNECT
  33. resource(%d) of type (oci8 persistent connection)
  34. resource(%d) of type (oci8 persistent connection)
  35. Both connections are different : OK
  36. Done