Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
f1653229
Commit
f1653229
authored
Dec 10, 2007
by
jepso
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed new dql parser test script
parent
97b4eb3f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
9 deletions
+20
-9
test.php
draft/test.php
+20
-9
No files found.
draft/test.php
View file @
f1653229
<?php
require_once
'Doctrine.php'
;
function
autoload
(
$className
)
{
if
(
class_exists
(
$className
,
false
))
{
return
false
;
}
spl_autoload_register
(
array
(
'Doctrine'
,
'autoload'
));
$class
=
dirname
(
__FILE__
)
.
DIRECTORY_SEPARATOR
.
str_replace
(
'_'
,
DIRECTORY_SEPARATOR
,
$className
)
.
'.php'
;
if
(
file_exists
(
$class
))
{
require_once
(
$class
);
return
true
;
}
return
false
;
}
spl_autoload_register
(
'autoload'
);
$n
=
1000
;
$start
=
microtime
(
true
);
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
{
/* $parser = new Doctrine_Query_Parser('SELECT u.name, u.age FROM User u WHERE u.id = ?');
$parser->parse();*/
$scanner
=
new
Doctrine_Query_Scanner
(
'SELECT u.name, u.age FROM User u WHERE u.id = ?'
);
do
{
$token
=
$scanner
->
scan
();
}
while
(
$token
[
'type'
]
!==
Doctrine_Query_Token
::
T_EOS
);
$parser
=
new
Doctrine_Query_Parser
(
'SELECT u.name, u.age FROM User u WHERE u.id = ?'
);
$parser
->
parse
();
}
$end
=
microtime
(
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment