« first day (772 days earlier)      last day (4176 days later) » 

6:02 PM
try me what's your biggest dilemma
 
@Stephane I generally take these people head on.
 
lol
 
user895378
@FlorianMargaine I have used phing and I have to say ... I'd rather just write my own build script in php.
 
dunno why, my limited experience is fine with it :)
 
@Stephane These people are the ones whose questions get closed the fastest.
 
6:05 PM
i out rank her
 
@DrewPierce Who?
 
user895378
@FlorianMargaine @NikiC wrote a blog on the topic that got me thinking differently
 
@Lusitanian Stop what?
 
@rdlowrey his reason sucks.
he's just saying "xml sucks, booo"
 
people still using xml what gives
 
6:08 PM
he's totally missing out on the fact that XML is already at an AST level. Try doing that with PHP ~~
 
xml is for bandwidth tards
causes my netflix to slow down
 
xml is for smart people ;)
keep not using it, please.
 
user895378
@FlorianMargaine I'm pretty sure I didn't say "phing is terrible" ... I just said I prefer to write my own build script in php. It's an unqualified personal preference. Do whatever you like as long as it helps your productivity and doesn't cripple the people who have to maintain your work down the line.
 
yeah if you want your apps to stink
 
@rdlowrey yeah I'm just commenting on the blog post
and basically what he says is that he doesn't like phing because of xml
 
6:10 PM
xml is so 1990
 
it's so old, I guess it's just so useless. I mean, every old thing sucks, right?
 
it has 60% overhead over json fm
 
user895378
I don't see much benefit in the verbosity of an external XML syntax when I can perform the same operation directly in php. Are there benefits to a ubiquitous standardized build-script language? Sure. But if the build script can do the same thing and the code is readable I prefer to cut out the middle-man.
 
take a fiddler download figure it out
not to mention mobile
 
@DrewPierce XML has many uses.
 
6:13 PM
so does less than half the data flow same data
 
It groups things nicely into extremely readable bits, allows you to parse it easy and get the exact elements you need, and their values. It's infinitely extensible.
 
mentioning mobile when I'm talking about Phing...
 
user895378
IT CAN BE VALIDATED AGAINST A SCHEMA.
 
or bandwidth, generally
 
@rdlowrey how do you do builds? Do you just run a perl/php/whatever with testing and schema updating, etc?
 
user895378
6:14 PM
(caps intentional)
 
validated against a schema oh please
 
@rdlowrey We have emphasized bold for that.
 
user895378
@MadaraUchiha no, I wanted that sweet 1990's "I'm screaming this" effect :)
 
@rdlowrey HOW CAN YOU TELL I'M 13 BY WHAT I'M WRITING??!!!!!!!!!!111
 
user895378
@Stephane Yes, I just put together a php script that does exactly what I need.
 
user895378
6:15 PM
LOUD NOISES!
 
STAHP IT !!11!
 
i bet no one using xml even heard of fiddler
 
fiddler? the debugging thing?
 
case in point
 
well, don't be an arrogant bitch, tell your knowledge :)
 
6:21 PM
Am I the only one seeing call_user_func($fName) superior to $fName()?
0
A: How to make php function as string do real function?

Madara UchihaHave a look at call_user_func. You'll need to change your string a little (no brackets).

 
user1125394
 
most xml goofs have such huge wrappers the output of the xml is 3 times longer
 
@DrewPierce I only make XML as large as it needs to be.
And also, it depends on the structure of the required output. JSON is a viable option in most cases too, and I often prefer it over XML.
That doesn't nullify XML's usefulness.
 
plus you can't cross script as you can with jsonp
 
using xml with jsonp is quite stupid, indeed.
even mentioning it, is.
 
6:25 PM
it is one or the other what are u talking about
 
oh well, off I go
 
u dont use xml with jsonp
 
cya, and stay away from xml, it's baaaaad :-)
 
Hey all, quick question, I want to add a limit to only show 5 items in this php snippet can one of you please help me? pastebin.com/PXiTR2us
 
find a wiki
 
user1125394
6:26 PM
phing looks like ant no?
 
@matt try a for loop or something..
 
OK
 
hi all
 
@matt you can also increment: $count = 0; foreach() $count++ if(count > 5) break; endforeach Or, you can manually move through the array with next() and a for loop like Nick said.
 
6:36 PM
@rdlowrey i will take a look some time this week
but not today ... a bit busy ATM
 
@stephane thanks, im a total newb to php so thats a bit over my head
 
user895378
no problem, just throwing it out there because I'm having some significant LoD anxiety right now.
 
