« first day (929 days earlier)      last day (4019 days later) » 

4:01 PM
sarcasm is incompatible with the internet
 
so is deja vu ^^
 
@Lusitanian Was that sarcasm?
 
@igorw potentially
 
@Lusitanian Was that sarcasm?
 
4:02 PM
@igorw arguably, sheldon
 
user895378
Inception 2: Curse of the Recursive Sarcasm Chat Log
 
was that italics without bold?
 
user895378
Penny. Penny. Penny.
 
Penny knock knock Penny knock knock Penny
 
user895378
(I knocked on my desk in between typing the periods)
 
4:06 PM
last ep. with the Closures was really funny
 
user895378
@kaᵠ I did not see this. To the intarwebs!
 
@rdlowrey i didn't hint anything, i thing Closure is in it's name
 
@rdlowrey reasonable
 
I'm not crazy, my mother had me tested
 
I am crazy...my mother had me tested
 
4:09 PM
lol
 
@Lusitanian so you have special markings on your ID card?
 
of course.
 
you're wondering how could i know that ? :P
brothaaa
 
posted on May 02, 2013 by Evert Pot

Last week we have finished the talks to transfer ownership of the SabreDAV project to fruux. I've been working at fruux as a lead-dev for some time now, and SabreDAV is really at the core of everything we do, so this was a logical and inevitable choice. To me it's an important step. SabreDAV has been one of the very little things that have remained consistent in my life.

 
Just FYI: If you are missing the delete vote link below a closed question, here are some new rules live: meta.stackoverflow.com/questions/173513/…
6
 
insta-star :P
 
CAM
            self::$in = self::getStandard($key)[0];
in 5.4 this is OK, this is not ok in 5.3?
what is this called when I do this ?
 
user895378
@CAM It's called array dereferencing.
 
CAM
4:32 PM
Can i turn it off for 5.4 so I can dev w/ 5.3 teams?
 
user895378
Prior to 5.4 you can't reference elements in a function's array result without first assigning the array to its own variable.
 
CAM
LameO
 
user895378
@CAM No, you can't turn it off. If you need backward compatibility you need to write backward-compatible code.
 
@CAM no. you cannot turn it off. But you can not use it.
 
CAM
I fugured
Thanks Guys
 
4:35 PM
@CAM if you dont want people to use it, add to your coding standard that it's prohibited. if you need to enforce that, write a sniff for phpcs
 
CAM
I like Array dereferencing.
 
does anyone knows which static php code analysis tool rasums lerdorf is using recently?
I stumbled over this output: core.trac.wordpress.org/ticket/24210
--------------------------------
File       : wp-includes/class-json.php:495
Reason     : UnknownFunction
Snippet    : class_name($var)
Line       : : new Services_JSON_Error(class_name($var).
 
@hakre the no-static-php-code-analysis-tool-tool
 
@Gordon okay, never heard of it.
 
@hakre i dont know what he is using. That was a pun on his no framework work article
 
4:43 PM
I need help guys i am getting this error
The requested URL /uk-movers/wordpress/picture.php was not found on this server.
 
@Gordon Ah okay, after not writing a framework, an analysis tool was needed to keep track of the code because there is no community development so all needs to be done alone :(
 
i have picture.php file in my directory still i am getting this error ( The requested URL /uk-movers/wordpress/picture.php was not found on this server.)
 
actually its not wordpress theme or something
its custome script
php
@kaᵠ
 
@MalikUsman does the file exist in the exact directory structure as described there?
 
4:48 PM
yeah it is in my directory
here i am working on it
but when i click on next image error comes up and say picture.php is not exist
 
@MalikUsman something wrong with your custom script
 
Well what can be wrong i bought it and i uploaded it on my server
i did make changes
 
@MalikUsman You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY id DESC LIMIT 1' at line 1
ouch
that's wrong !
it's crap @MalikUsman get your money back
you're prone to SQL injection
and the script malfunctions
 
Oh really :'( i love this script
design and everything
 
design :))
 
