« first day (853 days earlier)      last day (4110 days later) » 

6:00 PM
@ircmaxell so what's your reason to disagreeing with the tweets?
 
@Steve Please keep your language clean.
 
o_O
ok
 
1 message moved to bin
:P
 
@Gordon because there's nothing wrong with mysqli. PDO is a "nice" API but you lose a lot with it. It comes down to what you need...
 
@Gordon lol...
 
6:04 PM
@ircmaxell what do you lose with it?
 
@ircmaxell yup. though I definitely agree with @Nikic about the API of mysqli being butt ugly.
 
a lot of mysql specific functionality. The ability to change connection character set after the connection starts
 
@Steve async queries
 
@Gordon I think only 1 API is bass ackwards. The parameter binding functionality
 
@ircmaxell yes. thats the part I am thinking about
 
6:06 PM
@Gordon I'm going to make a new company. I'll name it PHP! Yeah,! PHP is a good name! Now all I need to do is trademark that name!
 
Anyone up for a Javascript job, ~$2000 per month, remote position?
 
@ircmaxell Which is also kind of the most important part of it :)
 
@NikiC not arguing. I wonder if an RFC to add a new method to bind parameters in a sane way would be good...
 
@webarto so, uuuhh. 4 days a month?
@ircmaxell a Userland wrapper would be a good start
 
Nice! OWASP just added a new entry to the top 10 RC for 2013: A9 Using Components with Known Vulnerabilities
 
6:09 PM
@ircmaxell I just wondered. What if PDO were just an interface and the driver would be classes implementing it. You'd have PDO_MySQL which would implement the shared interface and could additionally have methods for any MySQL-specific features
 
@webarto oh wait. it's dollars. 3 days.
 
@NikiC that would be nice...
and if I designed it today, I would do it that way...
 
@Gordon HAHA. Yeah :) (teach me master)
 
@Gordon 2 days...
 
So in most cases you'd hint against PDO and if you need specific functionality you hint against PDO_MySQL
 
6:10 PM
@ircmaxell my JS is rusty. I give a rebate :)
 
that way you have the generic interface in most places and the places where you need specific stuff are easy to find
 
@Gordon My JS is good... I charge a premium
 
evening
 
@NikiC are you going to propose this? Or make a replacement for PDO?
 
me home, me tired, me hungry
 
6:11 PM
Hi all..
 
@tereško Latvia is not Hungary!!1
 
@tereško I offered you to stay home and have money, haven't I :P
 
@ircmaxell I'm not sure whether it makes sense to do it at this point in time
 
i know , i know
but i cannot just pick up and leave that place
 
Yeah, I get it. Sure.
 
6:12 PM
@NikiC how about making this a brand new set of interfaces and put it in SPL?
 
And any case, I'm not the right person for proposing this. I have no experience on database drivers
@Gordon Rant: We should stop putting everything that is a class in SPL. Things should go where they belong and not into the SPL
 
Any idea why I get this error?

Code :
$filename = "10020175-BLAH BLAH BLAH- Mechanical .jpg";
imagejpeg($image,"$filename.jpg",100);

ERROR : Warning: imagejpeg(): Unable to open '10020175-BLAH BLAH BLAH- Mechanical .jpg' for writing: Invalid argument
 
@NikiC its an interface :P
 
posted on February 15, 2013 by Brandon Savage

Object oriented PHP can be a struggle. It’s complicated, difficult, abstract, obtuse. You fight. You end up with a headache. You wish there was an easier way to learn object oriented PHP. Ever since releasing Mastering Object Oriented PHP in December, PHP developers have had an easy and straightforward way to learn how to write [...]

 
@Kishor because .jpg.jpg
 
6:15 PM
@Gordon It's valid?
 
@Gordon - Am sorry gordon, I copy pasted the $filename with a sample data. the orginal one doesnt have .jpg in it.
 
@Kishor because $image is not a resource?
 
Does anyone else find it funny how the decision to include ZendOptimizer+ in PHP has been done behind closed doors and also skipping the RFC vote?
 
