BDKR wrote:
jason davidson wrote:
Ive seen the Control Flow constuct With ...End With used in VB (yup,
VB.. :)) although im not a fan of VB, i liked the feature, is there
any consideration to this kind of construct for php.
here the only example if it i could find online for anyone that hasnt
Derick Rethans wrote:
On Thu, 13 Nov 2003, Analysis & Solutions wrote:
The thing is, as I understand it, references are referring to a variable.
Your example doesn't have a variable to refer to.
If I misunderstand what's going on, I trust someone on the list will
correct me.
Your assesmen
Howdy,
I'm playing with php5 (from cvs), and came accross a strange error
that doesn't happen with php4. Maybe someone can shed some light on
this for me?
I get the error
"Fatal error: Only variables or references can be returned by reference
in /home/waboring/devel/html/test.php on line 11"
H
Analysis & Solutions wrote:
Hi Walt:
On Thu, Nov 13, 2003 at 10:22:31AM -0800, walt boring wrote:
This is very sad that the only real argument in the bug against fixing
it was
that it was hard. Come on! This is such a fundamental thing to be able
to do.
function &foo()
Analysis & Solutions wrote:
Hi Walter:
On Wed, Nov 12, 2003 at 10:13:10PM -0800, Walter A. Boring IV wrote:
"Fatal error: Only variables or references can be returned by reference
in /home/waboring/devel/html/test.php on line 11"
This is the expected behavior.
This has been discussed in
You will get PHP warnings on line 4 that $nonexistent doesn't exist, but
NO warnings on line 3 about $foo.
Stop repeating obvious stuff please, everyone on the list knows this.
PHP doesn't treat them the same, so how are we.
PHP itself isn't consistent, and
why we all asked for var
So I ask this:
get_declared_classes, class_exists
get_defined_functions, function_exist
get_defined_constants, defined
get_defined_vars, ???
classes, functions, constants are available everywhere, not just in the
current function. Including a foreign library adds classes, functions
and con
> $do = DB_DataObject::factory('test');
> $do->birthday = null;
> $do->find();
>
> to do
> SELECT * FROM test WHERE birthday IS NULL;
>
> but since there was no effective way to detect null, as apposed to
> unset.. I had to give up... - If this could be solved by
> variable_exists() - even thoug
Not quite. To understand the nature of NULL you must consider the following.
Suppose you have a variable $foo you wish to 'destroy' you can do so by doing
unset($foo) or $foo = NULL;. In both cases the value of $foo will be
destroyed, however the variable will remain, it's value will become NU
Ilia Alshanetsky wrote:
On August 14, 2003 03:11 pm, walt boring wrote:
exactly why isset() is either
1) a bad name for the function or
2) 'broken'
Wrong. isset() has a very proper name "is-set", which to me and other people
says that it will see if a variable is s
Timm Friebe wrote:
On Thu, 2003-08-14 at 13:18, [EMAIL PROTECTED] wrote:
[...]
Hmm, I thought a variable is set even if its value is NULL?
Unfortunately it is not:
[EMAIL PROTECTED]:~ > php -r '$a= NULL; var_dump(isset($a));'
bool(false)
- Timm
exactly why isset() is either
1) a bad n
Stefan Walk wrote:
On Thu, Aug 14, 2003 at 11:15:51AM -0700, walt boring wrote:
I for one would like to see something like variable_exists(), as I am
very annoyed with
the logic of isset() returning false if the variable exists and has a
value of null.
[snip]
I for one would much
Ilia Alshanetsky wrote:
Do we really need this function? I see 2 ways of 'implementing' this
functionality in PHP without having to add another function. For example:
(isset($var) || is_null($var)) or gettype($var).
Ilia
I for one would like to see something like variable_exists(), as I am
v
Howdy,
I hope this isn't too late in the game for PHP5, but I thought I'd
throw out a
request for a feature for array() declaration.
I'd like to be able to be lazy and declare something like
$foo = array('A' <=> 'Admin', 'C' <=> 'Customer');
which is really just a shortcut way to declare
$
Along the lines of talking about references with foreach(), is it
possible to allow PHP5's implementation of
func_get_args() to pass args as references, instead of the copy it is
doing in php4 ?
Thanks
Walt
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www
Howdy,
I have found a bug in the overload extension for php 4.3.2. I know it
is labeled as Experimental, but I thought I'd report it, since it is
causing me problems.
I get an error
Fatal error: Only variables can be passed by reference in
/home/waboring/overload_test.php on line 16
class
Howdy,
I have the latest version of the encoder and optimizer installed and am running
php 4.3.2. I have a simple test script below which shows that encoded files
complain that __CLASS__ and __FUNCTION__ are undefined.
$ php ~/EncoderBug2-enc.php
Notice: Use of undefined constant __CLASS__ - a
Howdy,
I was curious if it is possible to have an include work inside of a
namespace for php5, and have classes/functions/defines
that are declared in the included file become part of the namespace?
This is usefull for large library projects, where it would
be combersome for obvious reasons to
Kevin Waterson wrote:
This one time, at band camp, walt boring <[EMAIL PROTECTED]> wrote:
I am trying to compile the latest PHP5 from CVS w/ openssl support, and
it bails looking for krb.h. I have
a RedHat9 box. Below is the output. I have this same issue with
compiling php 4.3
I am trying to compile the latest PHP5 from CVS w/ openssl support, and
it bails looking for krb.h. I have
a RedHat9 box. Below is the output. I have this same issue with
compiling php 4.3.2. I usually have to hack the
Makefile to add the include path where the krb.h include is.
[EMAIL PROTE
20 matches
Mail list logo