4:53 PM
What to do :'(
i bought from this company flippyscripts.com
 
user895378
@Gordon That is funny, though most people probably won't get the joke :)
 
well cant i fix the error :'(
@kaᵠ dont you think problem is in my .httaccess :O
 
5:09 PM
@Gordon Is this the duck from wat talk?
 
hey all. needing some help with $_FILES. anyone up for it?
 
@webarto i didnt watch the wat talk yet
 
pce
hi! @hakre HipHop's static analyzer? ( github.com/facebook/hiphop-php/blob/master/hphp/test/… provides TooFewArgument, UseUndeclaredVariable ...)
 
@JohnBlythe - Refer to the paragraph to your right, under PHP. :)
 
:)
so i'm uploading multiple files
i can troll through them just fine w/ a simple foreach
problem is that i don't just need to get each of the associative arrays, i need their names
 
5:16 PM
@pce hi! ah you sneaky searcher. I'm just back, yeah, I didn't google so far the strings.
 
so i'm getting this, for instance when i dump $_FILES:
dangit. whatever :p
when i run foreach($_FILES as $file)
i get the name, type, etc. of each of those two arrays, but i also need the names (ie ProductPhotoOffer)
 
Array (
	[ProductPhotoOffer] => Array (
    	[name] => 301662_10100155186751813_79314268_n.jpg
		[type] => image/jpeg [tmp_name] => /`Applications/MAMP/tmp/php/phpTcGmhJ
		[error] => 0 [size] => 45057
		)
	[QuoteDoc] => Array (
    	[name] => Agenda - 13.05.01.docx
		[type] => application/vnd.openxmlformats-o`fficedocument.wordprocessingml.document
		[tmp_name] => /Applications/MAMP/tmp/php/php5zpGrm
		[error] => 0
		[size] => 31978
		)
)
 
thanks for that.
 
user652649
foreach($_FILES as $fieldName => $file)
 
@JohnBlythe put code as separate messages. paste into box. click fixed font button that appears after pasting.
 
5:18 PM
ahhh, i see. thank you :)
 
so it sounds like that rasmus is preparing a presentation where he runs wordpress inside the new PHP VM.
like last time with php hiphop and wordpress.
 
@wes facepalm.
 
user652649
@hakre are you sure it's allowed to use the words "rasmus" and "wordpress" in the same sentence?
 
@Wes yes, sure, wordpress is the PHP application
 
5:20 PM
feel dumb. but feel relived, too :) had been trying to get a third party plug in working for the last day and a half and am a bit frazzled, finally abandoned it to do custom.
thanks!
 
user652649
sadly, @hakre :(
 
@pce: Do you have any idea how to compile that? I mean just the test-tool?
 
@webarto well, I don't know if it is but I'd say the amount of giant inflattable rubber ducks on earth is limited so it probably is.
 
@JohnBlythe sometimes we just need a slap in the brain, I think that's what this room is for lol
 
why is there a chat on stackoverflow? :/
2
 
5:24 PM
@daniel indeed. was at my wit's end yesterday. tried one more time (for about an hour or two) this morning before finally reverting completely and moving forward in another direction. takes a while to get unfried after those kinds of instances
 
Good news everyone
 
pce
@hakre maybe you find some more infos here: github.com/sebastianbergmann/hphpa (i guess it's easier to configure and make all)
 
@PeeHaa埽 "You'll be making a delivery to Stumbos 4, a planet with such high gravity you'll most likely be crushed under the weight of your own hair. Enjoy!" ?
 
Exactly, that's why plugins can be a cursed blessing in disguise sometimes
 
@DaveRandom :)
 
5:26 PM
@DaveRandom bing bing. BING BING. bing bing bing bing.
 
pce
@hakre on which distro? pre-built packages: github.com/facebook/hiphop-php/wiki
 
@pce hehe. well-me-no-haz-ubuntu. :) but the link to sebastian is nice. No idea if the updates it, however he writes it's available via pear.
@PeeHaa埽 Where?
 