@Gordon - $image is a resource, checked, and I get the iimage right if I use any other filenames. This one doesnt work for some reason. I am sure I dont have double .jpg extensions
what else could be the reason?
 
@NikiC Enlighten me please, are they (Zend) "owners" of PHP, or all are equal (vote based)?
 
6:16 PM
@webarto yeah. forget it.
 
@Gordon Phalcon will add whitelist. +1
 
@webarto PHP is community owned by now. Zend is only sponsoring afaik
 
@webarto Afaik PHP is owned by the PHP Group (which is not the same as Zend)
 
@webarto
 
yeah...
 
6:19 PM
Yes, but, are rasmus, zeev and andi ~equal as everyone else? (I know there was a talk about BDFL, etc)
> It's great to see Zend opening this up to the community, it's long overdue IMHO. Unfortunately it's of little use to us at present with our heavy dependance upon suPHP.
 
any help on my question? I am clueless
 
Can't be enabled on shared servers...
 
@Kishor well, it says Invalid Argument, so at least one of the arguments you pass to the function is not what it should be. Check each of them.
 
Ah, DSP just explained that the vote will still be done, they just delayed the release schedule expecting that the vote will be positive...
 
Democracy :) :+1:
 
6:21 PM
@Gordon - Its the file name for sure, but I cant find whats wrong with that file name :-/
 
Which is obviously the same as skipping the vote altogether, but I see that it seems more legit ^^
Because now that the release is delayed it really makes no sense to not include it...
 
anyways, will figure it out. Thanks :)
 
It'll be fun to see who votes against :P Yeah, it would be a major plus for 5.5
 
@webarto I would have voted against a few days ago
But as it stands now that just doesn't make sense. Also I saw that O+ does block optimizations, which is cool
 
Hi all - I've heard some criticisms of Composer (I think from this room) as a dependency manager. Can someone remind me what those were?
 
6:27 PM
@MikeB probably package signing stuff
 
Package signing?
 
@Ocramius thanks
 
6:36 PM
anyone here use notepad++?
 
yep
 
@Steve ever watched phpacademy tutorials?
 
nope
 
@ConnorMiles I use NPP
 
basically, if you do watch them i notice that his current file auto saves like every 3 seconds and i cant find out how, i have auto save plugin and it only lets you save min - 1 min and if i set it as on loose focus it stops responding until all files are saved because i have like 150 files open because i do alot of find in all open documents
 
6:40 PM
@Gordon Most of these people can't appreciate the luck they had
Give it a couple dozen meters in diameter, or 5 degrees in the slope, and that meteorite would have been able to flatten anything within a 5 block radius of impact.
@ConnorMiles I use PhpStorm. It saves automatically when the file changes.
 
@MadaraUchiha every text editor has better features than others but im sure if i switched to that i would be gaining the autosave but loosing alot more
 
notepad++ doesn't compare to any ide
 
Anonymous
hmm...
 
Anonymous
@MikeB what have you tried so far?
 
as far as editors?
 
Anonymous
6:48 PM
Yes
 
Anonymous
I use notepad++ too, Also have netbeans but I heard eclipse is somewhere there ? ?
 
A lot of the script editors, notepad++, sublime, textmate, etc, etc. IDE's I've used eclipse, netbeans, phpstorm, aptana.. lots
 
I have SublimeText2
But I never opened it
 
Eclipse and Netbeans are java editors with PHP plugin support. PHPStorm seems like a real PHP IDE
 
Anonymous
How much was phpstorm again?
 
6:50 PM
$75 $99
 
@MikeB in truth it's just IntelliJ idea with a PHP plugin for it, but I love it anyway :)
 
Anonymous
Wow!! I'll pass
 
@PHPNooB the EAP is free \o/
 
If anyone wants to use the php.net news archives, please use php-news.herokuapp.com and if you find anything wrong ping me about it. Codez are available here for your browsing and criticising pleasure. Yes I know, some of it is shocking, it won't be like that forever (and it's a damn site better than what I started with).
8
@MadaraUchiha Can you pin that for a couple of days? ^^
...and now I am going, catch y'all in a couple of hours.
 