@rdlowrey caused by your own code or some 3rd party ?
 
that will limit it to 5?
 
6:37 PM
@matt untested..
 
@Nick I don't see you going through the array
 
user895378
@tereško Caused by my own code that I haven't written yet because of the anxiety :)
 
I think this is harder for a newb. He'll need next
@matt give me a second, I'll modify your code minimally
 
@FlorianMargaine I'm not saying that Phing sucks because XML sucks. I'm saying that Phing sucks because it's use of XML is completely and utterly inappropriate ;) [But for the record, I do think that XML sucks for nearly every purpose ^^]
 
well ... when you are ready , you can share the problem with the classroom @rdlowrey
 
6:38 PM
@Stephane thanks i really appriciate it
 
assuming you are not buried in NDA or NDT (naah ... that second one is latvian term for a paper-less gag order)
 
there you go NikiC now we're talking
 
user895378
I mean, where does LoD stop? If you wanted to be strict about it, couldn't you argue that every implementation of IteratorAggregate is going to mean a LoD violation because you're always calling methods on a returned iterator? e.g.:
 
@Nick where would you add that into the code :S
 
user895378
6:41 PM
class SomeIterable {
    function getIterator() {
        return new ArrayIterator(array(1,2,3));
    }
}
 
@matt what do you mean? instead of this -> pastebin.com/PXiTR2us
 
user895378
Or does that not count because iterator methods aren't really "operating" on the object, just returning data as part of a "stream"?
 
I think this is where you're at in your learning. There are better ways, but I think this one will make sense to you
 
@Stephane not sure this makes sense foreach ($this->$slider->links as $prod):
 
6:42 PM
@nick I don't think he will understand that
 
sorry @nick gotcha, im really sick so my mind is all over the place
 
@Nick he needs simple
 
@rdlowrey i am not really familiar with that interface , but , i guess you would provide the iterator to the SomeIterable instance
it is not so much about LoD as it is about tight coupling
 
@stephane thanks
 
user895378
Yeah, that makes more sense ... you're tying the implementation of one class to the other (which can and probably will change eventually).
 
6:44 PM
@stephane for some reason its still showing more then 5 items
 
something that is Traversable should expect an iterator , if it also is IteratorAggregate
 
are u implementing interfaces
 
@DrewPierce many people in this chat room are ..
 
@matt not sure why. Did you copy-paste it? I don't usually use endforeach syntax, but that shouldn't matter.
 
ill give you the full code
 
6:46 PM
Ok
 
posted on November 26, 2012 by Bradley Holt

I’m happy to announce that my PHP 5.4 Cheat Sheet from DZone Refcardz was published today. This is a major update to DZone’s existing PHP Refcard with material for PHP 5.4 added. In anticipation of this release, DZone interviewed me about this update. From the interview: The PHP 5.4 Refcard is for beginner to intermediate PHP developers. It’s not for complete beginners as readers will need to

 
@stephane here is the full page content pastebin.com/1atphg5D
 
we talking loose or tight
 
@Stephane maybe its because this line.. if($count > 5) { break; }
@matt indenting code goes a long way btw..
 
@Nick what do you think it's doing? The break is obviously not getting hit, but I don't see why.
 
6:48 PM
@nick and @Stephane thanks a lot for helping :)
 
user895378
@Feeds Why the hell would I want that "Cheat Sheet"? I clearly already have internet access. If I need to know something, google helps me out much quicker than I can scan through several pages of small-print on a PDF.
 
@matt I don't see where it's failing. I would check if $count is incrementing properly: echo $count; somewhere. Then add an echo inside the if to see if that's getting hit. Next, I would maybe put the break outside the if to see if something else is happening (for instance, your code might be looping somewhere else and showing you results 5 at a time)
 
gotcha.
 
@matt just keep digging and checking variables.
 
@stephane thanks a bunch
 
6:52 PM
@matt we've all been there. Feel free to bug me. I'm happy to skype with you or use email or whatever if that makes it easier. I'm definitely not the best on here, but I know enough to get you up a few levels.
 
whats your skype im always on there its nice to haev people to bounce stuff off of from time to time
 
^^ this should work
 
@Nick that broke my page :(
nevermind
 
@matt don't just copy paste everything, I have an example array in there.. here i'll get you the right code
 
im seeing "google"
ok :)
 
6:58 PM
@matt stephane.deuvaert I just started Skype so you should be able to see me.
 
 
@Nick looks nice. I think the echoing of html is adding unnecessary complexity as I think he's already in a template
but hopefully it makes sense to him/her
 