10 mins ago, by DaveRandom
@PeeHaa埽 "You'll be making a delivery to Stumbos 4, a planet with such high gravity you'll most likely be crushed under the weight of your own hair. Enjoy!" ?
 
@PeeHaa埽 sounds very good news like!
sometimes user take their time until they accept an answer, e.g. here this is ca. 2 months:
0
A: Extracting data from xpath reference of SimpleXMLElement Object

hakreCasting a SimpleXMLElement to string is the general solution(see "Forcing a SimpleXML Object to a string, regardless of context" for the canonical question), for a complete array containing all SimpleXMLElements like returned by xpath() or like you create it your own, a common way is to map the a...

 
5:49 PM
hello, i need a favour. I'm thinking of creating an application like pict.com, where the it posts a photo to the user's Facebook wall and the photo has an hover state action. Does anyone know how this is achieved?
Their blog blog.pict.com also explains it.
 
lol ducks
 
user895378
@Skyalchemist Lots of people know how that is achieved. Do you have an actual question?
 
@Skyalchemist I agree with rdlowrey. At the least, what have you done to start this?
 
Anonymous
I disagree and agree at the same time, b/c I don't understand his question
 
Please tell me, it's not code i want just how to, a link anything that'll guide me along.
 
Anonymous
5:58 PM
photo has a hover state action? while posted in Facebook? @Skyalchemist
 
user895378
Uh, that's programming. You problem solve. You say, "this is the end goal." Then you break the problem down into it's component parts and solve them.
 
user895378
It's not really something someone can just "explain" or point to a link.
 
user895378
The first order of business is to learn how to program and program well. At that point you can solve pretty much any problem you want with the help of some documentation for the APIs you're employing.
 
If i create a Facebook app, with the user's permission i can post a status update, photo or video on the person's wall.
 
6:00 PM
@Skyalchemist - Correct
 
lol i know how to program in php and ruby.
 
user895378
Then there's no need to ask the question. Google + the ability to program is all you need.
 
Anonymous
@Skyalchemist yes, but what do you mean by hover state action
 
@PHPfanthat's exactly the part i want to know. You see, when pict.com posts a photo for you on Facebook and you hover over the image, a product description, price and a buy button shows just as if the picture has javascript embedded in it.
 
Hover while on Facebook?
 
6:02 PM
It basically allows you to shop in the facebook feed directly.
@Daniel yes that's why i was wondering how its done
 
Anonymous
@Skyalchemist Are you sure you are not talking about tagging?
 
@PHPfan tagging as in?
 
stackoverflow.com/questions/16341075/… - Was going to say check here, lol
 
You know the pic on the homeapage, there is a plus sign with a circle around it.
 
Anonymous
@Daniel lol
 
6:06 PM
if you hover over it, a div slides in from the top.
 
Anonymous
as far as I know. Once, an image is submitted to Facebook, it does not have an special functionality, aside from tagging people. either that... or I have not being using Facebook lately. It is hard to keep up with their updates
 
Anonymous
@Daniel Wow, you don't like to accept your questions do you?
 
Did I miss some? I haven't asked any in quite a while, will check now
 
Oh thank's for the heads up @Daniel , i'll check that out.
 
6:11 PM
@PHPfan - lol I'd only missed one
 
Anonymous
@Daniel you have accepted only one :)
 
hmmmm
can you link me? I must be missing something
I see 4/6 of my questions were answered, 4/6 I accepted the answers (1 just now)
 
Anonymous
@Daniel Oh, I mistook your answer for questions
 
Anonymous
SE people have been mean to you, didn't they
 
Anonymous
@Daniel wow, did you check your reps
 
