WordPress.org
News
Showcase
Hosting
Extend
Themes
Plugins
Patterns
Blocks
Openverse
↗
︎
Learn
Learn WordPress
Documentation
Forums
Developers
WordPress.tv
↗
︎
Community
Make WordPress
Photo Directory
Five for the Future
Events
Job Board
↗
︎
About
About WordPress
Enterprise
Gutenberg
↗
︎
Swag Store
↗
︎
Get WordPress
Search Trac
Get WordPress
Make WordPress Core
Blog
Handbook
Tickets
Components
Browse Source
Trac Timeline
Create a New Ticket
Search:
Login
Notifications
Context Navigation
Back to Ticket #16768
Ticket #16768
: mixed-constructor-test.php
File mixed-constructor-test.php,
203 bytes
(added by
markjaquith
,
15 years ago
)
Neat.
Line
1
<?php
2
3
class
Foo
{
4
function
Foo
()
{
5
echo
"Foo constructor called
\n
"
;
6
}
7
}
8
9
class
Bar
extends
Foo
{
10
function
__construct
()
{
11
echo
"Bar constructor called
\n
"
;
12
parent
::
__construct
();
13
}
14
}
15
16
new
Bar
;
Trac UI Preferences
Download in other formats:
Original Format