http://pastebin.com/766120richardlynch: here look at that cause i had the lines messed upwhat line should i put that syntax on now?

Burian

I changed my max file size in my php.ini folder to 9 mb and it will still only allow me to upload 2....is there anything else to change?

m-00kie

any idea why it doesnt seem to work?

cynic

m-00kie: It works fine for me... must be something else.Time to run though, bye!

CalvadoS

Hello, php-mysql can get a sql queries execution time ?

richardlynch

m-00kie: http://pastebin.com/766127CalvadoS: You can either use SQL commands to get the time, if your DB has them, or you can use microtime() before/after, which includes the tiny overhead of PHP sending query.

CalvadoS

hmm

tdd1984

richardlync: did you get the new pastebin i posted?

CalvadoS

well when I select something from mysql it returns 1 row in set (1.00 sec) after result

m-00kie

richardlynch - http://pastebin.com/766135that's printing:F:OVER: /0,however if i move the F: line to above the if(()&&()) line, it prints fine

ak_work

hi, i would like to know if simplexml is completely diferent from xml(expat), or simplexml is a easy way to use xml instead of xml parser (expat).

richardlynch

m-00kie: First, you should not use $_f, I don't think.

korkl

m-00kie, why do you use if() : and not if() { } ? is that even legal?

m-00kie

richardlynch - why not?korkl - huh?

cuban

hey all, I need to do two things in a variable.. how can I do that? I've looked all over the docs... IE: $currentdir=ltrim(dirname(__FILE__),substr(d:\testtest\test,0,3));. That removes d:\. I'd like to append a / before the output of $currentdir

richardlynch

m-00kie: Reserved for PHP superglobals

korkl

m-00kie, sorry that was meant for richardlynch

m-00kie

richardlynch - no, there's only 9 or so superglobals reserved in php

richardlynch

I do not use the alternate syntax.m-00kie: I'm pretty sure PHP has reserved the right to create MORE superglobals someday, and $_ is for them.

ak_work

cuban why don you use ereg_replace()

m-00kie

well it works fine, until that if(()&&()) linei cant see WHY its breaking at that line..

e-head

I have some pointer/reference questions.$a =& $b. Can reference assignments like this be used on arrays as well as objects ?

ak_work

there is eregi_replace() for case insensitive

richardlynch

m-00kie: The reason that you get NULL is that '00000' turns into the integer 0, and then you try to index an integer as an array. Make it be $_f = (string) '000000';

m-00kie: Yes. I have no idea why it is behaving so strangely. Change 00000 to 11111 and what do you get?

m-00kie

same result

Nathe

I know php supports $function($foo), but does does that support extend to methods?

ak_work

cuban what do you want to do? replace d:ops, d:\ for / ?

richardlynch

Nathe: Try it and see.m-00kie: I dunno why they broke it, but use substr. :-)

sylow

Nathe: php.net/func_get_argsNathe: ah.. you mean methods in classes , that works too

Nathe

sylow: yeah I'm registering a callback function, and the majority, but not all of them are going to be methodsehh. nm I just answered my questionblah

sylow

:)

Nathe

sorry.. 4 hours of sleep and not enough cafffineor caffine for that matter

e-head

What does the & in the function definition "function &my_function()" imply ?

Wolfpaws

!+&

stormbot

[&] & is the PHP 'Reference' operator. See: http://php.net/references; & is Also the PHP bitwise AND operator. See: http://php.net/manual/en/language.operators.bitwise.php

e-head

thanksDoes php4 have any awareness of static member functions ?

Nathe

richardlynch: yeah but that meens I have to actually work **whine** :P (I figured out a better way to do it anyway

Wolfpaws

e-head: no.

e-head

I can execute class method functions using MyClass::method() though. Is this just class/OOP sloppiness in php4 ?

Julian|Work

It's a static call.

Wolfpaws

e-head: php.net/oop

e-head

thanks

richardlynch

e-head: You can use static methods, and the 'work' but you can't declare them, and there's no enforcement of not mixing static and non-static, and if you manage to pass $this around and then use it, on your head be the results.

e-head

Thanks richardlynch. It's sort of self-regulated then.

Nathe

richardlynch: that'd be some funny stuff :/

cuban

What does this mean... "Warning: ereg_replace() [function.ereg-replace]: REG_EESCAPE in /cusource2/index.php on line 6"

Xyphoid

i can just see someone designing a system where you store your instances in a registry so that when you do static calls on nonstatic methods it can look up an instance to use

mwiggins

is there any way to trap a fatal error from require_once() ? i just want to get a backtrace and then die

s|k

Can I have static classes where I use the static keyword for the entire class?hrmthe manual says nothing about itprobably not possible

mwiggins

to define a class where all methods are static? itd be fine if you did it explicitly

s|k

can I do: static class myClass {

mwiggins

so that each member is static implicitly? no

s|k

I see

Shane_N

Hello

richardlynch_

s|k: static class xyz might be on the road map for PHP 6... Google PHP 6 Roadmap if you want to find out...

mwiggins

any way to catch a Fatal Error as an exception?

s|k

richardlynch_: thanks

Shane_N

Are there known issues with the sybase module lagging out of no where? I've been using it for months, and today, without touching configuration of it, it takes 2-3 seconds just to connect. I'm the only user who uses the server, and I'm not running anything crazy on itmwiggins: not yet (last time I checked)

s|k

I'm creating my xhtml documents with php5's DOMand I have this class where I'm just calling static methods to create elementslike if I wanted a header element I'd call getXHTMLElement::getHeader();wellgetXHTMLElement::getHeader($textNode);

mwiggins

sounds like a namespacewhich also arent in php

s|k

and the entire class is just full of static methodsno I'm just using xhtml, no other namespaces

richardlynch_

s|k: Okay, all your methods are static. Fine.

GoSox

if no POST variables are set at all when loading a page, will isset($_POST) be false?

mwiggins

count(array_keys($_POST)) will be < 1

richardlynch_

GoSox: No, it will have count($_POST) === 0 though...

GoSox

oh cool

philip

empty($_POST)

richardlynch_

empty changed its meaning too often for my tastes, personally.

Shane_N

or sizeof($_POST) === 0 :)

GoSox

what did empty USED to mean?

philip

it changed once, from php3 :)

richardlynch_

philip: Try again. It changed in PHP5 as well.

mrkris

i am parsing sme html, and i am having issues grabbing all content between <!--start here-->(.*)<!--End Here--> i look at the source in vi and see ^M and am thinking that's what is causing it to fail

philip

empty('0') was false in php 3, what changed this time?

Nathe

mrkris: yeah that'll do it .. wrote it in notepad did you?

||cw

mrkris: ^M is a \r\n

mrkris

no, someone else. how do i strip ^M ?

richardlynch_

class foo { }; $foo = new foo(); echo empty($foo);

mrkris

I did strip \r\nand tried the octalbut no dice

richardlynch_

mrkris: Maybe try using /s and /m for the preg, so newlines don't matter.

mwiggins

:%s/C-vC-m$// in vim

||cw

mrkris: the ^M is fine, you just need to let your regex match across newlines

I'm setting up a query, like this: query="INSERT into myTable (col1,col2) VALUES ($val1,$val2)" --- my question is what if $val1 and $val2 have parenthesis or quotations? Will that mess up the query when I do: mysql_query($query)? If so, how do I fix it while retaining the parenthesis and the quotes. is there a way of escaping it?