@Stephane He's gotta learn..
 
Evening
 
@PeeHaa Was it uneven? I hadn't noticed.
 
7:02 PM
@nick let me see
 
@DaveRandom It just had to be straightened out
 
No worries. As long as somebody does it.
 
@PeeHaa Now my afternoon is all out of whack :\
 
@ShaquinTrifonoff Hello
 
@MirwaisMaarij Hi
 
7:04 PM
Can you host the website, want to show it to a friend
 
Home host, with that IP
 
@MikeB No one cares about you Mericans, holding your afternoons at the wrong time of the day. Repeatedly and consistently doing it, as well. It's that kind of behaviour that will make people dislike a nation.
 
@MirwaisMaarij Do you want me to upload it to a server?
 
@ShaquinTrifonoff No the normal IP you'd give me usually
 
7:06 PM
@MirwaisMaarij The server starts automatically when I start my computer, so you will be able to access it now :)
(It's running on my computer)
 
@ShaquinTrifonoff What was the IP again? :D
@ShaquinTrifonoff Ah I think I got it, sec
 
@ShaquinTrifonoff Yep, thanks :)
 
@ShaquinTrifonoff I've won! What did I win?
 
Holy crap, @Shog9 is in here. Quick everyone, look busy.
 
7:08 PM
@DaveRandom Well... there are two moderators in the room :)
 
@NikiC XML is great for config files that need AST processing. JSON can do AST processing, but it can't do comments
 
@DaveRandom No, don't do that, then I have to look busy.
 
@MadaraUchiha You won a free post in the PHP chat room.
 
@ShaquinTrifonoff Yay!
Oh damn I just spent it :(
 
7:11 PM
You can edit :)
 
@matt safe to assume it worked ?
 
@Shog9 SE signs your paychecks, simply by being here you look busy. PHP users are an unruly bunch, you are clearly "co-ordinating the community". (If anyone asks I'll cover for you.)
 
Gracias ;-)
 
user895378
7:16 PM
@DaveRandom Look busy? I know for a fact that @DaveRandom just googles meme explanations and Justin Beiber articles all day.
 
user895378
I mean, who doesn't love the Beibs ... but seriously, all day? I don't know how he does it.
 
I would say it is time to open up a beer
 
user895378
It's like a SO chat drinking game ... anytime someone mentions "Justin Beiber" you have to drink.
 
7:20 PM
Wow 3 pings and no message. Well done @MikeB :)
 
I'm busy...
 
hehe
 
user1125394
you're timed out
 
> One or more of the answers is tanned and worthy of an additional bounty.
:D
 
@PeeHaa Doh.. was trying to point out a typo you made in embarrassing fashion but you corrected it too fast :p
 
7:27 PM
:-P
 
Chat pings every time you edit a message?
 
@MikeB lets test it ;)
 
What if I completely @PeeHaa change the message
 
7:28 PM
nope. Still one notification. -1 not enough jquery notifications
 
that should have been annoying
@PeeHaa , i think i will have a quick run for a second one
 
@tereško Again :P If you get a couple more you don't have to go to the shop every day :|
 
user895378
@PeeHaa Woah dang thanks ... but then again, I am pretty tanned, so perhaps you should be thanking me?
 
user895378
:)
 
nope , that only gets me wasted
 
7:30 PM
hehe
 
beer is not like weed
too little effort
 
Does this (self answered) question have value for the community at large: stackoverflow.com/questions/13571706/…?
 
@PeeHaa no
Unless a good answer is posted.
 
I think it is too localized.
 
7:37 PM
/me ducks away for a ranting @Shog9 ;)
 
5 messages moved from recycle bin
 
:)
 
Hi guys
 
@alditis hello
 
how are you PeeHaa?
 
7:39 PM
I'm fine thank you. And how are you today?
 
I'm fine too :)
PHP is nice!
lol
is the first time I chat at stackoverflow
 
@alditis Welcome :)
 
pdo rocks can't believe i resisted so long
 
ty PeeHaa
 
of course it has its quirks
 
7:45 PM
@DrewPierce Like?
 
It doesn't return a Countable Iterator.
:(
 
user895378
(will delete on my own in a second)
 
user895378
Ah boo
 
@rdlowrey Not a chance I'd trust you. :)
 
user895378
7:46 PM
I needed 30 seconds of bieber fever :)
 
@rdlowrey Gangnam style is better.
 
@rdlowrey Then you can look at it in the recycle bin.
 
user895378
lol
 
user895378
That must be a world-record time for bin deletion
 