Anonymous
6:15 PM
@Skyalchemist can you show us in any way, how there is a hover image works?
 
Anonymous
I need to see that pls
 
lol
 
Reading PHP internals and the RFCs is kinda... depressing.
 
yes my rep is not the greatest
 
Got it, action links might actually be the answer i've been looking for.
 
6:16 PM
@Bracketworks Yep. It's pretty sad
 
user895378
@Bracketworks yeah ... it's a wonder anything ever gets done without being silently pushed through by the important people (even if others don't want it).
 
Anonymous
It is fine. Since you are not active in SE, I... on the other have made over 200 answers and still on 2k rep
 
Anonymous
I am pathetic
 
@PHPfan It works on the facebook feed exactly how it works on their homepage, really cool uh?
 
user895378
 
user895378
6:17 PM
> Oh, here's a thought: let's just throw more annotations at it?
 
user895378
$config = /** @ref AppConfiguration */ array(
    'services' => /** @ref ServiceContainer */ array(
        /** @ref PDO */ array(
            'username' => 'foo',
            'password' => 'bar',
        )
    ),
);
 
user895378
That's hideous ^
 
Not sure if comment or code :P
 
@rdlowrey kill it... with napalm
 
@rdlowrey I've noticed that alot of stuff just remains in some sort of pending state, forever. Like RFC limbo. I'm taking that to mean "hahaha, NOPE".
 
6:18 PM
I love the smell of napalm'd code in the morning.
 
yeah I'm trying to be more active, mainly search and find answers, but feel somewhat bad not helping out as much as I should
I did get a +2 for accepting an answer though just now, woot woot
 
I prefer to place snakes that eat itself into answers instead:
0
A: Uncaught exception 'DOMException' with message 'Hierarchy Request Error'

hakreThe error Hierarchy Request Error with DOMDocument in PHP means that you are trying to move a node into itself. Compare this with the snake in the following picutre: Similiar this is with your node. You move the node into itself. That means, the moment you want to replace the person with the p...

 
Anonymous
@Daniel +50 just fell from the sky :)
 
@rdlowrey "
Uh, that's programming. You problem solve. You say, "this is the end goal." Then you break the problem down into it's component parts and solve them.

It's not really something someone can just "explain" or point to a link.
The first order of business is to learn how to program and program well. At that point you can solve pretty much any problem you want with the help of some documentation for the APIs you're employing."- Great answer, this made me lol
 
@PHPfan - Nice! :)
Doubled up lol
 
6:23 PM
@ircmaxell I'm proceeding with the use function RFC, since there's been no major objections. Just applied for RFC karma.
 
@PHPfan: You should kill your commen then: stackoverflow.com/questions/16175702/…
 
Anonymous
@hakre comment RIP!
 
> ☠ Don't try my codes at home. :)
 
@hakre would probably have a field day with me lol
 
Anonymous
...It is funny, cause it is true...
 
6:26 PM
Either that or I wouldn't be on his radar
 
Anonymous
@Daniel Try to give/write more, detailed answers next time. Almost all your answers are just in one line and like this may be considered spam by some
 
Okay will do, thanks for the advice. I need to start spending more personal time going through tags to answer questions.
 
pce
@igorw did you thought about mapping functions to files? autoload of functions?
 
Anonymous
Worst answer of the day stackoverflow.com/a/16344910/1640606
 
6:37 PM
lol nice one
at least I'm not that bad
 
What was wrong with that one @hakre
 
Anonymous
worst answer of the day 2 stackoverflow.com/a/16344544/1640606
 
@Daniel Too localized means that this question is likely not of any help to anybody else. Therefore it does not belong on this website which collects questions and answers that are of general help, not just because somebody did a little mistake or swapped two letters in a word or similar.
 
Ah okay, gotcha
lol 25 more rep needed before I can downvote that answer
 
