« first day (264 days earlier)      last day (4699 days later) » 
00:00 - 14:0014:00 - 22:00

2:00 PM
let's see
yeah, figures.
 
	function tagOpen($parser, $name, $attrs) {

		$tag=array("name"=>$name,"attrs"=>$attrs);
		array_push($this->arrOutput,$tag);
	}
and a similar tagClose function as second argument
 
@KamilTomšík And you expect me to star you? Edit: Well what the heck, here goes.
 
	function tagClosed($parser, $name) {
		$this->arrOutput[count($this->arrOutput)-2]['children'][] = $this->arrOutput[count($this->arrOutput)-1];
		array_pop($this->arrOutput);
	}
 
What was the php function that looks at a variable and outputs the variable type
 
2:03 PM
@ChristianSciberras relax, I don't expect anything :)
 
and that's the closing function
 
i forgot what the function was....im getting an output from a variable but cant tell what its type is so I need that function anyone know it?
i dont think its the closing function....or atleast not the 1 i found from google
 
Good one @KamilTomšík :) Just made the whole office I'm in "LOL" - literally. ;)
 
i wasn't addressing your query @ErrorErrorError
 
@ErrorErrorError are you trolling? gettype or var_dump
 
2:07 PM
@Gordon he/she has been trolling on the js chat area for a while now
 
php note: Never use gettype() to test for a certain type, since the returned string may be subject to change in a future version. In addition, it is slow too, as it involves string comparison.
 
@ErrorErrorError then dont ask
 
is there no other way, im asking the chat if u dont want me to ask dont respond its simple
 
and i gave you an answer that already contained "another way"
 
yup looking at that i didnt want value along with type but that will do
 
2:09 PM
if you want to test for a type (vs getting it) you can still use instanceof
 
or all those is_*() functions
 
alright thanks
 
i'm wondering if, given enough data types, it could be possible to make an "animals game" out of a language.
 
@UniqueKey sorry. no idea whats causing the slowdown. Can you profile the hooks to make sure its really the parsing and not the hooks?
 
@Gordon instanceof? :-P
 
2:11 PM
such as, "is it an INT? (y/n)" "does it contain structures? (y/n)"
 
@KamilTomšík for objects, yes. not for scalars, yeah so okay.. not type in the strict sense
 
@Gordon instanceof is no better than isXxx... it leads to if/else code
 
@KamilTomšík that wasnt asked
 
fair :)
 
@ErrorErrorError why do you care what the type is?
 
2:14 PM
im trying to do form validation for phonr number but for some reason regex isnt working so im trying to figure out what the variable being passed is as phone number
 
is_scalar() might especially be of interest.
 
oh. wow. I wasn't expecting that answer. ;)
@ErrorErrorError so just var_dump(), it'll tell you
I worry about "for some reason" and "isn't working" style statements
 
@Gordon i can't interpret cachegrind files very well, but looking twice i believe it's just a case of nesting gone out of hand
 
i say some reason because i have possible theories on why it isnt working but listing them all would not be of use to u as I would like to find out which of my theory is correct :P
 
@ErrorErrorError but getting the type of the variable is useful?
 
2:17 PM
Well, I'm off for today guys. @UniqueKey I may log in back later with a profiler at hand. Do you use gtalk/msn? You can send me on uuf6429 at gmail.com
 
yes it is, i can use that to make my own validation incase regex is problematic
 
@Unique_Key can you use xdebug?
 
@Gordon He is using it.
 
@ChristianSciberras thanks, but don't worry; i don't work at home
@Gordon more or less, that's what i'm using to dump the cachegrind files
 
@UniqueKey Me and my worries ;)
cheerio
 
2:19 PM
heh
later :D
you know what, maybe i'll just gut out the functionality that's causing the overhead. it's just a hilariously convoluted caption system for an image gallery, anyway.
there, all fixed. </care>
apparently, it was being caused by the fact that the plugin loops through image subfolders and pulls the metadata for each picture in each folder. it really was a case of nightmarish nesting.
the metadata, in turn, is stored into XML files, i suppose to make the process less excruciating. the irony.
 
iei
seems like the doc team gets free licenses to phpstorm :D
I already have one, but that is great use for all the others ;) No need to used some shitty IDE like Zend or Eclipse or NetBeans any more ;)
 
