473,322 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Can i 'hijack some code' from php?

Hi.

Is it possible to 'subclass' php the same way you can subclass c++

a simple example would be...

// CODE

<?

function print( $txt )
{
$txt = "[add something]".txt;
// pass it top php
php::print( $txt ); // <========= How could that be done?
}

print( 'this is a test' );

?>
// CODE

Is something like that possible?

Many thanks
Jul 17 '05 #1
2 1562
Nope.

Uzytkownik "Sims" <si*********@hotmail.com> napisal w wiadomosci
news:c0*************@ID-162430.news.uni-berlin.de...
Hi.

Is it possible to 'subclass' php the same way you can subclass c++

a simple example would be...

// CODE

<?

function print( $txt )
{
$txt = "[add something]".txt;
// pass it top php
php::print( $txt ); // <========= How could that be done?
}

print( 'this is a test' );

?>
// CODE

Is something like that possible?

Many thanks

Jul 17 '05 #2
With total disregard for any kind of safety measures "Sims"
<si*********@hotmail.com> leapt forth and uttered:
Is something like that possible?

Many thanks


PHP does not support namespaces so doing what you suggested is not
possible. You can do something similar if you define a class
however.

class PHP {
function method() {

}
}

PHP::method();
--
Phil Roberts | Nobody In Particular | http://www.flatnet.net/
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

51
by: Mudge | last post by:
Please, someone, tell me why OO in PHP is better than procedural.
9
by: bigoxygen | last post by:
Hi. I'm using a 3 tier FrontController Design for my web application right now. The problem is that I'm finding to have to duplicate a lot of code for similar functions; for example, listing...
4
by: jason | last post by:
Hello. Newbie on SQL and suffering through this. I have two tables created as such: drop table table1; go drop table table2; go
16
by: Dario de Judicibus | last post by:
I'm getting crazy. Look at this code: #include <string.h> #include <stdio.h> #include <iostream.h> using namespace std ; char ini_code = {0xFF, 0xFE} ; char line_sep = {0x20, 0x28} ;
109
by: Andrew Thompson | last post by:
It seems most people get there JS off web sites, which is entirely logical. But it is also a great pity since most of that code is of such poor quality. I was looking through the JS FAQ for any...
6
by: Jeff | last post by:
Guys, I posted this here because I want to monitor HTTP Responses and URL's and I thought the Webclasses might have been the correct area Ok so I dont really want to Hijack IE6 but what I...
1
by: endlesschuck | last post by:
Hello, I have a repeater which simply has the following: <input type="checkbox" id='chkRptItem_<%# DataBinder.Eval(Container.DataItem, "ID") %>' name="chkRptItems" value='<%#...
8
by: ravit | last post by:
Hello everybody, Recently I got to do some initialization work just before first executable statement of every user C application. For that, Can we hijack the main function...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.