6:43 PM
@pce it's hard to do because of fallbacks.
namespace foo { bar(); }
it could be either foo\bar(); or \bar();
how do you autoload that? you would have to check both locations?
 
@Daniel also the user who asks changes the question after users are giving answers. It's just doing debugging on this website, not helpful.
 
public function __construct()
{
    try
    {
        $this->db = new PDO("mysql:host=".$host.";dbname=".$database."", $user, $password);
    }
    catch(PDOException $e)
    {
        echo $e->getMessage();
    }
}
Why do every noob feel a need to do that?!
 
@hakre Makes total sense, thanks for clearing that up
 
@igorw autoload FQFN first.
 
@hakre so you get a penalty for globally namespaced functions. which sucks.
 
6:45 PM
@MadaraUchiha they copy that from bad tutorials and think its cool?
@igorw not at all.
 
@hakre you get at least one extra stat call.
 
@igorw hmm. but how to solve that?
let's remove the fallback!
 
you can avoid it by only autoloading namespaced functions. but that's kinda inconsistent and unintuitive.
 
okay have a good one everyone, may be back later, thanks again for the help @PHPfan and @hakre
 
at least I believe that would work
 
6:48 PM
@igorw yeah, when do you know that those are namespaced?
 
Anonymous
@Daniel later
 
Anonymous
@MadaraUchiha
how is this? very bad, bad, ok
 
Anonymous
class test(){
	public $conn;

	function __construct($conn){
	$this->conn = $conn;
	return $conn;
	}
}

$obj = new test(new PDO('mysql:hos..'));
 
@hakre you don't, but if you can't find the namespaced version, the function doesn't exist, fatal error.
 
@PHPfan Just fine.
Except for the obvious syntax error pulic $conn
 
6:49 PM
so it would be something like "local function exists? no => global function exists? no => try autoloading local function, does it exist? no => fatal error"
 
and the lack of visibility keyword before the function __construct
 
Anonymous
@MadaraUchiha lol :
 
Also, returning in a construct is pointless
A construct always returns the object it creates
 
@igorw but then the fallback is gone.
 
(An instance of the test class, and not whatever conn is)
 
Anonymous
6:51 PM
Yep got that.
 
@hakre fallback is not gone, you just need to load global functions beforehand, just like we have to do for all functions right now.
 
but actually it does not solve the issue at all, because now you need a stat call for all local functions
like json_encode('foo') would lead to a stat call, once per namespace it is called from.
and that is exactly why my RFC does not address function autoloading. because it's a fucking mess.
 
@kaiser very nice :)
 
gist: 5504453, 2013-05-02 18:54:33Z
<?php

class Test { //It's considered good naming convention to name classes and objects with an Uppercased letter.
  public $conn; //Public, not pulic.

	public function __construct(PDO $conn) { //Will only allow an instance of the PDO object
	  $this->conn = $conn;
	}
}

$obj = new Test(new PDO('mysql:hos..'));
This is how I would've done it.
 
Anonymous
6:56 PM
ok, I know about the naming conversions, and about the simple mistake but, why write PDO inside the the __construct() argument ?
 
Anonymous
i.e. (PDO $conn)
 
@hakre my RFC can make function autoloading more possible, because you can then clearly distinguish between global and local functions. but it would still be a mess.
 
@PHPfan It's called type hinting
 
@igorw you have a link to your RFC because I didn't read it so far.
 
It will make the method to only accept PDO objects (or objects that extend the PDO objects).
 
@MadaraUchiha linkifier fail
 
@kaᵠ How so?
 
Anonymous
@MadaraUchiha but, why make an extra code, since you know, you can only pass PDO when instantiating the class?
 
It worked out perfectly well
I did use `return`ing
 
a
ok then, carry on :P
 
6:59 PM
@PHPfan Because limiting yourself and making sure the method gets the right argument can help you a lot with debugging later on.
 

« first day (929 days earlier)      last day (4019 days later) »