2:34 PM
@nikic which doc team?
 
@salathe I don't know ^^ Though as the message was written to [PHP-DOC] I assume everyone ^^
 
I'm not sure why the docs team need free ide licenses but it's very kind of jetbrains.
 
@salathe Yeah, I didn't understand that either. It's still great news, as PhpStorm is just awesome :D
 
2:54 PM
@salathe can you deprecate __autoload please
 
@Gordon yes, I can -- that's a good idea :)
 
@salathe You can?
 
@salathe Oo
thinks this is fishy
 
@salathe I approve of this message!
 
@salathe usually you suggest posting on internals
 
3:00 PM
@Gordon I really wouldn't want to be the person to bring deprecating __autoload() up on internals!
 
@salathe Why so?
 
@nikic because there'll be 500 replies, probably arguing about something completely unrelated
 
@salathe Hum, probably. So @Gordon, you should try :)
 
@nikic i sure wont post to internals. you do it :)
 
gist: Deprecate __autoload() -- mixed responses. , 2011-07-07 15:03:53Z
[15:56] <@salathe> do you think anyone would mind if we deprecated __autoload ?
[15:56] <@philip__> why?
[15:57] <@Derick> ?!
[15:57] <cyth> because __autoload sucks compared to spl_register
[15:57] <@Derick> it works
[15:57] <@Derick> print also sucks over echo
[15:58] <cyth> yeah but it's kind of bad practice
[15:58] <cyth> you could be clobering third party autoloaders
[15:58] <@Derick> not every project cares
[15:58] <@bjori> not every project uses third party autoloaders
[15:58] <cyth> I wouldn't really call print bad practice in that regards though.
[15:58] <cyth> bjori, until they do
[15:58] <cyth> then they are wondering wtf code won't work.
[15:58] <@ekneuss> I wouldn't mind deprecating __autoload, softly, i.e. in the docs
[15:59] <@bjori> my `shell scripts` in php use __autoload
[15:59] <@Derick> this definitely goes into the category of "why the fuck are you messing with this?"
[15:59] <cyth> using spl_register is just as easy
[15:59] <cyth> and you don't trap yourself later.
[15:59] <@ekneuss> well, that's usually what deprecation is for, replacing old stuff with new and better
[15:59] <@bjori> using singletons are also bad practice
[16:00] <@Derick> ugh
[16:00] <@philip__> feel free to update the autoload docs to refer to spl_register as a preferred alternative
[16:00] <@Derick> don't be stupid
 
3:05 PM
uuh :)
speaking of Singletons. Can someone please port code.google.com/p/google-singleton-detector to C and then write a patch for PHP to call E_DEPRECATED whenever it detects a Singleton during parsing. That would be awesome. Thanks!
 
@salathe That just got me an idea: We should deprecate print too. Additionally we should throw a TooManyParenthesis exception if the parser encounters a construct like echo('a')
 
wonders in which irc channel that discussion happened
 
@edorian #php.doc on efnet
 
or include('foo')
 
thanks, one more on the list
last time i tried builting 5.5.0dev from source i was really happy that i knew about .pecl ; I would have never figured that one out on my own
 
3:09 PM
ah. his IRC is broken.. its showing english time
 
@Gordon Scottish time :)
 
@Gordon and i heard it's driving on the left side of the road too
 
Beam Me Up, Scottish!
 
> <LawnGnome> If we're going to deprecate things lots of people still use, can we deprecate ext/mysql instead? :)
 
that's probably a drinking game
 
3:10 PM
massive +1 here ;)
 
+1 from me too
 
"if it's not broken don't fix it" - "well i can break it first if that helps"
 
my personal copy of the manual lists mysql as deprecated :)
 
While there are so many PHP sucks related things starred i think i need to get on to that:
 
PHP.net sucks
 
3:15 PM
PHP is a domain specific language to generate XSS vulnerabilities and SQL injections
 
> <neg_nancy> that'd be the ultimate BC break in php
nah, that'd be removing the global keyword
let's deprecate that too btw :D
 
