Voting

: min(zero, six)?
(Example: nine)

The Note You're Voting On

martinpauly [at] google mail [dot] com
17 years ago
will this work for variables as well?

it would be great, if the following worked:

<?php
class A {
protected static
$table = "table";
public static function
connect(){
//do some stuff here
echo static::$table;
return static::
getInstance(); //function getInstance() now can return classes A or B depending on the context it was called
}
...
}

class
B extends A {
protected static
$table = "subtable";
...
}

$table = B::connect(); //hopefully the output will be: subtable
?>

<< Back to user notes page

To Top