PHP: 'Fatal error: Call to undefined function' but function is defined?

jacovkss2

New member
This mini-script

<?php

class test
{
public function fesql()
{
echo 'pass 1', PHP_EOL;
return;
}

public function fetch( )
{
print_r( get_class_methods( 'test' ) );
return fesql( );
}
}

$ds = new test;
$ds->fetch( );
?>

results in this output:

Array
(
[0] => fesql
[1] => fetch
)

Fatal error: Call to undefined function fesql() in test.php on line 14

The function fesql is clearly defined, yet I still get a function undefined error.

What am I overlooking???
 
Back
Top