(i think I've seen that in response to "java is a dsl for converting xml files into stacktraces" and it stuck with me)
 
interesting discussion
 
Oh btw: Does anyone of you have an idea or more luck googleing than me? Else i post a question:
> Warning: mysqli::prepare(): Couldn't fetch mysqli in
That happens in our testsuite when going from 5.2 to 5.3; I have no clue why and it runs fine in isolation but not in the whole suite
So I've got a non reproducible problem that only exists in 5.3 but not with 5.2 (I'm guessing mysqlnd?). But i have NO clue where to look
The ::prepare doesn't return a object and everything goes to hell from there
 
@edorian that'll be the goto hell; line in the source
 
3:27 PM
the userland wrapper for ext/mysql is a cool idea
how hard can that be
 
@salathe grep -ri " goto hell" . | wc -l returns 1341; which one is it :) ? I think most of them are comments ;)
 
kinda butterfly effect with php. suggest to deprecate __autoload and get deprecate ext/mysql :D
 
yep
though I doubt we'll get that
probably will just put a nice big red warning about all mysql_ functions ;)
 
they seem to agree now
heading to phpugdo now.. laters guys
 
hf
 
3:32 PM
bye
 
4:24 PM
posted on July 07, 2011 by Zend Developer Zone

The Zend Framework team announces the immediate availability of Zend Framework 1.11.8, our eighth maintenance release in the 1.11 series. 1.11.8 includes around 40 bug fixes and may be downloaded from the Zend Framework site .

 
Why do i receive error undefined variable when its defiend previosuly inside a if?
 
@Karem It will only be defined if the if is executed ;)
 
example:
if(){
if(){
$var = 1;
}else{
$var = 0;
}
}
if(){
echo $var;
}
 
Scope...
$var;
if(){
	if() {
		$var = 1;
	} else {
		$var = 0;
	}
}
if(){
	echo $var;
}
 
my first if is a if(isset( $_SESSION["album_eventID"] )) and i think it doesnt get executed there
but i dont know why i have defined that var
 
4:36 PM
Because of variable scope
 
let me try to define before var direct before if
 
If it's local it "disappears" after }
 
oh it works now..
hmm
isnt $_SESSION global
 
It is, did you forget session_start ?
 
I have a ajax request to a file that sets the session album_eventID, after this when you upload a image it runs another ajax request, and there it checks if the album_eventID has been set.

even if i set it, it doesnt think its set
let me try
Yes i did forget session_start(); but it still dont have that var
or wait maybe its there where i define it, it goes wrong
nope.. :(
i hate this situation... !
 
4:45 PM
Are you sure that problem is not in ajax request?
 
Yes i am sure
Can it be because the file is getting requested by a flash file?
 
Try var_dumping things that ajax request sends you
 
usually i include page_protect(); on every page which starts session start and initialize stuff and so, but here in this file if i include it, it will just saying "Uploading..." without any errors spitting out
 
posted on July 07, 2011 by Nelmio

Monolog is a simple logging library for PHP 5.3+, inspired by Python’s Logbook library. It is namespaced, tested, PSR-0 compliant and all of these good things. It is fairly simple to use in any project and logs to files, syslog, FirePHP, sends emails or any combination of the above. Of course it’s extensible, and there are already more handlers planned for 1.1. One of the notable features is

 
and i cant see anything in firebug either
ok
array
  'uploadfile' =>
    array
      'name' => string '0095994527.jpg' (length=14)
      'type' => string 'application/octet-stream' (length=24)
      'tmp_name' => string 'C:\wamp\tmp\php2EB.tmp' (length=22)
      'error' => int 0
      'size' => int 56110
that was $_FILES
$_POST :
array
'Filename' => string '0106378496.jpg' (length=14)
'Upload' => string 'Submit Query' (length=12)
 
 
3 hours later…
8:11 PM
I have a new toy :-P
 
8:40 PM
hmmm
 
Hey all, i'm in desperate need of a good form validation tutorial. Does anyone know of one?
 
8:56 PM
no
but start bt looking at php filters
filter_var()
 
For PHP form validation, can i open my standard file which deals with the $_POST data from the form with a if check that all fields have been filled in?
Considering i can use client side javascript validation on the form before submission
something like if (empty($_POST['name')) {echo 'Please return to the form';}
OK, ive just figured out i can. So are there any serious cons to this approach?
 
00:00 - 14:0014:00 - 22:00

« first day (264 days earlier)      last day (4699 days later) »