In this chat can also make inquiries?
 
7:48 PM
@alditis You can ask questions here, yes.
 
@rdlowrey , i think you need some healthy beating , to slap the bitch out of you =P
 
ok, ty
 
user895378
Allright, enough Bieber memes for one day. Back to work.
 
lol .. "alditis" ... that sounds like latvian .. poor thing
 
@PeeHaa like rowcount not accurate after an insert but little stuff
due to buffer mode
 
7:50 PM
@DrewPierce true that. I always use count()
 
do an insert then follow up with a select ?
 
anyone knows when publishing php 6?
 
@alditis December
Note that I didn't say which year, 2050 seems a likely date.
 
ty @Madara lol
 
user1125394
somewhat after 5.6
 
7:57 PM
ty @cyril :)
 
People, would be nice see your answers here (not sure if the OP got right answer):
1
Q: Model-Service decoupling: what if my model needs a service?

MatthieuThe Service layer is supposed to be on top of the Model layer. As such, models are not supposed to call services. However, I'm facing a situation where I need to, for example: interface Component { getResult(); } class Number implements Component { private value; public getResult() ...

 
@PeeHaa i think that applies to the accepted answer in that topic
 
boy that php6 todo seems like i can hold my breathe
 
here is what should be in that list : 1. drop php4 compatibility
 
8:04 PM
@tereško 2. refer to item #1.
 
user1125394
@tereško talking of KeyneON message? stackoverflow.com/a/13561639/1125394
 
@cyril yes .. but keep in mint that SOP SOA is not MVC
 
0
A: How to add white spaces in HTML paragraph

Shaquin TrifonoffThis can be done easily and cleanly with float. Demo: jsfiddle.net/KcdpW HTML: <ul> <li>Item 1 <span class="right">(1)</span></li> <li>Item 2 <span class="right">(2)</span></li> </ul>​ CSS: ul { width: 10em } .right { ...

 
@rdlowrey Actually I'm one of Beib's Babes, it's a prerequisite of holding the title.
interface Justin extends Beiber {

  public function sing($song);

  public function beAnnoying();

  public function suckBalls();

}
^^ that last method gets called a lot
 
8:13 PM
@DaveRandom copying my avatar-changing patterns :)
 
How does one check what classes are being used in code, in many files...
 
@Lusitanian I do what I want, biatch :-P Anyway, you copied me, it's not my fault you can see into the future.
 
Hi guys, any wordpress programmers here?]
 
@webarto As in what classes are being hit when making a specific request?
 
@DaveRandom sing() is just an alias for autotune()
 
8:16 PM
@webarto Run the application and get it into XDebug? It's pretty hard to do it from source analysis alone, simply because it's possible to do stuff like $class = 'A'; $class .= 'ClassName'; $o = new $class;
 
function get_classes($code)
{
  $match = [];
  $patterns = ['new ([\w]+)', '([\w]+)::'];
  foreach ($patterns as $pattern)
  {
    preg_match_all('#' . $pattern . '#is', $code, $matches);
    $match += $matches[1];
  }
  $match = array_filter($match, function ($str)
  {
    return preg_match('#^[A-Z]#', $str); }
  );
  $match = array_unique($match);
  return $match;
}
@DaveRandom Exactly. I know that they can be used with new and called statically. And that they start with uppercase letter.
@PeeHaa Something like in the code above, if you feel me.
 
@LeviMorrison .. here is the thing: i think you are only room owner that actually tends to visit it
 
Is there a reason to use css variables instead of just running css through PHP? Performance, ok, but having shared constants, etc seems to outweigh any slight performance hit especially with caching.
 
@tereško I think @NikiC still comes around from time to time.
 
@Stephane there are no "css variables"
 
8:19 PM
LESS/SASS etc
 
that gets run through either php or some other serverside language
 
user1125394
"If anybody can and wants to help, they he will."
 
yes, I know
so do php devs use these tools or just run things through php generally?
 
We use sass, but not our php devs
 
Thanks Mike
 
8:24 PM
@MikeB I actually like SCSS better
Makes more sense to me as a developer
 
I like the idea - especially as a PHP developer who doesn't understand the differences between ie, webkit, and firefox.. those frameworks seem to take care of those for you. You just tell it that you want rounded corners and it spits out all the right markup for each browser
 
@MikeB Not to mention the includes, variables, and instant-minifications.
 
@MikeB I take the approach that if they don't use the specification they don't get the roundification.
 
@MikeB That's actually COMPASS
 
@webarto What is the end game? To strip out some unnecessary source files or what?
 
