|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-08-05 15:00 UTC] iliaa@php.net
[2006-08-13 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 23:00:01 2025 UTC |
Description: ------------ Prepare crashes inside a function or inside a class function. The same statment works outside the function. Reproduce code: --------------- $db = new PDO('mysql:dbname=DATABASE;host=HOST', 'USER', 'PASS'); $db_stmnt = $db->prepare('INSERT INTO table(start_date, end_date, title) VALUES (?,?,?)'); print_r($db_stmnt); exit(); Expected result: ---------------- PDO Object ( ) PDOStatement Object ( [queryString] => INSERT INTO table(start_date, end_date, title) VALUES (?,?,?) ) Actual result: -------------- When in in a function apache crashes and prompts to download the script file. Outside the function you get the expected results.