@DaveRandom It sucks.
 
6:52 PM
@webarto You suck.
 
And so do you!
 
:-P
Really going now
 
Have a nice evening.
 
Later DaveRandom
 
@DaveRandom why?
 
6:56 PM
@webarto do you use php storm? what do you like about it? would you recommend it to someone who doesn't have experience with developing php in ide?
 
@ircmaxell The question that will be asked many times when proposing upgrade :)
 
@dm03514 than first try netbean its free
 
does anyone know what a function called myiconv would be?
 
@ircmaxell I don't even
 
6:57 PM
@ircmaxell lol..that is retarded
 
@ircmaxell: nice...1 star :P


Q) Data can be returned from a statically called method right?
 
Anonymous
Wow, crazy people are everywhere
 
@PHPNooB yes
 
@Pheagey yep
 
@Pheagey yes
 
6:59 PM
That's what I though, herm, guess I need to find out why Im not getting my data..TY guys
 
Anonymous
Just for the record that girl or man !== sexy
 
@ConnorMiles not in standard library? could be anything? customized iconv
 
whats iconv?
 
@ConnorMiles php.net/iconv
 
7:01 PM
@Connor en.wikipedia.org/wiki/Iconv converting encodoings
if you want to go from latin1 to utf8 you can easily using iconv
 
@ircmaxell sexyphp.net official website
 
Anonymous
It must be the "php for dummies" thing... evolving
 
night ...
 
Anonymous
night
 
Oh Steam for linux, STAHP :( Ma wallet!
 
7:08 PM
@ircmaxell I just thought about an immutable DateTime again and remembered our idea of a Transparent/Typed Decorator. Didnt you propose that on internals? Was their any response to it?
 
guys I've finished my website. Would u mind to check it out geekben.com It will be launched very soon ... It is meant to share and sell the php, javascript, ruby and any other language code . So what do u think ?
 
can anyone explain what this would do

function start_html_output()
{
$charset = getstring("output_charset");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-type: text/html" . (isset($charset) ? "; charset=" . $charset : ""));
}
 
How does one find an objects parent if one is in said object?
Im trying to find out where parent::save($var) is located to change the return param.
 
ty
 
7:22 PM
@Pheagey hmm, what are you trying to do? Find it in a text file? or find out about parent programatically?
 
@NullPointer I wish it would go away. It's just putting more oil in the sexism fire.
 
@dm03514
Im trying to find out where parent::save($var) is located to change the return param.
 
Anonymous
When declaring variables as globals in OOP PHP, should it be declared inside the method or as a property
 
Anonymous
@Gordon ^ need help here
 
@PHP Noob globals? I'd make them property of the base object.
 
7:25 PM
@Pheagey which class is your class extend ind?
 
Anonymous
To get the connection resource
 
@PHPNooB please don't be declaring globals in your class!
 
Anonymous
I can't pass it as argument through my functions
 
7:26 PM
@dm03514 SPL method get_parent_class() did the trick. Returned what I expected (the parents method).
 
anyone?
 
@PHPNooB yes you can
 
Anonymous
Yes I can. But, I can't
 
I go to said method, change it from return true, to return $id...child object gets data type boolean :(
@dm
 
24
A: Dependency Hell — how does one pass dependencies to deeply nested objects?

GordonIt's a common misconception that dependencies need to be passed through the object graph. To summarize the example Miško Hevery gives in Clean Code: Don't look for things, a House that needs a Door, doesnt need to know about the Lock in the Door: class HouseBuilder { public function buildHou...

 
7:27 PM
@dm03514
 
Anonymous
I just can't pass it everytime I create functions, isn't there anyother way? @Gordon
 
@Gordon ask @PHPNooB why he wants to.
 
Anonymous
@Gordon Hey, throw me a bone here
 
@PHPNooB there is no other way.
inject your dependencies. dont use globals.
trust me on this one young padawan
 
Anonymous
7:30 PM
I do not know what depenencies even mean, can you tell me why it is bad?
 
afk now
 
@Gordon what a nice little site
 
Anonymous
can you stop jocking and just give me a hint here
 
Hi, how do I combine the result of these two queries into one statement? I want the Date_Column to be one, and number of invites sent via Email and GMail in other two columns. Used for generating reports: pastebin.com/PStns0bX
 
http://blog.ircmaxell.com/2013/01/dependency-injection-programming-with.html
^- good video
http://stackoverflow.com/questions/2255771/how-can-i-use-dependency-injection-in-simple-php-functions-and-should-i-bothe
@PHPNooB
 
Anonymous
7:32 PM
Super!! that was what I was looking for
 
:)
 
Anonymous
Wait... Why is it even called " Dependency "?
 
Anonymous
Whats with PHP and fancy words :)
 
@PHPNooB no, those aren't fancy words, they are standard terms, used in enterprisey languages all the time :)
 
@PHPNoob ... so we sound fancy :)
 