@DaveRandom Your logic.
 
user1125394
@webarto why not putting namespaces
 
stupid question
 
Also, silly piece of __clone magic:
 
@DaveRandom I'm mixing lots of code, modules from different frameworks, etc. But basically, yes :)
 
8:34 PM
@Nick Yes, I will let you have a nice dream when my plan completes. It's okay.
 
> Once the cloning is complete, if a __clone() method is defined, then the newly created object's __clone() method will be called, to allow any necessary properties that need to be changed.
It will ALWAYS perform the shallow copy first.
I'm like . . . seriously?
 
Why are you making a wrapper around mysqli? If you're ready to advance, check out PDO, which offers a much more OOP API. — Madara Uchiha 2 mins ago
 
@cyril I'm not using them at the moment.
 
user1125394
and you have classes with same names, in your include path?
 
@Lusitanian Please stop answering questions I haven't asked yet.
 
8:37 PM
@DaveRandom Yes.
 
@webarto In a deployed application, or something new?
@Lusitanian I'm not going to ask any yes/no questions, but you already knew that didn't you?
Damn it!
 
@DaveRandom (:
 
8:56 PM
lets see if Balmer Peak is a real thing
 
Anyone knows if PDO is 'quite' buggy?
I have tried PDO also, few months back though, but many things just don't work properly. On Googling for errors, it came out that PDO is 'quite' buggy. Otherwise, I do admit that PDO is perhaps the best database access API for PHP. — kush.impetus 11 mins ago
 
@MadaraUchiha I've never, ever, seen any bugs in PDO.
 
That's what I said
 
@DaveRandom For example, I want to use Zend_Dom, I want to use Kohana_Database, etc. and want to know what are dependencies, I mean, classes are loaded on request, something may slip and produce errors when it tries to load them. I know I'm doing it wrong...
 
@MadaraUchiha PDO users are quite buggy.
@webarto It's a tricky one that. Pretty hard without actually running it. I'm kind of out of sensible suggestions...
 
9:08 PM
@MadaraUchiha he's referring to an old article about PDO, that was written in context of PHP5.1
 
Hello dear humans, could someone who has always done C++ "in a C manner" (aka usage of very low abstraction features) qualify as a C++ programmer for a job interview?
 
depends on the job.
 
Intruder alert.
 
@Cicada no, certainly seems unlikely anyway. but try the C++ room
 
@Lusitanian she comes from C++ :P
 
9:17 PM
Oh noes, she came trolling here.
We tried to contain it, folks. I swear.
 
I almost typed "dear prokaryotes" instead of humans. But meh. It thought it could be offensive.
 
@R.MartinhoFernandes It's okay, it happens.
@Cicada Clever, and by that I mean annoyingly inflammatory.
 
@tereško Pfffft 10 upvotes?!
 
india unite ..
 
Albania tribes unite, you mean...
 
9:19 PM
i have better answers , that i am thinking of deleting ...
 
Nope, India after all...
 
damn ... php is still compiling
 
...and you were hoping it wouldn't?
 
no .. i mean , it is still building my environment
and for some strange reason it requires python and X11 (i suspect GD is a fault)
 
hey guys
 
9:34 PM
... as a side not , i discovered what has been making my freebsd VM to act so strange
 
the NTP service (time sync service) has been making updated each hour , but since box is under heavy load , in the latest VirtualBox it makes to CMOS time emulation to lag ... this causes NTP to re-adjust it all the time and networking services get hit by "time travel" condition every hour
.. hell , i am surprised that i did not see kernel panic at that
 
9:47 PM
hello, I have a #column-left and inside a #facebook div. Iam trying to center everything inside my #column-left
#column-left {
width: 250px;
float: left;
background: red;
}
 
@MadaraUchiha Aye, Compass is what we use
 
Just ran across this in PHP, is that valid to report as a bug? bugs.php.net/bug.php?id=63616 - Iterator / SPL related.
 
@tereško
 
user1125394
@ycelik margin: initial auto;
 
9:54 PM
@tereško OMG that's awesome lol
 
I f* hate chained methods... not sure where the error is...
 
@webarto Did you write the code in question?
 
.. which is why we keep on insisting that they are bad
 
^^ that
 
If I wrote it, I would know where the error is :)
 
9:56 PM
lolol oh okay
 
don't star posts which require context
8
 
@cyril thanks dude. i tried this already. its not working :(
 
@hakre why wouldn't it be? the interface it implements doesn't work properly
 
:6401954 but i need to float it because of my layout
 

« first day (772 days earlier)      last day (4176 days later) »