Anonymous
I thought it was like sql injection at first
 
lol wrong room, sorry
 
Anonymous
@Gordon @Pheagey So, what if I continued to use globals? what is the worst that can happen?
 
@PHPNooB Um, security issues, the more complex your application the harder to maintain it, expanding on the finished application becomes difficult at best, breaks OOP principles...
makes ti hard for others to update/change your code.
*ikt
*it
(arg, finally)
 
Anonymous
Ahh.. It can break Obama's balls if it wants I don't really care about OOP principles so long as the site gets its ass up and starts running.
 
Anonymous
7:43 PM
All of that is nonsense
 
@dm03514 Found my problem with the parent method returning the wrong data type...
`if ($id == false) {` != `if ($id) {`
now its returning like I wanted it to. Sooo, yea, that was my fubar.
 
come on guys, what am I doing wrong here? (see my last to last message, SQL union)
 
@PHPNoob and the next person who gets the work on your project...will want to strangle you :)
 
Anonymous
I am freelance, I work alone. I don't even work for clients or companies, I just want to build some sites only I own. I am PHPying on my free time, as I have sales & marketing job which pays good $$
 
Anonymous
So, the last thing I could think of myself doing is become a developer and web designer
 
7:50 PM
@PHPNooB, there are many reasons why using globals is not a good decision, It isnt arbitrary one we made up to make you rewrite your programs. Even if you are your own client, i believe, it is well worth the time to learn on ways of avoiding using globals in your porgram designs
 
Anonymous
It is just one global in my entire PHP script. It can not be confusing, or conflict with anything. Just one global @dm03514
 
Anonymous
Now, where is the harm in that ?
 
@Gordon done! photos are up =oD It's all I am willing to do at this time.
 
@PHPNooB What is the global value?
 
Anonymous
$conn = new PDO('mysql:host=localhost;dbname=dbb', 'root', 'test');
 
7:53 PM
@crypticツ *waves at a fellow floridian
 
Anonymous
global $conn;
 
Anonymous
@dm03514 ^
 
@Pheagey hey, where in FL?
 
@crypticツ Trampa..er Tampa area.
you?
 
@Pheagey lucky you, wish I was near the beach. Orlando
 
7:55 PM
@crypticツ ehgad, Orlando is such a tourist trap; I'm sorry.
Tampa aint that great, wont lie.
 
@Pheagey it is =o( my high school was across the street from Universal Studios
 
@crypticツ Welcome to Florida, right?
/irony
 
@Pheagey The only good this is the weather. In college I was up in the midwest and yikes the snow, ice, tornadoes. Here we just got hurricanes and encephalitis those I don't mind dealing with.
 
@crypticツ hurricanes are ok...but raining -every- day around 4:30, and then humid as a shower the rest of the day :(...
 
@ircmaxell Good question. I don't really know. I started screwing around with it ages ago, and I've been doing a whole bunch of email stuff at work lately so I picked it up again. The current live sauce as absolutely shocking, it was screaming out for a refactoring.
Aaah that's right, I wanted a search. Which I haven't actually done yet, and would be pretty difficult anyway, I now realise.
 
8:02 PM
@crypticツ Orlando went there last christmas XD
 
@NickFury Did go for the attractions?
 
@DaveRandom You need to have a damn good reason for something. I think, php-master should be better to rewrite, altough that is a challenging task.
 
@Pheagey Yup, me and a few buddies went
 
hi all
 
@NickFury At least you went home after; Floridians have a name for people that move here from the north and stay (like myself). It's not a very flattering name...
@Kevin hi
 
8:08 PM
@Pheagey jewish ?
 
@Nick Fury :D...
'Damn Yankee'
 
just kidding :P
 
/me started watching 29c3 talks ... 1 done, something like 40 to go
 
@webarto I'm not planning to put a lot of time into it, it's not exactly high priority for me or for PHP in general...
 
@DaveRandom Yup.
 
8:12 PM
eats a cookie
 
@Gordon not good
 
btw, did I already ask what you think of that immutable date time class that they added @ircmaxell?
 
@NikiC No, but I'm in the air on it. I'd prefer to make the whole thing immutable. It feels like a bike-sheded solution...
 
8:28 PM
@ircmaxell the whole thing isn't immutable?
 
meaning they added a new immutable class. Rather than fixing what was there...
 
@ircmaxell Well, they certainly can't make the old one immutable, can they
 
right? or did I not follow what was happening there
 
But I don't quite like the way the new one was done
 
@NikiC that's why I feel it's a bike-sheded solution...
 
8:30 PM
@ircmaxell How would you have done it?
 
replaced the existing one with immutable value objects
Or done nothing at all, and provided user-land immutable libraries
 
pastebin.com/Mp6JNDzp - would it be possible to remove the need to put $HeroList as a parameter each time i wanted to set $id = to something?
 
@Kevin looking
Could make $heroList a object property (protected $HeroList =...), then in the method call it using $this->HeroLost.
 
8:45 PM
ah. makes sense. thanks :)
 
lemme know if that works out for you.
 
$this->HeroLostTheBattleButWillWinTheWar
 
i'm guessing i should create a class than, instead of just having that standalone function
 
@ircmaxell I sent a mail regarding it
Not about your issues, but about mine
 
Do you have a class for your 'hero'?
 
8:50 PM
@NikiC recently?
yes
 
@ircmaxell Just now ^^
 
@Pheagey Nope =p
 
Wanted to send it some time ago, but forgot
 
@Kevin :/
Probably want to.
 
@Pheagey i'll show you the code i have.
 
8:51 PM
pasterbin plz
 
as far as the modify method, I think it makes sense, as it returns a new object with the requested modification
setTime doesn't make sense though
 
@ircmaxell It also returns a new object with the requested modification (the time set) ^^
But yeah, modify may be okay
But having a non-void setter method seems very odd to me
 
Actually, it could be treated as an alias for creating a new object exactly as this one is configured (timezone, etc) swapping out the one requested field... But in general it's odd
 
http://pastebin.com/CHryAgm4: turns xml file of hero list into array
http://pastebin.com/mydkKucR: uses above function and edits array to remove some unwanted elements. then you have the other code
 
8:55 PM
@ircmaxell Yes, that's what it does
 
I hope that makes sense Pheagey
 
Which I really don't like
 
@Kevin Murphy: is the xml generated by you?
 
I think the functionality is fine, but the name is off
 
@Pheagey no. I grab data from an API and dump it into an xml file for use later (like this)
instead of grabbing the huge list every time, i just have it update that xml file every 2-3 days
 
8:58 PM
 
@Badaboooooom MOOOOOGAGAGAGA, im not on facebook :P
 
Herm, I know this is off topic but checkout PHP's json abilities. like json_encode etc.

On topic though, I'd say make your heroList function an object.
 
@NickFury lol can't stop lolling
 
@ircmaxell Yes, that's what I mean :)
 
8:59 PM
Pheagey yeah I jason_decode all of their data - it's in json already so that might be a good idea lol
@Pheagey what do you mean make the function an object :/
 
Could be something like ::withTimestamp instead of ::setTimestamp
 

« first day (853 days earlier)      last day (4110 days later) »